Tree/Branch: poky-contrib/master_under_test Poky Commit:5fa508a717da07ef7352e4ac385ac276156aedec Image location: http://autobuilder.pokylinux.org/nightly/20110908-5/toolchain/ Steps: ######################## $ source /opt/poky/1.0+snapshot/environment-setup-armv5te-poky-linux-gnueabi $ which ${CC} /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc $ ${CC} test.c -o testc -lm test.c:1:19: fatal error: stdio.h: No such file or directory compilation terminated. ########################## This issue also happened with powerpc toolchain but did not happen with mips toolchain. And there is no such issue in Yocto1.1 20110824 build.
You need to use all the environment vars while building, just calling $CC by hand is not enough. I just tried this and it worked as seen: $. /opt/poky/1.0+snapshot/environment-setup-armv5te-poky-linux-gnueabi $ cat test.c #include <stdio.h> int main() { return 0; } $ make test arm-poky-linux-gnueabi-gcc -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi test.c -o test $ file test test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
Thanks, Nitin. When I add the variable "CFLAGS" to the command line, it works: ########### ${CC} ${CFLAGS} test.c -o testc -lm $ echo ${CFLAGS} -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi ########### But when I compiled the iptables-1.4.11, I got a simillar error. Steps: ############# $ source /opt/poky/1.0+snapshot/environment-setup-armv5te-poky-linux-gnueabi $ echo ${CONFIGURE_FLAGS} --target=powerpc-poky-linux --host=powerpc-poky-linux --build=x86_64-linux --with-libtool-sysroot=/opt/poky/1.0+snapshot/sysroots/ppc603e-poky-linux $ cd iptables-1.4.11 $ ./configure ${CONFIGURE_FLAGS} configure: WARNING: unrecognized options: --with-libtool-sysroot configure: loading site script /opt/poky/1.0+snapshot/site-config-armv5te-poky-linux-gnueabi checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm-poky-linux-gnueabi-strip... arm-poky-linux-gnueabi-strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for arm-poky-linux-gnueabi-gcc... arm-poky-linux-gnueabi-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-poky-linux-gnueabi-gcc accepts -g... yes checking for arm-poky-linux-gnueabi-gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of arm-poky-linux-gnueabi-gcc... gcc3 checking whether arm-poky-linux-gnueabi-gcc and cc understand -c and -o together... yes checking build system type... x86_64-pc-linux-gnu checking host system type... arm-poky-linux-gnueabi checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by arm-poky-linux-gnueabi-gcc... /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld checking if the linker (/opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-nm -B checking the name lister (/opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld option to reload object files... -r checking for arm-poky-linux-gnueabi-objdump... arm-poky-linux-gnueabi-objdump checking how to recognize dependent libraries... pass_all checking for arm-poky-linux-gnueabi-ar... arm-poky-linux-gnueabi-ar checking for arm-poky-linux-gnueabi-strip... (cached) arm-poky-linux-gnueabi-strip checking for arm-poky-linux-gnueabi-ranlib... arm-poky-linux-gnueabi-ranlib checking command to parse /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-nm -B output from arm-poky-linux-gnueabi-gcc object... ok checking how to run the C preprocessor... arm-poky-linux-gnueabi-gcc -E checking for ANSI C header files... (cached) yes checking for sys/types.h... (cached) yes checking for sys/stat.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for memory.h... (cached) yes checking for strings.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for unistd.h... (cached) yes checking for dlfcn.h... (cached) yes checking for objdir... .libs checking if arm-poky-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no checking for arm-poky-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC checking if arm-poky-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes checking if arm-poky-linux-gnueabi-gcc static flag -static works... yes checking if arm-poky-linux-gnueabi-gcc supports -c -o file.o... yes checking if arm-poky-linux-gnueabi-gcc supports -c -o file.o... (cached) yes checking whether the arm-poky-linux-gnueabi-gcc linker (/opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking whether the linker accepts -Wl,--no-as-needed... yes checking linux/dccp.h usability... yes checking linux/dccp.h presence... yes checking for linux/dccp.h... yes checking linux/ip_vs.h usability... yes checking linux/ip_vs.h presence... yes checking for linux/ip_vs.h... yes checking for arm-poky-linux-gnueabi-pkg-config... no checking for pkg-config... /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/pkg-config configure: WARNING: using cross tools not prefixed with host triplet checking pkg-config is at least version 0.9.0... yes checking for libnfnetlink... no configure: creating ./config.status config.status: creating Makefile config.status: creating extensions/GNUmakefile config.status: creating include/Makefile config.status: creating libipq/Makefile config.status: creating utils/Makefile config.status: creating include/xtables.h config.status: creating include/iptables/internal.h config.status: creating libiptc.pc config.status: creating xtables.pc config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands configure: WARNING: unrecognized options: --with-libtool-sysroot $ make make all-recursive make[1]: Entering directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11' Making all in extensions make[2]: Entering directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11/extensions' GEN initext.c CC initext.o AR libext.a GEN initext4.c CC initext4.o AR libext4.a GEN initext6.c CC initext6.o AR libext6.a GEN matches4.man + ./libipt_addrtype.man + ./libipt_ah.man + ./libxt_cluster.man + ./libxt_comment.man + ./libxt_connbytes.man + ./libxt_connlimit.man + ./libxt_connmark.man + ./libxt_conntrack.man + ./libxt_cpu.man + ./libxt_dccp.man + ./libxt_dscp.man + ./libipt_ecn.man + ./libxt_esp.man + ./libxt_hashlimit.man + ./libxt_helper.man + ./libipt_icmp.man + ./libxt_iprange.man + ./libxt_ipvs.man + ./libxt_length.man + ./libxt_limit.man + ./libxt_mac.man + ./libxt_mark.man + ./libxt_multiport.man + ./libxt_osf.man + ./libxt_owner.man + ./libxt_physdev.man + ./libxt_pkttype.man + ./libxt_policy.man + ./libxt_quota.man + ./libxt_rateest.man + ./libipt_realm.man + ./libxt_recent.man + ./libxt_sctp.man + ./libxt_set.man + ./libxt_socket.man + ./libxt_state.man + ./libxt_statistic.man + ./libxt_string.man + ./libxt_tcp.man + ./libxt_tcpmss.man + ./libxt_time.man + ./libxt_tos.man + ./libipt_ttl.man + ./libxt_u32.man + ./libxt_udp.man + ./libipt_unclean.man GEN matches6.man + ./libip6t_ah.man + ./libxt_cluster.man + ./libxt_comment.man + ./libxt_connbytes.man + ./libxt_connlimit.man + ./libxt_connmark.man + ./libxt_conntrack.man + ./libxt_cpu.man + ./libxt_dccp.man + ./libxt_dscp.man + ./libip6t_dst.man + ./libxt_esp.man + ./libip6t_eui64.man + ./libip6t_frag.man + ./libxt_hashlimit.man + ./libip6t_hbh.man + ./libxt_helper.man + ./libip6t_hl.man + ./libip6t_icmp6.man + ./libxt_iprange.man + ./libip6t_ipv6header.man + ./libxt_ipvs.man + ./libxt_length.man + ./libxt_limit.man + ./libxt_mac.man + ./libxt_mark.man + ./libip6t_mh.man + ./libxt_multiport.man + ./libxt_owner.man + ./libxt_physdev.man + ./libxt_pkttype.man + ./libxt_policy.man + ./libxt_quota.man + ./libxt_rateest.man + ./libxt_recent.man + ./libip6t_rt.man + ./libxt_sctp.man + ./libxt_set.man + ./libxt_socket.man + ./libxt_state.man + ./libxt_statistic.man + ./libxt_string.man + ./libxt_tcp.man + ./libxt_tcpmss.man + ./libxt_time.man + ./libxt_tos.man + ./libxt_u32.man + ./libxt_udp.man GEN targets4.man + ./libxt_AUDIT.man + ./libxt_CHECKSUM.man + ./libxt_CLASSIFY.man + ./libipt_CLUSTERIP.man + ./libxt_CONNMARK.man + ./libxt_CONNSECMARK.man + ./libxt_CT.man + ./libipt_DNAT.man + ./libxt_DSCP.man + ./libipt_ECN.man + ./libxt_IDLETIMER.man + ./libipt_LOG.man + ./libxt_MARK.man + ./libipt_MASQUERADE.man + ./libipt_MIRROR.man + ./libipt_NETMAP.man + ./libxt_NFLOG.man + ./libxt_NFQUEUE.man + ./libxt_NOTRACK.man + ./libxt_RATEEST.man + ./libipt_REDIRECT.man + ./libipt_REJECT.man + ./libipt_SAME.man + ./libxt_SECMARK.man + ./libxt_SET.man + ./libipt_SNAT.man + ./libxt_TCPMSS.man + ./libxt_TCPOPTSTRIP.man + ./libxt_TEE.man + ./libxt_TOS.man + ./libxt_TPROXY.man + ./libxt_TRACE.man + ./libipt_TTL.man + ./libipt_ULOG.man GEN targets6.man + ./libxt_AUDIT.man + ./libxt_CHECKSUM.man + ./libxt_CLASSIFY.man + ./libxt_CONNMARK.man + ./libxt_CONNSECMARK.man + ./libxt_CT.man + ./libxt_DSCP.man + ./libip6t_HL.man + ./libxt_IDLETIMER.man + ./libip6t_LOG.man + ./libxt_MARK.man + ./libxt_NFLOG.man + ./libxt_NFQUEUE.man + ./libxt_NOTRACK.man + ./libxt_RATEEST.man + ./libip6t_REJECT.man + ./libxt_SECMARK.man + ./libxt_SET.man + ./libxt_TCPMSS.man + ./libxt_TCPOPTSTRIP.man + ./libxt_TEE.man + ./libxt_TOS.man + ./libxt_TPROXY.man + ./libxt_TRACE.man CC libxt_AUDIT.oo CCLD libxt_AUDIT.so CC libxt_CHECKSUM.oo CCLD libxt_CHECKSUM.so CC libxt_CLASSIFY.oo CCLD libxt_CLASSIFY.so CC libxt_CONNMARK.oo CCLD libxt_CONNMARK.so CC libxt_CONNSECMARK.oo CCLD libxt_CONNSECMARK.so CC libxt_CT.oo CCLD libxt_CT.so CC libxt_DSCP.oo CCLD libxt_DSCP.so CC libxt_IDLETIMER.oo CCLD libxt_IDLETIMER.so CC libxt_LED.oo CCLD libxt_LED.so CC libxt_MARK.oo CCLD libxt_MARK.so CC libxt_NFLOG.oo CCLD libxt_NFLOG.so CC libxt_NFQUEUE.oo CCLD libxt_NFQUEUE.so CC libxt_NOTRACK.oo CCLD libxt_NOTRACK.so CC libxt_RATEEST.oo CCLD libxt_RATEEST.so CC libxt_SECMARK.oo CCLD libxt_SECMARK.so CC libxt_SET.oo CCLD libxt_SET.so CC libxt_TCPMSS.oo CCLD libxt_TCPMSS.so CC libxt_TCPOPTSTRIP.oo CCLD libxt_TCPOPTSTRIP.so CC libxt_TEE.oo CCLD libxt_TEE.so CC libxt_TOS.oo CCLD libxt_TOS.so CC libxt_TPROXY.oo CCLD libxt_TPROXY.so CC libxt_TRACE.oo CCLD libxt_TRACE.so CC libxt_cluster.oo CCLD libxt_cluster.so CC libxt_comment.oo CCLD libxt_comment.so CC libxt_connbytes.oo CCLD libxt_connbytes.so CC libxt_connlimit.oo CCLD libxt_connlimit.so CC libxt_connmark.oo CCLD libxt_connmark.so CC libxt_conntrack.oo CCLD libxt_conntrack.so CC libxt_cpu.oo CCLD libxt_cpu.so CC libxt_dccp.oo CCLD libxt_dccp.so CC libxt_devgroup.oo CCLD libxt_devgroup.so CC libxt_dscp.oo CCLD libxt_dscp.so CC libxt_esp.oo CCLD libxt_esp.so CC libxt_hashlimit.oo CCLD libxt_hashlimit.so CC libxt_helper.oo CCLD libxt_helper.so CC libxt_iprange.oo CCLD libxt_iprange.so CC libxt_ipvs.oo CCLD libxt_ipvs.so CC libxt_length.oo CCLD libxt_length.so CC libxt_limit.oo CCLD libxt_limit.so CC libxt_mac.oo CCLD libxt_mac.so CC libxt_mark.oo CCLD libxt_mark.so CC libxt_multiport.oo CCLD libxt_multiport.so CC libxt_osf.oo CCLD libxt_osf.so CC libxt_owner.oo CCLD libxt_owner.so CC libxt_physdev.oo CCLD libxt_physdev.so CC libxt_pkttype.oo CCLD libxt_pkttype.so CC libxt_policy.oo CCLD libxt_policy.so CC libxt_quota.oo CCLD libxt_quota.so CC libxt_rateest.oo CCLD libxt_rateest.so CC libxt_recent.oo CCLD libxt_recent.so CC libxt_sctp.oo CCLD libxt_sctp.so CC libxt_set.oo CCLD libxt_set.so CC libxt_socket.oo CCLD libxt_socket.so CC libxt_standard.oo CCLD libxt_standard.so CC libxt_state.oo CCLD libxt_state.so CC libxt_statistic.oo CCLD libxt_statistic.so CC libxt_string.oo CCLD libxt_string.so CC libxt_tcp.oo CCLD libxt_tcp.so CC libxt_tcpmss.oo CCLD libxt_tcpmss.so CC libxt_time.oo CCLD libxt_time.so CC libxt_tos.oo CCLD libxt_tos.so CC libxt_u32.oo CCLD libxt_u32.so CC libxt_udp.oo CCLD libxt_udp.so CC libipt_CLUSTERIP.oo CCLD libipt_CLUSTERIP.so CC libipt_DNAT.oo CCLD libipt_DNAT.so CC libipt_ECN.oo CCLD libipt_ECN.so CC libipt_LOG.oo CCLD libipt_LOG.so CC libipt_MASQUERADE.oo CCLD libipt_MASQUERADE.so CC libipt_MIRROR.oo CCLD libipt_MIRROR.so CC libipt_NETMAP.oo CCLD libipt_NETMAP.so CC libipt_REDIRECT.oo CCLD libipt_REDIRECT.so CC libipt_REJECT.oo CCLD libipt_REJECT.so CC libipt_SAME.oo CCLD libipt_SAME.so CC libipt_SNAT.oo CCLD libipt_SNAT.so CC libipt_TTL.oo CCLD libipt_TTL.so CC libipt_ULOG.oo CCLD libipt_ULOG.so CC libipt_addrtype.oo CCLD libipt_addrtype.so CC libipt_ah.oo CCLD libipt_ah.so CC libipt_ecn.oo CCLD libipt_ecn.so CC libipt_icmp.oo CCLD libipt_icmp.so CC libipt_realm.oo CCLD libipt_realm.so CC libipt_ttl.oo CCLD libipt_ttl.so CC libipt_unclean.oo CCLD libipt_unclean.so CC libip6t_HL.oo CCLD libip6t_HL.so CC libip6t_LOG.oo CCLD libip6t_LOG.so CC libip6t_REJECT.oo CCLD libip6t_REJECT.so CC libip6t_ah.oo CCLD libip6t_ah.so CC libip6t_dst.oo CCLD libip6t_dst.so CC libip6t_eui64.oo CCLD libip6t_eui64.so CC libip6t_frag.oo CCLD libip6t_frag.so CC libip6t_hbh.oo CCLD libip6t_hbh.so CC libip6t_hl.oo CCLD libip6t_hl.so CC libip6t_icmp6.oo CCLD libip6t_icmp6.so CC libip6t_ipv6header.oo CCLD libip6t_ipv6header.so CC libip6t_mh.oo CCLD libip6t_mh.so CC libip6t_rt.oo CCLD libip6t_rt.so make[2]: Leaving directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11/extensions' Making all in include make[2]: Entering directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11/include' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11/include' make[2]: Entering directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11' depbase=`echo libiptc/libip4tc.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile arm-poky-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL -I./include -I./include -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -MT libiptc/libip4tc.lo -MD -MP -MF $depbase.Tpo -c -o libiptc/libip4tc.lo libiptc/libip4tc.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: arm-poky-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL -I./include -I./include -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -MT libiptc/libip4tc.lo -MD -MP -MF libiptc/.deps/libip4tc.Tpo -c libiptc/libip4tc.c -fPIC -DPIC -o libiptc/.libs/libip4tc.o In file included from libiptc/libip4tc.c:118:0: libiptc/libiptc.c: In function 'iptcc_chain_index_delete_chain': libiptc/libiptc.c:611:32: warning: variable 'index_ptr2' set but not used [-Wunused-but-set-variable] libiptc/libiptc.c: In function 'alloc_handle': libiptc/libiptc.c:1282:9: warning: variable 'len' set but not used [-Wunused-but-set-variable] /bin/sh ./libtool --tag=CC --mode=link arm-poky-linux-gnueabi-gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL -I./include -I./include -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -version-info 0:0:0 --sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi -o libiptc/libip4tc.la -rpath /usr/local/lib libiptc/libip4tc.lo libtool: link: arm-poky-linux-gnueabi-gcc -shared libiptc/.libs/libip4tc.o -march=armv5te -mno-thumb -mthumb-interwork -mtune=arm926ej-s -Wl,-soname -Wl,libip4tc.so.0 -o libiptc/.libs/libip4tc.so.0.0.0 /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find crti.o: No such file or directory /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find crtbeginS.o: No such file or directory /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find -lgcc /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find -lgcc_s /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find -lc /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find -lgcc /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find -lgcc_s /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find crtendS.o: No such file or directory /opt/poky/1.0+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.6.1/ld: cannot find crtn.o: No such file or directory collect2: ld returned 1 exit status make[2]: *** [libiptc/libip4tc.la] Error 1 make[2]: Leaving directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/zhaoyi/work/test/test-cases/sources/iptables-1.4.11' make: *** [all] Error 2 ########## This issue also happened with powerpc toolchain but did not happen with mips toolchain. And there is NO such issue in Yocto1.1 20110824 build
I am able to reproduce this issue with iptables, does iptables get built well with mips meta-toolchain ? I think this should not happen: configure: WARNING: unrecognized options: --with-libtool-sysroot
(In reply to comment #3) > I am able to reproduce this issue with iptables, does iptables get built well > with mips meta-toolchain ? > > I think this should not happen: > configure: WARNING: unrecognized options: --with-libtool-sysroot With mips toolchain, iptables can be built well. But I got the same warning when run command "configure": ####### $./configure ${CONFIGURE_FLAGS} configure: WARNING: unrecognized options: --with-libtool-sysroot ... #######
Found one clue: gcc is looking for file over here: /opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi/usr/lib/crti.o But the file is located over here: /opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi/usr/lib/crti.o And looks like this is result of multilib tune used for armv5te. other arches do not use such tune so then don't get hit by this issue. still this is preliminary finding, need to dig more. Nitin
Maybe you should regenerate the configure script: $ libtoolize --automake $ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal/ [-I <dir containing your project specific m4 macros>] $ autoconf $ autoheader $ automake -a $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=<sysroot-dir>
This is working: libtoolize --automake autoreconf ./configure --target=armv5te-poky-linux-gnueabi --host=armv5te-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/opt/poky/1.0+snapshot/sysroots/armv5te-poky-linux-gnueabi make
This works too: libtoolize --automake ./configure $CONFIGURE_FLAGS make So looks like issue was that the libtool scripts from the iptables sources needs updating with the "libtoolize --automake" command.