On Fri, 13 Nov 2015, Giacomo Comes wrote: > Hi, > I'm building CDE on openSUSE 13.2 and I have found some issue with ksh. > As repoterd here: > http://sourceforge.net/p/cdesktopenv/discussion/general/thread/7a63a375/ > there are some "test: : arithmetic syntax error" messages and the build hangs. > The build succeed on openSUSE 13.1 which uses ksh 93u 2012-08-01, but > openSUSE 13.2 has ksh 93v 2014-06-25 and apparently the script in the cde > source > programs/dtksh/ksh93/ship/shipin > is not compatible with the newer ksh version. > > Problem 1 > on line 586 of shipin this line of code is executed: > if test "$new" -gt "$old" > when this happens the variable "old" is empty. The old version of ksh treats > such variable has having value 0, the new version gives arithmetic syntax > error. > A fix that works with both version is to change the line like this: > if test "$new" -gt "${old:-0}" > The same identical problem happens at line 615. The same code exists at line > 572, but such line is not executed during my build. > > Problem 2 > on line 1314 of shipin this line of code is executed: > s=\`wc pic.o\` > when the shell (93v 2014-06-25) executes "wc pic.o" it hangs. > This is a problem with the builtin wc command. If I use /usr/bin/wc then > everything is ok. The script hangs also at line 1328 running the same command. > A fix that makes the script work with both versions of ksh is to add the line: > builtin -d wc > at the beginning of the script. Of course an OS provided version of wc must be > available, but I think that's always true. >
Good fixes. > Attached you can find a patch that fixes these problems with the ksh build. I manually applied this patch, though in the future, please use git format-patch to send patches to the list (as described at the top of the Contributing to CDE wiki page). It makes my job easier, and makes sure that you get the credit in the git history. > > By the way in the "Contributing to CDE" wiki page there are this couple of > lines: > DtKsh: > Investigate build against newer ksh93. This is problematic due to license > reasons (EPL is incompatible to (L)GPL). > Are they refering to the problems I reported? If so, once the patch is > committed > the page can be updated. > Early on, it was proposed that an existing, modern ksh library should be used to build dtksh, rather than building our own version. As usual, it requires someone with the time and desire to do the work and send the appropriate patches. Thanks! -- Jon Trulson "If we can hit that bull's-eye, the rest of the dominoes will fall like a house of cards... Checkmate." -- Zapp Brannigan ------------------------------------------------------------------------------ _______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel