Summary: | net-libs/libpcap-0.9.5 cross compile fails on armeb-softfloat-linux-uclibc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Karl H <karl> |
Component: | [OLD] Development | Assignee: | Gentoo Netmon project <netmon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | embedded |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | ARM | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
config.log build2.log libpcap-0.9.5.ebuild.patch libpcap-0.9.5.ebuild.patch libpcap-0.9.5.linux_v2.patch libpcap-0.9.5.ebuild.diff libpcap-0.9.5-crosscompile.patch libpcap-0.9.5-crosscompile.patch libpcap-cross-linux.patch |
Description
Karl H
2007-03-25 18:41:39 UTC
Created attachment 114400 [details]
build.log
Created attachment 114416 [details]
config.log
Fix in cvs Can you check if cross compile works now ? Rem: You must set the env variable LIBPCAP_PCAP to linux or bpf (In reply to comment #3) > Fix in cvs > Can you check if cross compile works now ? > Rem: You must set the env variable LIBPCAP_PCAP to linux or bpf > /usr/portage/net-libs/libpcap/libpcap-0.9.5.ebuild: line 28: is_crosscompile: command not found LIBPCAP_PCAP=linux xmerge -av libpcap xmerge script CBUILD=i686-pc-linux-gnu SYSROOT=/usr/armeb-softfloat-linux-uclibc ROOT=/usr/armeb-softfloat-linux-uclibc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] net-libs/libpcap-0.9.5 to /usr/armeb-softfloat-linux-uclibc/ USE="-ipv6" 0 kB Total: 1 package (1 new), Size of downloads: 0 kB Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) net-libs/libpcap-0.9.5 to /usr/armeb-softfloat-linux-uclibc/ * libpcap-0.9.5.tar.gz RMD160 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz SHA1 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz SHA256 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking libpcap-0.9.5.tar.gz ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking libpcap-0.9.5.tar.gz to /var/tmp/portage/net-libs/libpcap-0.9.5/work * Applying libpcap-0.9.3-whitespace.diff ... [ ok ] * Applying libpcap-0.8.1-fPIC.patch ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/net-libs/libpcap-0.9.5/work/libpcap-0.9.5 ... /usr/portage/net-libs/libpcap/libpcap-0.9.5.ebuild: line 28: is_crosscompile: command not found * econf: updating libpcap-0.9.5/config.guess with /usr/share/gnuconfig/config.guess * econf: updating libpcap-0.9.5/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=armeb-softfloat-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-ipv6 --build=i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking host system type... armeb-softfloat-linux-uclibc checking target system type... armeb-softfloat-linux-uclibc checking for armeb-softfloat-linux-uclibc-gcc... armeb-softfloat-linux-uclibc-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether armeb-softfloat-linux-uclibc-gcc accepts -g... yes checking for armeb-softfloat-linux-uclibc-gcc option to accept ANSI C... none needed checking gcc version... 3 checking for inline... inline checking for __attribute__... yes checking for u_int8_t using armeb-softfloat-linux-uclibc-gcc... yes checking for u_int16_t using armeb-softfloat-linux-uclibc-gcc... yes checking for u_int32_t using armeb-softfloat-linux-uclibc-gcc... yes checking how to run the C preprocessor... armeb-softfloat-linux-uclibc-gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking sys/ioccom.h usability... no checking sys/ioccom.h presence... no checking for sys/ioccom.h... no checking sys/sockio.h usability... no checking sys/sockio.h presence... no checking for sys/sockio.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for netinet/if_ether.h... yes checking for ANSI ioctl definitions... yes checking for strerror... yes checking for strlcpy... yes checking for vsnprintf... yes checking for snprintf... yes checking for library containing gethostbyname... none required checking for library containing socket... none required checking for library containing putmsg... no checking for ether_hostton... no checking if --disable-protochain option is specified... enabled configure: error: pcap type not determined when cross-compiling; use --with-pcap=... !!! Please attach the following file when filing a report to bugs.gentoo.org: !!! /var/tmp/portage/net-libs/libpcap-0.9.5/work/libpcap-0.9.5/config.log !!! ERROR: net-libs/libpcap-0.9.5 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' ebuild.sh, line 44: Called src_compile libpcap-0.9.5.ebuild, line 41: Called econf '--disable-ipv6' ebuild.sh, line 577: Called die !!! econf failed !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/var/tmp/portage/net-libs/libpcap-0.9.5/temp/build.log'. Created attachment 116842 [details]
build2.log
Fix is_crosscompile function in cvs Can you retry Thanks Created attachment 116863 [details, diff] libpcap-0.9.5.ebuild.patch still had the same original error after update. I patched the ebuild with the attached to fix the "if" and LIBPCAP_PCAP variable and now get an error: checking Linux kernel version... unknown configure: error: cannot determine linux version when cross-compiling complete command and output: LIBPCAP_PCAP="linux" xmerge -av libpcap xmerge script CBUILD=i686-pc-linux-gnu SYSROOT=/usr/armeb-softfloat-linux-uclibc ROOT=/usr/armeb-softfloat-linux-uclibc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] net-libs/libpcap-0.9.5 to /usr/armeb-softfloat-linux-uclibc/ USE="-ipv6" 0 kB Total: 1 package (1 new), Size of downloads: 0 kB Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) net-libs/libpcap-0.9.5 to /usr/armeb-softfloat-linux-uclibc/ * libpcap-0.9.5.tar.gz MD5 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz RMD160 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz SHA1 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz SHA256 ;-) ... [ ok ] * libpcap-0.9.5.tar.gz size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking libpcap-0.9.5.tar.gz ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking libpcap-0.9.5.tar.gz to /var/tmp/portage/net-libs/libpcap-0.9.5/work * Applying libpcap-0.9.3-whitespace.diff ... [ ok ] * Applying libpcap-0.8.1-fPIC.patch ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/net-libs/libpcap-0.9.5/work/libpcap-0.9.5 ... * econf: updating libpcap-0.9.5/config.guess with /usr/share/gnuconfig/config.guess * econf: updating libpcap-0.9.5/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=armeb-softfloat-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-ipv6 --with-pcap=linux --build=i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking host system type... armeb-softfloat-linux-uclibc checking target system type... armeb-softfloat-linux-uclibc checking for armeb-softfloat-linux-uclibc-gcc... armeb-softfloat-linux-uclibc-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether armeb-softfloat-linux-uclibc-gcc accepts -g... yes checking for armeb-softfloat-linux-uclibc-gcc option to accept ANSI C... none needed checking gcc version... 3 checking for inline... inline checking for __attribute__... yes checking for u_int8_t using armeb-softfloat-linux-uclibc-gcc... yes checking for u_int16_t using armeb-softfloat-linux-uclibc-gcc... yes checking for u_int32_t using armeb-softfloat-linux-uclibc-gcc... yes checking how to run the C preprocessor... armeb-softfloat-linux-uclibc-gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking sys/ioccom.h usability... no checking sys/ioccom.h presence... no checking for sys/ioccom.h... no checking sys/sockio.h usability... no checking sys/sockio.h presence... no checking for sys/sockio.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for netinet/if_ether.h... yes checking for ANSI ioctl definitions... yes checking for strerror... yes checking for strlcpy... yes checking for vsnprintf... yes checking for snprintf... yes checking for library containing gethostbyname... none required checking for library containing socket... none required checking for library containing putmsg... no checking for ether_hostton... no checking if --disable-protochain option is specified... enabled checking packet capture type... linux checking for getifaddrs... no checking if --enable-ipv6 option is specified... no checking whether to build optimizer debugging code... no checking whether to build parser debugging code... no checking Linux kernel version... unknown configure: error: cannot determine linux version when cross-compiling !!! Please attach the following file when filing a report to bugs.gentoo.org: !!! /var/tmp/portage/net-libs/libpcap-0.9.5/work/libpcap-0.9.5/config.log !!! ERROR: net-libs/libpcap-0.9.5 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' ebuild.sh, line 44: Called src_compile libpcap-0.9.5.ebuild, line 41: Called econf '--disable-ipv6' '--with-pcap=linux' ebuild.sh, line 577: Called die !!! econf failed !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/var/tmp/portage/net-libs/libpcap-0.9.5/temp/build.log'. Now to set the kernel version... The target kernel is in $ROOT/usr/src/linux In my case ROOT=/usr/armeb-softfloat-linux-uclibc libpcap should not be poking around in the kernel source I think we can remove the test from the configure script. The only use that I see in the script, is just to check that the linux kernel version is greater than 2 Created attachment 116980 [details, diff]
libpcap-0.9.5.ebuild.patch
ebuild with patch for configure to only work on linux v2 kernels and newer
Created attachment 116982 [details, diff]
libpcap-0.9.5.linux_v2.patch
patch "configure" for linux v2
Created attachment 117723 [details, diff]
libpcap-0.9.5.ebuild.diff
Can you try with this patch ?
Created attachment 117724 [details, diff]
libpcap-0.9.5-crosscompile.patch
It compiles cleanly now with the latest patches. Gives the nice warning: checking whether to build parser debugging code... no checking Linux kernel version... unknown configure: WARNING: cannot determine linux version when cross-compiling ./configure: line 6204: test: unknown: integer expression expected checking if if_packet.h has tpacket_stats defined... yes checking whether we have /proc/net/dev... yes Created attachment 117893 [details, diff]
libpcap-0.9.5-crosscompile.patch
And with this one, is there always the same error on line 6204 ?
Created attachment 117986 [details, diff]
libpcap-cross-linux.patch
here is the patch you want to use and send upstream
note ... that'll also allow you to drop the --with-pcap crap in the ebuild for cross-compilers Cédric and SpanKY both of those patches work. Fix in cvs (with SpanKY patch) Thanks |