ksh93 build fails during ast build How-To-Repeat: Try to build ksh93 with 2002-06-14 sources. ast build fails. + mv 1.27985.x /usr/ports/shells/ksh93/work/arch/freebsd.i386/include/ast/prototyped.h mamake: *** exit code 1 making lib/libast + mamake -C lib/libcmd -k install + cc -O -pipe -I. -I/usr/ports/shells/ksh93/work/src/lib/libcmd -I/usr/ports/shells/ksh93/work/arch/freebsd.i386/include/ast -D_PACKAGE_ast -D_BLD_cmd -c /usr/ports/shells/ksh93/work/src/lib/libcmd/cmdinit.c In file included from /usr/ports/shells/ksh93/work/src/lib/libcmd/cmdinit.c:30: /usr/ports/shells/ksh93/work/src/lib/libcmd/cmdlib.h:34: ast.h: No such file or directory In file included from /usr/ports/shells/ksh93/work/src/lib/libcmd/cmdlib.h:35, from /usr/ports/shells/ksh93/work/src/lib/libcmd/cmdinit.c:30: /usr/ports/shells/ksh93/work/src/lib/libcmd/cmd.h:35: ast.h: No such file or dir I have no idea why the mv during the ast build/install fails, but it aborts the rest of the ast install and then the rest of the ksh93 build fails horribly...
Responsible Changed From-To: freebsd-ports->naddy my port
It built just fine for me out of portupgrade on a 4.6-STABLE box. Just a data point. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
another data point ... i recently installed ksh93 port w/ most recent changes (2002.06.23.11.55.28) on freebsd 4.6-release w/o problems. --
> >Number: 39783 > >Category: ports > >Synopsis: ksh93 build fails > >How-To-Repeat: > Try to build ksh93 with 2002-06-14 sources. ast build fails. I just updated the port to the 2002-06-28 release. Can the people who previously were affected try again and see if the problem persists? -- Christian "naddy" Weisgerber naddy@mips.inka.de
Christian Weisgerber wrote: >>>Number: 39783 >>>Category: ports >>>Synopsis: ksh93 build fails >>> >>> > > > >>>How-To-Repeat: >>> >>> >> Try to build ksh93 with 2002-06-14 sources. ast build fails. >> >> > >I just updated the port to the 2002-06-28 release. >Can the people who previously were affected try again and see if the >problem persists? > > > No luck, see attached.
After much wailing and gnashing of teeth, I have found a clue. There is a file (src/ast/libast/comp/conf.sh) which is used to generate various header files within the ast library. For reasons that I still cannot figure out, the following excerpt from this script does not perform as expected: cat <<! printf("#undef ${macro}\n"); printf("#define ${macro} ${fmt}\n", ${var}); ! case $minmax in "") cat <<! #endif ! ;; esac For reasons beyond my knowing at this time, the newline after the second printf is not generated, thus causing the following line to be catenated to the printf. If the following line is a simple C statement, no problem. If, however, the following line is #if or #endif, chaos ensues! I corrected the problem by adding another newline before the ! following the printf. This is so obviously a kludge, I cannot begin to comprehend it. Another point to ponder is that in order to get this far, I had to be able to get conf to actually run. The problem with that is that when I su to root, PATH does not contain '.'. This means, that when we run bin/package with a PATH that does not contain '.', it is not able to actually run it! I modified the do-install target thusly: env -i SHELL=/bin/sh LDFLAGS=-static CCFLAGS='-O -pipe' PATH=/bin:/usr/bin:. /bin/sh bin/package make If PATH contains anything other than the three directories, chaos ensues. If anything other /bin/sh is used to run bin/package, chaos ensues. bin/package is apparantly a very delicate command. Using ksh to run it causes core dumps! I will continue to play with this and hope to figure out what is really happening...
I am attaching two files, one is the difference between the installed port Makefile and the Makefile that actually works for me. The basic change is to force SHELL to /bin/sh and also force the use of /bin/sh to run bin/package. I have added two other things to this Makefile: * Allow installation of standard ksh93 functions from the arch/*/fun directory into the share/examples/ksh93 directory if WANT_FUN is defined. * If PREFIX==/, then you have to modify the editing of /etc/shells to prevent //bin/ksh93 from appearing there. I have also included files/patch-src_lib_libast_comp_conf.sh which fixes the mysterious problem I have with this script. Please let me know if these changes meet with your approval. Thank you.
State Changed From-To: open->closed Should be fixed now, thanks for your input!