Bug 97795 - ksh gcc 4 build failure
|
Bug#:
97795
|
Product: Gentoo Linux
|
Version: 2005.0
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: TEST-REQUEST
|
Assigned To: taviso@gentoo.org
|
Reported By: truedfx@gentoo.org
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: ksh gcc 4 build failure
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2005-07-03 02:36 0000
|
When I tried to install ksh-93.20050202, it complained that the ast library
could not be found. (And because it insists on building with -k, the error
message for the failure while building libast was not initially shown. Any
chance of ripping that out?) It's the usual problem - static definition in .c,
extern declaration in .h. And as usual, removing the declaration in the header
file makes it compile. Will attach a patch.
Created an attachment (id=84986) [details]
gcc-4 fix
This was the fix that Fedora and Debian used. I run into another build problem
though.
+ /bin/cp
/mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/misc/magic.tab
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/lib/file/magic
/bin/sh: -c: line 4: syntax error near unexpected token `win32.*'
/bin/sh: -c: line 4: `win32.*)proto -p -s -l
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/lib/package/ast.lic
'-o since=1985,author=gsf+dgk+kpv'
/mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/comp/fmtmsg.h >
1.$$.x'
mamake [lib/libast]: *** exit code 2 making
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast/fmtmsg.h
/bin/sh: -c: line 4: syntax error near unexpected token `win32.*'
/bin/sh: -c: line 4: `win32.*)proto -p -s -l
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/lib/package/ast.lic
'-o since=1985,author=gsf+dgk+kpv'
/mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/comp/libgen.h >
1.$$.x'
mamake [lib/libast]: *** exit code 2 making
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast/libgen.h
/bin/sh: -c: line 4: syntax error near unexpected token `win32.*'
/bin/sh: -c: line 4: `win32.*)proto -p -s -l
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/lib/package/ast.lic
'-o since=1985,author=gsf+dgk+kpv'
/mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/comp/syslog.h >
1.$$.x'
mamake [lib/libast]: *** exit code 2 making
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast/syslog.h
+ echo '#include <../prototyped.h>'
+ cmp -s
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast/prototyped.h
1.9175.x
+ mv 1.9175.x
/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast/prototyped.h
mamake: *** exit code 1 making lib/libast
Which causes this failure later:
+ cc -march=athlon-xp -O2 -pipe -ggdb -Wl,-O1 -Wl,--sort-common -s -o shcomp
shcomp.o -lshell -ldll -ldl -last -lcmd -last -last -lm -ldl -last
/usr/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lshell
collect2: ld returned 1 exit status
mamake [cmd/ksh93]: *** exit code 1 making shcomp
+ cc -march=athlon-xp -O2 -pipe -ggdb -I.
-I/mnt/ftp/temp/portage/ksh-93.20050202/work/src/cmd/ksh93
-I/mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast
-D_PACKAGE_ast -c
/mnt/ftp/temp/portage/ksh-93.20050202/work/src/cmd/ksh93/sh/suid_exec.c
+ cc -march=athlon-xp -O2 -pipe -ggdb -Wl,-O1 -Wl,--sort-common -s -o suid_exec
suid_exec.o -last
/usr/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -last
gcc-4.1 is going to be unmasked relatively soon, so it would be nice to get a
fix for this.
Thanks
> This was the fix that Fedora and Debian used.
The original patch is what went in official ksh (and a version bump would now
be possible to fix this too). I haven't yet checked if the syntax errors are
fixed in that newer version too though.
Hi,
I put a gcc4 patch from fedora into ksh-93.20060214-r1.ebuild.
It builds fine on a gcc-3.4.6, does it work now on gcc4?
Could you test, thanks :-)
Thanks, but could you remove it again, please? As noted earlier, this was
already fixed in the latest version; the bug simply wasn't closed when that
version was added.
Drat, sorry. I see the fix went in.
Removed the patch.