<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>97795</bug_id>
          
          <creation_ts>2005-07-03 02:36 0000</creation_ts>
          <short_desc>ksh gcc 4 build failure</short_desc>
          <delta_ts>2006-09-11 22:47:29 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>2005.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>TEST-REQUEST</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>117482</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>truedfx@gentoo.org</reporter>
          <assigned_to>taviso@gentoo.org</assigned_to>
          <cc>cretin@gentoo.org</cc>
    
    <cc>dave@waveform.org.uk</cc>
    
    <cc>halcy0n@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2005-07-03 02:36:32 0000</bug_when>
            <thetext>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&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2005-07-03 02:37:16 0000</bug_when>
            <thetext>Created an attachment (id=62529)
ksh gcc4 patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>halcy0n@gentoo.org</who>
            <bug_when>2006-04-19 16:43:34 0000</bug_when>
            <thetext>Created an attachment (id=84986)
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.*&apos;
/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 &apos;-o since=1985,author=gsf+dgk+kpv&apos; /mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/comp/fmtmsg.h &gt; 1.$$.x&apos;
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.*&apos;
/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 &apos;-o since=1985,author=gsf+dgk+kpv&apos; /mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/comp/libgen.h &gt; 1.$$.x&apos;
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.*&apos;
/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 &apos;-o since=1985,author=gsf+dgk+kpv&apos; /mnt/ftp/temp/portage/ksh-93.20050202/work/src/lib/libast/comp/syslog.h &gt; 1.$$.x&apos;
mamake [lib/libast]: *** exit code 2 making /mnt/ftp/temp/portage/ksh-93.20050202/work/arch/linux.i386/include/ast/syslog.h
+ echo &apos;#include &lt;../prototyped.h&gt;&apos;
+ 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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2006-04-19 22:36:04 0000</bug_when>
            <thetext>&gt; 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&apos;t yet checked if the syntax errors are fixed in that newer version too though.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cretin@gentoo.org</who>
            <bug_when>2006-05-11 20:12:47 0000</bug_when>
            <thetext>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 :-)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2006-05-11 23:21:26 0000</bug_when>
            <thetext>Thanks, but could you remove it again, please? As noted earlier, this was already fixed in the latest version; the bug simply wasn&apos;t closed when that version was added.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cretin@gentoo.org</who>
            <bug_when>2006-05-12 07:28:49 0000</bug_when>
            <thetext>Drat, sorry. I see the fix went in.

Removed the patch.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>62529</attachid>
            <date>2005-07-03 02:37 0000</date>
            <desc>ksh gcc4 patch</desc>
            <filename>gcc4.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHNyYyxvcmlnL2xpYi9saWJhc3Qvc2Zpby9zZmhkci5oCisrKyBzcmMvbGliL2xpYmFzdC9z
ZmlvL3NmaGRyLmgKQEAgLTExMjEsNyArMTEyMSw2IEBACiBleHRlcm4gaW50CQlfc2ZzZXRwb29s
IF9BUkdfKChTZmlvX3QqKSk7CiBleHRlcm4gY2hhcioJCV9zZmN2dCBfQVJHXygoU2Zkb3VibGVf
dCxjaGFyKixzaXplX3QsaW50LGludCosaW50KixpbnQqLGludCkpOwogZXh0ZXJuIGNoYXIqKgkJ
X3NmZ2V0cGF0aCBfQVJHXygoY2hhciopKTsKLWV4dGVybiBTZmRvdWJsZV90CV9zZmRzY2FuIF9B
UkdfKChWb2lkX3QqLCBpbnQoKikoVm9pZF90KixpbnQpKSk7CiAKICNpZiBfQkxEX3NmaW8gJiYg
ZGVmaW5lZChfX0VYUE9SVF9fKQogI2RlZmluZSBleHRlcm4JCV9fRVhQT1JUX18K
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>84986</attachid>
            <date>2006-04-19 16:43 0000</date>
            <desc>gcc-4 fix</desc>
            <filename>ksh-20041225-gcc4.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGtzaC0yMDA0MTIyNS9zcmMvbGliL2xpYmFzdC9zZmlvL3Nmc3RydG9mLmguZ2NjNAkyMDA1
LTAzLTAxIDA1OjU5OjE4LjAwMDAwMDAwMCAtMDUwMAorKysga3NoLTIwMDQxMjI1L3NyYy9saWIv
bGliYXN0L3NmaW8vc2ZzdHJ0b2YuaAkyMDA1LTAzLTAxIDA2OjAwOjE4LjAwMDAwMDAwMCAtMDUw
MApAQCAtNTMsNyArNTMsNyBAQAogCiAjaWYgIWRlZmluZWQoUzJGX2Z1bmN0aW9uKQogI2RlZmlu
ZSBTMkZfZnVuY3Rpb24JX3NmZHNjYW4KLSNkZWZpbmUgUzJGX3N0YXRpYwkxCisjZGVmaW5lIFMy
Rl9zdGF0aWMJLTEKICNkZWZpbmUgUzJGX3R5cGUJMgogI2RlZmluZSBTMkZfc2NhbgkxCiAjaWZu
ZGVmIGVsZW1lbnRzb2YK
</data>        

          </attachment>
    </bug>

</bugzilla>