[Bug other/16838] libiberty "link test vs. GCC_NO_EXECUTABLES" problem during sun cross
--- Comment #4 from davek at csh dot rit dot edu 2006-01-15 01:56 --- as a work-around, I was able to fix this problem by copying the config.cache from my root build directory into whatever directory was failing. On my GNU/debian system, I had to copy it to ./i686-pc-linux-gnu/libstdc++-v3/config.cache ./i686-pc-linux-gnu/libiberty/config.cache -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16838
[Bug bootstrap/25794] New: gcc won't link to new local glibc
I can't figure out how to get gcc to build using a local build of glibc. I've built and installed glibc-2.3.6 in /usr/glibc2. As I understand it, I need to make a cross-compiler in order to make gcc with the new glibc2 (nothing told me to do this, its just the only way I can kinda get it to work) Here's my gcc-build configuration: ../gcc-4.0.2/configure --enable-languages=c,c++ --with-sysroot=/usr/glibc2 --with-newlib and my build command: make BOOT_CFLAGS="-Wl,--dynamic-linker=/usr/glibc2/lib/ld-linux.so.2" bootstrap4 which will make the stage1 compiler, but will fail as soon as it tries to use it -> make[2]: Leaving directory `/usr/home/davek/download/gcc-build/gcc' echo timestamp > stage1_copy echo stage2_build > stage_last make CC=" stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/" CC_FOR_BUIL D=" stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/" \ STAGE_PREFIX=stage1/ \ ADAFLAGS="" CFLAGS="-O2 -g -fomit-frame-pointer" LDFLAGS="" WARN_CFLAGS ="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-pedantic -Wno-long-long -Wno-variadic-macro s -Wold-style-definition " libdir=/usr/local/lib LANGUAGES="c gcov gcov-dump c++ " MAKEINFO="/home/davek/download/gcc-4.0.2/missing makeinfo --split-size=500 " MAKEINFOFLAGS="--no-split" MAKEOVERRIDES= OUTPUT_OPTION="-o \$@" \ CFLAGS="-O2 -g -fomit-frame-pointer" WERROR="" make[2]: Entering directory `/usr/home/davek/download/gcc-build/gcc' stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-fra me-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pro totypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.0.2/gcc -I../../gcc- 4.0.2/gcc/build -I../../gcc-4.0.2/gcc/../include -I../../gcc-4.0.2/gcc/../libcpp /include -o build/genmodes.o ../../gcc-4.0.2/gcc/genmodes.c stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -c -O2 -g -fomit-fra me-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pro totypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.0.2/gcc -I../../gcc- 4.0.2/gcc/build -I../../gcc-4.0.2/gcc/../include -I../../gcc-4.0.2/gcc/../libcpp /include -o build/errors.o ../../gcc-4.0.2/gcc/errors.c stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -O2 -g -fomit-frame- pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-protot ypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -D HAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o ../build-i686-pc-linux-gnu/libiberty/libiberty. a /usr/glibc2/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]' /usr/glibc2/lib/libc.so.6: undefined reference to [EMAIL PROTECTED] IVATE' /usr/glibc2/lib/libc.so.6: undefined reference to [EMAIL PROTECTED] ' /usr/glibc2/lib/libc.so.6: undefined reference to [EMAIL PROTECTED] TE' /usr/glibc2/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]' collect2: ld returned 1 exit status make[2]: *** [build/genmodes] Error 1 make[2]: Leaving directory `/usr/home/davek/download/gcc-build/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/usr/home/davek/download/gcc-build/gcc' make: *** [bootstrap4] Error 2 It's still linking against /lib/ld-linux.so.2, which I don't think it should be. I'm sure its a magic variable I'm not setting somewhere. In short: how do you compile gcc with a local build of glibc? -- Summary: gcc won't link to new local glibc Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davek at csh dot rit dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
[Bug bootstrap/25794] gcc won't link to new local glibc
--- Comment #2 from davek at csh dot rit dot edu 2006-01-16 02:21 --- still won't compile stage one compiler still linked to old glibc -> $ which ldd /usr/glibc2/bin/ldd $ ldd gcc/stage1/xgcc libc.so.6 => /lib/libc.so.6 (0x40019000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000) I used this build command this time, with BOOT_LDFLAGS: make BOOT_LDFLAGS="-Wl,--dynamic-linker=/usr/glibc2/lib/ld-linux.so.2" bootstrap4 it fails with the same error as before. But the extra linking flags were added to the command line -> stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -O2 -g -fomit-frame- pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-protot ypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -D HAVE_CONFIG_H -DGENERATOR_FILE -Wl,--dynamic-linker=/usr/glibc2/lib/ld-linux.so. 2 -o build/genmodes \ build/genmodes.o build/errors.o ../build-i686-pc-linux-gnu/libiberty/libiberty. a /usr/glibc2/lib/libc.so.6: undefined reference to [EMAIL PROTECTED]' ... ... -- davek at csh dot rit dot edu changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
[Bug bootstrap/25794] gcc won't link to new local glibc
--- Comment #4 from davek at csh dot rit dot edu 2006-01-16 02:36 --- so GCC won't compile with glibc-2.3.6. thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
[Bug bootstrap/25794] gcc won't link to new local glibc
--- Comment #5 from davek at csh dot rit dot edu 2006-01-16 20:48 --- still can't get it to work. I've tried at least 50 different configurations and had to wait an hour to see if each one would work. It always exits with undefined references to symbols in /usr/glibc2/lib/ld-2.3.6.so. I don't understand how this is not a bug. GCC WILL NOT COMPILE WITH MY GLIBC. Perhaps if someone told me how I should be doing that, I would know if the problem is with my GCC config or my glibc config. Glibc compiled, checked, and installed just fine. Not so with gcc. Sounds to me like a its a problem with gcc. I know since this is closed, probably no one will see this. But if anyone does, please please help me. I've been stuck on square one for weeks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
[Bug bootstrap/25794] gcc won't link to new local glibc
--- Comment #6 from davek at csh dot rit dot edu 2006-01-17 06:20 --- I've gotten the compile to continue by cross compiling and altering the Makefile between stage 1 and 2 (or wherever it errored). $ diff -u orig/gcc-4.0.2/gcc/Makefile.in gcc-4.0.2/gcc/Makefile.in --- orig/gcc-4.0.2/gcc/Makefile.in Fri Sep 9 17:05:39 2005 +++ gcc-4.0.2/gcc/Makefile.in Mon Jan 16 19:49:17 2006 @@ -623,7 +623,7 @@ BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE # Native linker and preprocessor flags. For x-fragment overrides. -BUILD_LDFLAGS=$(LDFLAGS) +BUILD_LDFLAGS=$(LDFLAGS) -Wl,--dynamic-linker,/usr/glibc2/lib/ld-linux.so.2 -Wl,-rpath,/usr/glibc2/lib BUILD_CPPFLAGS=$(ALL_CPPFLAGS) # Actual name to use when installing a native compiler. @@ -1163,8 +1163,9 @@ # and CC is `gcc'. It is renamed to `gcc' when it is installed. xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \ version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \ + $(CC) -Wl,--dynamic-linker,/usr/glibc2/lib/ld-linux.so.2 $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \ prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) +# -Wl,-rpath,/usr/glibc2/lib # cpp is to cpp0 as gcc is to cc1. # The only difference from xgcc is that it's linked with cppspec.o I had to comment out rpath part when it gave linker errors. Then continued until another set of errors and then took out the comment. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
[Bug bootstrap/25794] gcc won't link to new local glibc
--- Comment #7 from davek at csh dot rit dot edu 2006-01-17 07:41 --- a better patch -> --- orig/gcc-4.0.2/gcc/Makefile.in Fri Sep 9 17:05:39 2005 +++ gcc-4.0.2/gcc/Makefile.in Mon Jan 16 21:40:20 2006 @@ -73,6 +73,9 @@ srcdir = @srcdir@ docdir = @srcdir@/doc +# hack +BOOT_LDFLAGS = -Wl,--dynamic-linker,/usr/glibc2/lib/ld-linux.so.2 -Wl,-rpath,/usr/glibc2/lib + # Directory where sources are, absolute. abs_srcdir = @abs_srcdir@ abs_docdir = @abs_srcdir@/doc I can't define it on the makefile line, because I have to change it throughout the build. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
[Bug bootstrap/25794] gcc won't link to new local glibc
--- Comment #8 from davek at csh dot rit dot edu 2006-01-17 07:45 --- I see gcc-bugs@gcc.gnu.org in the cc list, and I can't remove it. I was just using this as my notebook for this problem. I thought no email was sent on resolved bugs, but now I see I'm getting emails. Who's getting these posts in emails? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794