Configuring with: /usr/local/src/gcc/configure --prefix=/home/Marco/Desktop/manual-test/gcc --with-sysroot=/home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root --enable-languages=c,c++ --with-gmp=/home/Marco/Desktop/compile-lin-lin/gmp-out --with-mpfr=/home/Marco/Desktop/compile-lin-lin/mpfr-out leads to a failing make: /home/Marco/Desktop/manual-test/build/./gcc/xgcc -B/home/Marco/Desktop/manual-test/build/./gcc/ -B/home/Marco/Desktop/manual-test/gcc/i686-pc-linux-gnu/bin/ -B/home/Marco/Desktop/manual-test/gcc/i686-pc-linux-gnu/lib/ -isystem /home/Marco/Desktop/manual-test/gcc/i686-pc-linux-gnu/include -isystem /home/Marco/Desktop/manual-test/gcc/i686-pc-linux-gnu/sys-include -g -fkeep-inline-functions -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I/usr/local/src/gcc/libgcc -I/usr/local/src/gcc/libgcc/. -I/usr/local/src/gcc/libgcc/../gcc -I/usr/local/src/gcc/libgcc/../include -I/usr/local/src/gcc/libgcc/../libdecnumber -I../../libdecnumber -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /usr/local/src/gcc/libgcc/../gcc/libgcc2.c \ -fvisibility=hidden -DHIDE_EXPORTS In file included from /home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root/usr/include/errno.h:36, from /usr/local/src/gcc/libgcc/../gcc/tsystem.h:96, from /usr/local/src/gcc/libgcc/../gcc/libgcc2.c:33: /home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root/usr/include/bits/errno.h:25:26: error: linux/errno.h: No such file or directory In file included from /home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root/usr/include/bits/posix1_lim.h:153, from /home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root/usr/include/limits.h:145, from /home/Marco/Desktop/manual-test/build/./gcc/include/limits.h:122, from /home/Marco/Desktop/manual-test/build/./gcc/include/syslimits.h:7, from /home/Marco/Desktop/manual-test/build/./gcc/include/limits.h:11, from /usr/local/src/gcc/libgcc/../gcc/tsystem.h:108, from /usr/local/src/gcc/libgcc/../gcc/libgcc2.c:33: /home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory make[3]: *** [_muldi3.o] Error 1 make[3]: Leaving directory `/home/Marco/Desktop/manual-test/build/i686-pc-linux-gnu/libgcc' In sysroot, I have glibc and glibc-devel. This worked with gcc 4.2 and with gcc 4.3 for every build, host, target combination except all linux-gnu. The most interesting one is a build=linux host=mingw target=linux where sysroot contains the exactly same files. This, as said already, works... This should work at least because I use --with-sysroot and not --with-build-sysroot.
Your sysroot is missing the kernel headers. There should be a dependency of glibc-devel on the appropriate package that contains them.
No, for these reasons: - It worked for 4.2 - I would agree if I used --with-build-sysroot - It works with a cross host=mingw target=linux - It doesn't work if I copy the missing headers to sysroot
Please show the output of "ls /home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin/sys-root/usr/include/linux/errno.h".
Update: It works if I copy the kernel-headers into $SYS_ROOT/usr/include instead of $SYS_ROOT/include. However, I really think this should not be required since it worked with gcc 4.2 and everything else is the same. So either it was a catastrophic build error on 4.2 and miracle that the compiled gcc worked (without linux/limits.h) or it's a regression now.
$SYS_ROOT/include has no significance. The standard include directory is /usr/include, and sysroot mirrors exactly the standard directory layout.
Subject: Re: [regression] --with-sysroot=foobar wrong handled On Sat, Feb 17, 2007 at 12:23:51PM -0000, mtrudel at gmx dot ch wrote: > However, I really think this should not be required since it worked with gcc > 4.2 and everything else is the same. So either it was a catastrophic build > error on 4.2 and miracle that the compiled gcc worked (without linux/limits.h) > or it's a regression now. Sounds more like the former. 4.2 may have been using your system's headers in this case.
Well, it makes sense that the kernel-source is also needed. But then again, we have four setups: 1. GCC 4.2, build=linux, host=linux, target=linux 2. GCC 4.2, build=linux, host=mingw, target=linux 3. GCC 4.3, build=linux, host=linux, target=linux 4. GCC 4.3, build=linux, host=mingw, target=linux For all, I specify --with-sysroot but not --with-build-sysroot and put glibc and glibc-devel into the specified sysroot. For setup 1, 2 and 4 this works. Only setup 3 is missing "linux/limits.h". So, how probable is that we have 3 builds that work although they shouldn't and only one that does the right thing by failing?
Since there seems to be an issue, I would like to reopen this bug but change the summary to: gcc 4.2/4.3: different --with-sysroot handling Although I'm not sure if it actually is a bug, I think it should be attended to. So if there are no objections until tomorrow evening, I'll reopen it (once more).