Bug 13076 - elfutils-0.72 fails to compile
|
Bug#:
13076
|
Product: Gentoo Linux
|
Version: 1.4_rc2
|
Platform: Sparc
|
|
OS/Version: Linux
|
Status: CLOSED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: sparc@gentoo.org
|
Reported By: kumba@gentoo.org
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: elfutils-0.72 fails to compile
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2003-01-02 03:13 0000
|
if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall -I. -I. -I.. -I. -I../libelf
-I../lib
-I.. -Wall -Werror
-DOBJDIR=\"/usr/obj/portage/elfutils-0.72/work/elfutils-0.72/libebl\"
-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; \
fi
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
`/usr/obj/portage/elfutils-0.72/work/elfutils-0.72/libebl'
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)
Elfutils also failes to compile on x86. Here is the output:
<snip>
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
`/var/tmp/portage/elfutils-0.72/work/elfutils-0.72/libelf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/elfutils-0.72/work/elfutils-0.72'
make: *** [all] Error 2
What gcc/CFLAGS ? Compiles here without one warning. Anyhow, fix is to hack
-Werror out.
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).
Also, is it safe to hack out the -Werror? Shouldn't these warnings and such be
cleaned up a little?
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 ?
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
CFLAGS set.
Hello, FYI. I too have exactly the same error as Jasmin, using a PIII and
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"...
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
-falign-jumps=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.
[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... :-)
Looks good, although you could prob do something like in src_unpack():
-------------------
src_unpack() {
unpack ${A}
for x in $(find ${S}/ -name Makefile.in)
do
cp ${x} ${x}.orig
sed -e 's:-Werror::g' \
${x}.orig > ${x}
done
}
----------------------
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.
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.