Bug 42735 - Error: symbol `pread64' is already defined
Summary: Error: symbol `pread64' is already defined
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.4.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-13 20:35 UTC by Dick Marinus
Modified: 2012-02-04 21:00 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
rmake.log.gz (144.50 KB, application/x-gzip)
2010-01-13 20:37 UTC, Dick Marinus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dick Marinus 2010-01-13 20:35:29 UTC
1. ../configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
2. make
3. libtool: compile:  /tmp/rmake/builds/gcc/gcc-4.4.2/obj/./gcc/xgcc -B/tmp/rmake/builds/gcc/gcc-4.4.2/obj/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../libgfortran -I. -iquote../../../libgfortran/io -I../../../libgfortran/../gcc -I../../../libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -fcx-fortran-rules -O2 -march=i686 -g -D_FORTIFY_SOURCE=2 -fstack-protector -MT backtrace.lo -MD -MP -MF .deps/backtrace.Tpo -c ../../../libgfortran/runtime/backtrace.c  -fPIC -DPIC -o .libs/backtrace.o
/tmp/ccNahovA.s: Assembler messages:
/tmp/ccNahovA.s:497: Error: symbol `pread64' is already defined
make[3]: *** [backtrace.lo] Error 1
make[3]: Leaving directory `/tmp/rmake/builds/gcc/gcc-4.4.2/obj/i686-pc-linux-gnu/libgfortran'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/rmake/builds/gcc/gcc-4.4.2/obj/i686-pc-linux-gnu/libgfortran'
make[1]: *** [all-target-libgfortran] Error 2
make[1]: Leaving directory `/tmp/rmake/builds/gcc/gcc-4.4.2/obj'
make: *** [all] Error 2
Comment 1 Dick Marinus 2010-01-13 20:37:30 UTC
Created attachment 19583 [details]
rmake.log.gz
Comment 2 Andrew Pinski 2010-01-13 20:38:55 UTC
>/tmp/ccNahovA.s:497: Error: symbol `pread64' is already defined

This is a bug in the glibc headers you are using.  I wonder why they are not being fixed up by fixincludes.
Comment 3 Dick Marinus 2010-01-16 10:50:05 UTC
What can I do to fix this bug? I can't update glibc because the latest glibc doesn't compile with gcc 4.1.2. Grepping through the buildtree on pread64 returns:

i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch
i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/extc++.h.gch/O2g.gch
i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/stdc++.h.gch/O0g.gch
i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/stdc++.h.gch/O2g.gch

You can download my buildroot (chrootable) at:
http://routi.mrns.nl/~meeuw/gcc-4.tar.bz2 (183 MB compressed, 832 MB uncompressed)
Comment 4 Andrew Pinski 2010-03-13 03:14:27 UTC
Well you can do an upgrade piece wise.  Do GCC 4.4.2 build with --enable-languages=c and than build a new glibc.
Comment 5 Andrew Pinski 2012-02-04 21:00:51 UTC
No feedback in almost 2 years so closing.