c++ - gcc with -isysroot creates include path that starts with equal sign "=" and compile fails -


i cross-compiling using codesourcery toolchain arm (arm-none-linux-gnueabi). use -isysroot point @ /usr/include folder on rootfs folder, run trouble when compiling. have verified include folder accessible.

below gcc call , output. of output removed because don't think relevant.

the preprocessor comes include path correct except "=" character starts with, , indicates path not exist. fails find header files.

how can make work?

willem@jacta:~/projects/button/debug$ arm-none-linux-gnueabi-gcc -isysroot=/home/willem/projects/rootfs -nostdinc -i=/usr/include -o0 -g3 -wall -c -fmessage-length=0 -v -o src/smd/button/button.o ../src/smd/button/button.c -h using built-in specs. target: arm-none-linux-gnueabi configured with: [ ... stuff omitted ... ] thread model: posix gcc version 4.4.1 (sourcery g++ lite 2010q1-202)  collect_gcc_options='-isysroot=/home/willem/projects/rootfs' '-nostdinc' '-i' '=/usr/include' '-o0' '-g3' '-wall' '-c' '-fmessage-length=0' '-v' '-o' 'src/smd/button/button.o' '-h' '-march=armv5te' '-funwind-tables'  /home/willem/tools/codesourcery/sourcery_g++_lite/bin/../libexec/gcc/arm-none-linux-gnueabi/4.4.1/cc1 -quiet -nostdinc -v -i =/usr/include -iprefix /home/willem/tools/codesourcery/sourcery_g++_lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/ -isysroot /home/willem/tools/codesourcery/sourcery_g++_lite/bin/../arm-none-linux-gnueabi/libc -dd -h -isysroot=/home/willem/projects/rootfs ../src/smd/button/button.c -quiet -dumpbase button.c -march=armv5te -auxbase-strip src/smd/button/button.o -g3 -o0 -wall -version -fmessage-length=0 -funwind-tables -o /tmp/ccwnd3xk.s ignoring nonexistent directory "=/home/willem/projects/rootfs/usr/include" #include "..." search starts here: #include <...> search starts here: end of search list. gnu c (sourcery g++ lite 2010q1-202) version 4.4.1 (arm-none-linux-gnueabi)     compiled gnu c version 4.3.2, gmp version 4.3.1, mpfr version 2.4.2. ggc heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 compiler executable checksum: 250bf78701f747da89e730786c466148 . ../src/smd/button/button.h ../src/smd/button/button.c:2: error: no include path in search pthread.h [ ... etc. ... ] 

thanks!

w

the answer -isysroot option not need/want "=" in path specification, correct command is:

arm-none-linux-gnueabi-gcc -isysroot /home/willem/projects/rootfs -nostdinc -i=/usr/include -o0 -g3 -wall -c -fmessage-length=0 -v -o src/smd/button/button.o ../src/smd/button/button.c -h 

cheers,

w


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -