This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Bryan, Arnaud, et al -- >>> On Tue, Oct 19, 2010 at 10:52 AM, Bryan Hundven <bryanhundven@gmail.com> wrote: >>>> As I have mentioned, I think that creating and removing the >>>> ${CT_SYSROOT_DIR}/include symlink is also wrong and suggestive that we >>>> are forced to create this because we are making a mistake somewhere >>>> else (binutils? gcc_static/shared_core? libc-startfiles?) and we >>>> should fix that problem first. I believe that if we can solve that >>>> problem, the c++ headers issue will go away. >> On Tue, Oct 19, 2010 at 3:19 PM, Anthony Foiani <anthony.foiani@gmail.com> wrote: >>> Given that someone (Arnaud?) already traced through the build log and >>> saw the eglibc "fenv.h" get overwritten by the GCC version, it seems >>> most likely to be somewhere in the GCC portion of things, presumably >>> when the final compiler is installed. >>> >>> I know I got confused when I was looking at the issue before: he's >>> correct that the host include files need not (and, arguably, should >>> not) be present in the target sys-root, but I know we do need to have >>> the host libraries (libgcc, libstdc++) in the target sys-root. On Tue, Oct 19, 2010 at 2:49 PM, Bryan Hundven <bryanhundven@gmail.com> wrote: > So the ${CT_PREFIX_DIR}/${CT_TARGET}/include is created by the final > g++, and we want these headers in the sysroot? I think it's the other way around, actually; the final gcc creates the necessary include files in the sysroot; using a symlink to expose the sys-root's "/include" directory as a sibling of the ${CT_PREFIX}/bin directory (where the final cross-compiler lives) seems to fix things. > The host include files are the ones installed by the "host" > gcc_core_{static,shared} toolchains, right? I *believe* so. (But if I spend much time looking at this stuff, I begin to think I'm going to be eaten by a grue...) For whatever it's worth, I've backed out the "with-gxx-includes..." bit from my local copy of ct-ng, after which the fenv.h examples now compile (both C and C++). But it looks like the includes for libstdc++ have gone missing again: [tony@whisper tmp]$ strace -f -tt /opt/cross/platforms/foo/xtools/bin/powerpc-e500v2-linux-gnuspe-g++ cstddef_check.cpp -o cstddef_check 2>&1 | grep cstddef 23:49:34.477185 execve("/opt/cross/platforms/foo/xtools/bin/powerpc-e500v2-linux-gnuspe-g++", ["/opt/cross/platforms/foo/"..., "cstddef_check.cpp", "-o", "cstddef_check"], [/* 68 vars */]) = 0 23:49:34.485089 access("cstddef_check.cpp", F_OK) = 0 [pid 12606] 23:49:34.487424 execve("/opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/cc1plus", ["/opt/cross/platforms/foo/"..., "-quiet", "-D_GNU_SOURCE", "-D__unix__", "-D__gnu_linux__", "-D__linux__", "-Dunix", "-D__unix", "-Dlinux", "-D__linux", "-Asystem=linux", "-Asystem=unix", "-Asystem=posix", "cstddef_check.cpp", "-quiet", "-dumpbase", ...], [/* 71 vars */]) = 0 [pid 12606] 23:49:34.499498 stat("cstddef_check.cpp.gch", 0x7fff0a32ad40) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.499582 open("cstddef_check.cpp", O_RDONLY|O_NOCTTY) = 3 [pid 12606] 23:49:34.499745 read(3, "#include <cstddef>\n\nint main( in"..., 75) = 75 [pid 12606] 23:49:34.509186 stat("/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/include/cstddef.gch", 0x7fff0a32aa60) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.509263 open("/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/include/cstddef", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.509327 stat("/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/include-fixed/cstddef.gch", 0x7fff0a32aa60) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.509389 open("/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/include-fixed/cstddef", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.509451 stat("/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/include/cstddef.gch", 0x7fff0a32aa60) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.509509 open("/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/include/cstddef", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory) [pid 12606] 23:49:34.509596 write(2, "cstddef_check.cpp:1:19: fatal er"..., 71cstddef_check.cpp:1:19: fatal error: cstddef: No such file or directory) = 71 [pid 12606] 23:49:34.509753 write(3, "\t.file\t\"cstddef_check.cpp\"\n\t.gnu"..., 91) = 91 [tony@whisper tmp]$ find /opt/cross/platforms/foo/xtools/ -type f -name cstddef -print /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe/sys-root/usr/include/c++/4.5.1/cstddef [tony@whisper tmp]$ /opt/cross/platforms/foo/xtools/bin/powerpc-e500v2-linux-gnuspe-g++ -o fenv_check-cpp fenv_check.cpp -v Using built-in specs. COLLECT_GCC=/opt/cross/platforms/foo/xtools/bin/powerpc-e500v2-linux-gnuspe-g++ COLLECT_LTO_WRAPPER=/opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/lto-wrapper Target: powerpc-e500v2-linux-gnuspe Configured with: /opt/cross/platforms/foo/xtools-build/src/gcc-4.5.1/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=powerpc-e500v2-linux-gnuspe --prefix=/opt/cross/platforms/foo/xtools --with-sysroot=/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root --enable-languages=c,c++ --disable-multilib --with-cpu=8548 --with-tune=8548 --with-pkgversion=crosstool-NG-333eafe07ada@20101019T195803Z --disable-sjlj-exceptions --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/opt/cross/platforms/foo/xtools-build/powerpc-e500v2-linux-gnuspe/build/static --with-mpfr=/opt/cross/platforms/foo/xtools-build/powerpc-e500v2-linux-gnuspe/build/static --with-mpc=/opt/cross/platforms/foo/xtools-build/powerpc-e500v2-linux-gnuspe/build/static --with-ppl=/opt/cross/platforms/foo/xtools-build/powerpc-e500v2-linux-gnuspe/build/static --with-cloog=/opt/cross/platforms/foo/xtools-build/powerpc-e500v2-linux-gnuspe/build/static --with-libelf=/opt/cross/platforms/foo/xtools-build/powerpc-e500v2-linux-gnuspe/build/static --enable-threads=posix --with-local-prefix=/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root --disable-nls --enable-symvers=gnu --enable-c99 --enable-long-long --enable-e500_double Thread model: posix gcc version 4.5.1 (crosstool-NG-333eafe07ada@20101019T195803Z) COLLECT_GCC_OPTIONS='-o' 'fenv_check-cpp' '-v' '-shared-libgcc' '-mtune=8548' '-mcpu=8548' /opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/cc1plus -quiet -v -D_GNU_SOURCE -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix fenv_check.cpp -quiet -dumpbase fenv_check.cpp -mtune=8548 -mcpu=8548 -auxbase fenv_check -version -o /tmp/ccp68nfb.s GNU C++ (crosstool-NG-333eafe07ada@20101019T195803Z) version 4.5.1 (powerpc-e500v2-linux-gnuspe) compiled by GNU C version 4.4.4 20100630 (Red Hat 4.4.4-10), GMP version 4.3.2, MPFR version 3.0.0, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include/c++/4.5.1" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include/c++/4.5.1/powerpc-e500v2-linux-gnuspe" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include/c++/4.5.1/backward" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/include" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include" #include "..." search starts here: #include <...> search starts here: /opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/include /opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/include-fixed /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/include End of search list. GNU C++ (crosstool-NG-333eafe07ada@20101019T195803Z) version 4.5.1 (powerpc-e500v2-linux-gnuspe) compiled by GNU C version 4.4.4 20100630 (Red Hat 4.4.4-10), GMP version 4.3.2, MPFR version 3.0.0, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 4e0fb82a04b3e1f39309e7e0a43c517b COLLECT_GCC_OPTIONS='-o' 'fenv_check-cpp' '-v' '-shared-libgcc' '-mtune=8548' '-mcpu=8548' /opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/bin/as -me500 -many -V -Qy -o /tmp/ccwIVrbN.o /tmp/ccp68nfb.s GNU assembler version 2.20.1 (powerpc-e500v2-linux-gnuspe) using BFD version (GNU Binutils) 2.20.1.20100303 COMPILER_PATH=/opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/:/opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/:/opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/:/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/:/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/:/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/bin/ LIBRARY_PATH=/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/:/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/lib/:/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/lib/ COLLECT_GCC_OPTIONS='-o' 'fenv_check-cpp' '-v' '-shared-libgcc' '-mtune=8548' '-mcpu=8548' /opt/cross/platforms/foo/xtools/libexec/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/collect2 --sysroot=/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root --eh-frame-hdr -V -Qy -m elf32ppclinux -dynamic-linker /lib/ld.so.1 -o fenv_check-cpp /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/lib/crt1.o /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/lib/crti.o /opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/crtbegin.o -L/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1 -L/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/lib -L/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/lib /tmp/ccwIVrbN.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/crtend.o /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/usr/lib/crtn.o GNU ld (GNU Binutils) 2.20.1.20100303 Supported emulations: elf32ppclinux elf32ppc elf32ppcsim These lines are particularly interesting: ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include/c++/4.5.1" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include/c++/4.5.1/powerpc-e500v2-linux-gnuspe" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include/c++/4.5.1/backward" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/include" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/lib/gcc/powerpc-e500v2-linux-gnuspe/4.5.1/../../../../powerpc-e500v2-linux-gnuspe/include" Collapsing those ".."s, we get: ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe/include/c++/4.5.1" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe/include/c++/4.5.1/powerpc-e500v2-linux-gnuspe" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe/include/c++/4.5.1/backward" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe//sys-root/include" ignoring nonexistent directory "/opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe/include" Recall that the libstdc++ headers got installed here: [tony@whisper tmp]$ find /opt/cross/platforms/foo/xtools/ -type f -name cstddef -print /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe/sys-root/usr/include/c++/4.5.1/cstddef So it seems that headers for libstdc++ get installed into the sysroot (where they are probably not needed), rather than in the cross-compile directory itself. Maybe it's actually a libstdc++ config issue, instead? Anyway, installing a symlink like so seems to do the trick: cd /opt/cross/platforms/foo/xtools/powerpc-e500v2-linux-gnuspe chmod u+w . ln -s sys-root/usr/include . chmod u-w And I think that's about where I was a week or two ago. :) At least I know more now! Thanks, Tony -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |