Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172210 - net-libs/libpcap-0.9.5 cross compile fails on armeb-softfloat-linux-uclibc
Summary: net-libs/libpcap-0.9.5 cross compile fails on armeb-softfloat-linux-uclibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-25 18:41 UTC by Karl H
Modified: 2007-05-05 10:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,3.63 KB, text/plain)
2007-03-25 18:42 UTC, Karl H
Details
config.log (config.log,27.78 KB, text/plain)
2007-03-25 20:35 UTC, Karl H
Details
build2.log (build.log,3.72 KB, text/plain)
2007-04-20 18:09 UTC, Karl H
Details
libpcap-0.9.5.ebuild.patch (libpcap-0.9.5.ebuild.patch,489 bytes, patch)
2007-04-20 22:55 UTC, Karl H
Details | Diff
libpcap-0.9.5.ebuild.patch (libpcap-0.9.5.ebuild.patch,295 bytes, patch)
2007-04-22 12:11 UTC, Karl H
Details | Diff
libpcap-0.9.5.linux_v2.patch (libpcap-0.9.5.linux_v2.patch,300 bytes, patch)
2007-04-22 12:13 UTC, Karl H
Details | Diff
libpcap-0.9.5.ebuild.diff (libpcap-0.9.5.ebuild.diff,402 bytes, patch)
2007-04-30 12:37 UTC, Cédric Krier
Details | Diff
libpcap-0.9.5-crosscompile.patch (libpcap-0.9.5-crosscompile.patch,573 bytes, patch)
2007-04-30 12:38 UTC, Cédric Krier
Details | Diff
libpcap-0.9.5-crosscompile.patch (libpcap-0.9.5-crosscompile.patch,644 bytes, patch)
2007-05-01 21:42 UTC, Cédric Krier
Details | Diff
libpcap-cross-linux.patch (libpcap-cross-linux.patch,949 bytes, patch)
2007-05-02 18:57 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karl H 2007-03-25 18:41:39 UTC
Cross compile fail when compiling from i686 to armeb-softfloat-linux-uclibc

Reproducible: Always

Steps to Reproduce:
1.install crossdev armeb-softfloat-linux-uclibc
2. xmerge libpcap
3.

Actual Results:  
>>> 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 --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'
  environment, line 3096:   Called src_compile
  libpcap-0.9.5.ebuild, line 27:   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'.



Expected Results:  
clean compile / install
Comment 1 Karl H 2007-03-25 18:42:29 UTC
Created attachment 114400 [details]
build.log
Comment 2 Karl H 2007-03-25 20:35:34 UTC
Created attachment 114416 [details]
config.log
Comment 3 Cédric Krier gentoo-dev 2007-04-19 20:46:46 UTC
Fix in cvs
Can you check if cross compile works now ?
Rem: You must set the env variable LIBPCAP_PCAP to linux or bpf
Comment 4 Karl H 2007-04-20 18:07:52 UTC
(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'.

Comment 5 Karl H 2007-04-20 18:09:57 UTC
Created attachment 116842 [details]
build2.log
Comment 6 Cédric Krier gentoo-dev 2007-04-20 18:26:20 UTC
Fix is_crosscompile function in cvs
Can you retry
Thanks
Comment 7 Karl H 2007-04-20 22:55:12 UTC
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'.
Comment 8 Karl H 2007-04-20 22:59:39 UTC
Now to set the kernel version...

The target kernel is in $ROOT/usr/src/linux

In my case
ROOT=/usr/armeb-softfloat-linux-uclibc
Comment 9 SpanKY gentoo-dev 2007-04-21 01:38:40 UTC
libpcap should not be poking around in the kernel source
Comment 10 Cédric Krier gentoo-dev 2007-04-21 10:18:23 UTC
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
Comment 11 Karl H 2007-04-22 12:11:36 UTC
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
Comment 12 Karl H 2007-04-22 12:13:05 UTC
Created attachment 116982 [details, diff]
libpcap-0.9.5.linux_v2.patch

patch "configure" for linux v2
Comment 13 Cédric Krier gentoo-dev 2007-04-30 12:37:26 UTC
Created attachment 117723 [details, diff]
libpcap-0.9.5.ebuild.diff

Can you try with this patch ?
Comment 14 Cédric Krier gentoo-dev 2007-04-30 12:38:44 UTC
Created attachment 117724 [details, diff]
libpcap-0.9.5-crosscompile.patch
Comment 15 Karl H 2007-05-01 20:53:42 UTC
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
Comment 16 Cédric Krier gentoo-dev 2007-05-01 21:42:40 UTC
Created attachment 117893 [details, diff]
libpcap-0.9.5-crosscompile.patch

And with this one, is there always the same error on line 6204 ?
Comment 17 SpanKY gentoo-dev 2007-05-02 18:57:08 UTC
Created attachment 117986 [details, diff]
libpcap-cross-linux.patch

here is the patch you want to use and send upstream
Comment 18 SpanKY gentoo-dev 2007-05-02 18:57:39 UTC
note ... that'll also allow you to drop the --with-pcap crap in the ebuild for cross-compilers
Comment 19 Karl H 2007-05-04 16:08:31 UTC
Cédric and SpanKY  both of those patches work. 
Comment 20 Cédric Krier gentoo-dev 2007-05-05 10:54:17 UTC
Fix in cvs (with SpanKY patch)
Thanks