Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13076 - elfutils-0.72 fails to compile
Summary: elfutils-0.72 fails to compile
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: High normal (vote)
Assignee: Sparc Porters
Depends on:
Reported: 2003-01-02 03:13 UTC by Joshua Kinard
Modified: 2003-08-17 07:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

An updated ebuild, containing the "Makefile-remove-Werror" Patch. (elfutils-0.72-r1.ebuild,885 bytes, text/plain)
2003-01-07 14:16 UTC, Daniel Seyffer
Patch to remove -Werror from the Makefiles. (elfutils-0.72-no_Werror-gentoo.diff,6.94 KB, patch)
2003-01-07 14:17 UTC, Daniel Seyffer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2003-01-02 03:13:34 UTC
if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall -I. -I. -I.. -I. -I../libelf -I../lib
-I..   -Wall -Werror
-mcpu=ultrasparc -mtune=ultrasparc -O3 -pipe -fomit-frame-pointer -MT sh_init.o
-MD -MP -MF ".deps/sh_init.Tpo" \
  -c -o sh_init.o `test -f 'sh_init.c' || echo './'`sh_init.c; \
then mv ".deps/sh_init.Tpo" ".deps/sh_init.Po"; \
else rm -f ".deps/sh_init.Tpo"; exit 1; \
cc1: warnings being treated as errors
i386_corenote.c: In function `i386_core_note':
i386_corenote.c:117: warning: long int format, __suseconds_t arg (arg 13)
i386_corenote.c:117: warning: long int format, __suseconds_t arg (arg 15)
i386_corenote.c:117: warning: long int format, __suseconds_t arg (arg 17)
i386_corenote.c:117: warning: long int format, __suseconds_t arg (arg 19)
make[2]: *** [i386_corenote.o] Error 1
make[2]: *** Waiting for unfinished jobs....
rm i386_init.o i386_destr.o i386_symbol.o sh_init.o
make[2]: Leaving directory
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/obj/portage/elfutils-0.72/work/elfutils-0.72'
make: *** [all] Error 2

!!! ERROR: dev-libs/elfutils-0.72 failed.
!!! Function src_compile, Line 25, Exitcode 2
!!! (no error message)
Comment 1 Jasmin Buchert 2003-01-02 06:36:46 UTC
Elfutils also failes to compile on x86. Here is the output:

libelfP.h:454: warning: `visibility' attribute directive ignored
libelfP.h:456: warning: `visibility' attribute directive ignored
libelfP.h:458: warning: `visibility' attribute directive ignored
libelfP.h:460: warning: `visibility' attribute directive ignored
libelfP.h:464: warning: `visibility' attribute directive ignored
libelfP.h:468: warning: `visibility' attribute directive ignored
libelfP.h:472: warning: `visibility' attribute directive ignored
libelfP.h:476: warning: `visibility' attribute directive ignored
libelfP.h:478: warning: `visibility' attribute directive ignored
libelfP.h:480: warning: `visibility' attribute directive ignored
libelfP.h:481: warning: `visibility' attribute directive ignored
libelfP.h:482: warning: `visibility' attribute directive ignored
libelfP.h:487: warning: `visibility' attribute directive ignored
libelfP.h:489: warning: `visibility' attribute directive ignored
libelfP.h:491: warning: `visibility' attribute directive ignored
libelfP.h:495: warning: `visibility' attribute directive ignored
make[2]: *** [elf_hash.o] Error 1
make[2]: Leaving directory
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/elfutils-0.72/work/elfutils-0.72'
make: *** [all] Error 2
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-02 16:31:58 UTC
What gcc/CFLAGS ?  Compiles here without one warning.  Anyhow, fix is to hack -Werror out.
Comment 3 Joshua Kinard gentoo-dev 2003-01-02 17:47:07 UTC
My CFLAGS for sparc are:
CFLAGS="-mcpu=ultrasparc -mtune=ultrasparc -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-mcpu=ultrasparc -mtune=ultrasparc -O3 -pipe -fomit-frame-pointer"

Those flasg used to do funny things on sparc, but at the reccommendation of
#gentoo-sparc folks, they should work now, and this has indeed proven to be the
case (ran emerge -e system the other day).
Comment 4 Joshua Kinard gentoo-dev 2003-01-02 17:54:27 UTC
Also, is it safe to hack out the -Werror?  Shouldn't these warnings and such be
cleaned up a little?
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-02 18:28:49 UTC
Developers usually add it to track down warnings in code (which could point to
a possible bug in code, although not always).

What happens if you take out the -fomit-frame-pointer ?
Comment 6 Simeon Walker 2003-01-03 04:10:29 UTC
I see exactly the same problem as that of Jasmin (above). I am using an Athlon
XP and my CFLAGS="-march=athlon-xp -O3". It's just the same with -O2 or with no
Comment 7 Daniel Seyffer 2003-01-06 05:11:37 UTC
Hello,  FYI. I too have exactly the same error as Jasmin, using a PIII and CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"...    
Comment 8 Joshua Kinard gentoo-dev 2003-01-06 11:20:40 UTC
Oddly enough, it compiled fine on my pentium 2 300MHz system, and I have a
wackload of flags set for CFLAGS.

CFLAGS="-march=pentium2 -O3 -pipe -mmmx -fomit-frame-pointer -fforce-addr
-funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4

This didn't seem to stop it.  Making it seemingly a show stopper for specific
x86 people and possibly all sparc folks.  I'll also have information on how well
this builds on mips arch too once I get a basic system running on my SGI box.
Comment 9 Daniel Seyffer 2003-01-07 14:15:12 UTC
[notice: regarding the x86 Bug only - I still have to test Gentoo on one of the
Suns at work one day... ;-)]

Hm, quite strange actually. If I may help to further investigate this, e.g. by
providing more detailed information, just let me know. I am using a (hopefully)
"clean" Gentoo 1.4_rc2 which I just reinstalled last week.

The good news is that it works for me now.

I just created a small patch for the Makefile(s) to remove -Werror as
recommended by Martin Schlemmer above. Maybe one might also remove "-Wall" as
while it will compile, there are still a lot of compiler warnings flying by. I
will attach the updated ebuild and the patchfile, but beware - it compiled for
me, not more not less... :-) 
Comment 10 Daniel Seyffer 2003-01-07 14:16:48 UTC
Created attachment 7060 [details]
An updated ebuild, containing the "Makefile-remove-Werror" Patch.
Comment 11 Daniel Seyffer 2003-01-07 14:17:37 UTC
Created attachment 7061 [details, diff]
Patch to remove -Werror from the Makefiles.
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-07 16:31:42 UTC
Looks good, although you could prob do something like in src_unpack():

src_unpack() {
   unpack ${A}

   for x in $(find ${S}/ -name
       cp ${x} ${x}.orig
       sed -e 's:-Werror::g' \
           ${x}.orig > ${x}

Should also be a bit more universal.  Can anybody in the sparc team/whover
that have a free moment commit this?  I really do not get to this :(  Will
only prob this weekend if nobody take it off my hands.
Comment 13 Stefan Jones (RETIRED) gentoo-dev 2003-01-08 08:51:19 UTC
Fixed, you need gcc-3.2.1-r6 for the new gcc exentions in gcc-3.3 and the redhat
gcc-3.2 branch.
Ebuild updated, closing bug.
Comment 14 Jason Wever (RETIRED) gentoo-dev 2003-08-17 07:28:54 UTC