Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cross Compile x86 on amd64 usbutils fails to emerge.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Sat Jul 06, 2013 5:26 am    Post subject: Cross Compile x86 on amd64 usbutils fails to emerge. Reply with quote

I am new to cross compiling and have a x86_64 architecture system. I also have another x86 system which is ancient and slow. I am trying to cross compile the x86 binary packages on my x86_64 computer for use on my slower machine. When I run `emerge-i586-pc-linux-gnu usbutils`, it fails with an error involving the PKG_CONFIG_PATH environment variable. Here are the necessary information. Let me know if I should post more.

Log
Code:

 * Package:    sys-apps/usbutils-007
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org
 * USE:        elibc_glibc kernel_linux python_single_target_python2_7 python_targets_python2_7 userland_GNU x86 zlib
 * FEATURES:   preserve-libs sandbox
>>> Unpacking source...
>>> Unpacking usbutils-007.tar.xz to /usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work
>>> Source unpacked in /usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work
>>> Preparing source in /usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work/usbutils-007 ...
 * Applying usbutils-006-stdint.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work/usbutils-007 ...
 * econf: updating usbutils-007/usbhid-dump/auxdir/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating usbutils-007/usbhid-dump/auxdir/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=i586-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-silent-rules --disable-dependency-tracking --datarootdir=/usr/share --datadir=/usr/share/misc --disable-usbids --enable-zlib
configure: loading site script /usr/share/config.site
configure: loading site script /usr/share/crossdev/include/site/linux
configure: loading site script /usr/share/crossdev/include/site/linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i586-pc-linux-gnu-strip... i586-pc-linux-gnu-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for i586-pc-linux-gnu-gcc... i586-pc-linux-gnu-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 i586-pc-linux-gnu-gcc accepts -g... yes
checking for i586-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking dependency style of i586-pc-linux-gnu-gcc... none
checking how to run the C preprocessor... i586-pc-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking for nl_langinfo... yes
checking for iconv... yes
checking for inflateEnd in -lz... yes
checking for i586-pc-linux-gnu-pkg-config... /usr/bin/i586-pc-linux-gnu-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB... no
configure: error: Package requirements (libusb-1.0 >= 1.0.0) were not met:

No package 'libusb-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBUSB_CFLAGS
and LIBUSB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

!!! Please attach the following file when seeking support:
!!! /usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work/usbutils-007/config.log
 * ERROR: sys-apps/usbutils-007 failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *          ebuild.sh, line   93:  Called src_configure
 *        environment, line 2755:  Called econf '--datarootdir=/usr/share' '--datadir=/usr/share/misc' '--disable-usbids' '--enable-zlib'
 *   phase-helpers.sh, line  521:  Called die
 * The specific snippet of code:
 *            die "econf failed"
 *
 * If you need support, post the output of `emerge --info '=sys-apps/usbutils-007'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/usbutils-007'`.
 * The complete build log is located at '/usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/temp/build.log'.
 * The ebuild environment file is located at '/usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/temp/environment'.
 * Working directory: '/usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work/usbutils-007'
 * S: '/usr/i586-pc-linux-gnu/tmp/portage/sys-apps/usbutils-007/work/usbutils-007'


/usr/i586-pc-linux-gnu/etc/portage/make.conf
Code:

CHOST=i586-pc-linux-gnu
CBUILD=x86_64-pc-linux-gnu
ARCH=x86

HOSTCC=x86_64-pc-linux-gnu-gcc
E_MACHINE=EM_386

ROOT=/usr/${CHOST}/

ACCEPT_KEYWORDS="x86 ~x86"

USE="${ARCH} zlib bindist make-symlinks minimal"

#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi"   #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale"   #armv5teb-softfloat-linux-gnueabi

CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
# Be sure we dont overwrite pkgs from another repo..
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

ELIBC="glibc"

PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
#PORTDIR_OVERLAY="/usr/portage/local/"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PORTDIR_OVERLAY="/usr/local/portage-crossdev /usr/local/portage"
MAKEOPTS="-j5"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://gtlib.gatech.edu/pub/gentoo http://mirror.usu.edu/mirrors/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles"
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Sun Jul 07, 2013 12:04 am    Post subject: Reply with quote

Does anybody have ideas? Let me know if I should post any more details.
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4895

PostPosted: Sun Jul 07, 2013 12:25 pm    Post subject: Reply with quote

from your snip:
Code:
checking for LIBUSB... no
configure: error: Package requirements (libusb-1.0 >= 1.0.0) were not met:

No package 'libusb-1.0' found

I think you can take it from here without any problems.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Sun Jul 07, 2013 3:39 pm    Post subject: Reply with quote

Well libusb was successfully installed as a dependency to usbutils so I think there may be a problem with a variable in my make.conf file. I didn't change much in the /usr/i586-pc-linux-gnu/etc/portage/make.conf file.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2164
Location: The Peanut Gallery

PostPosted: Thu Jul 11, 2013 10:55 am    Post subject: Reply with quote

This looks suspicious: HOSTCC=x86_64-pc-linux-gnu-gcc

While you might get the odd homebrewed build-system that doesn't know CBUILD and CHOST, and thinks HOSTCC is BUILD_CC (or CC_FOR_BUILD) in general you don't want to set HOSTCC to BUILD_CC, as properly-configured build-systems may have an issue with it.

So if that kind of thing is needed (and it really shouldn't be, though it happens) then you should set it on a per-package basis with /etc/portage/package.env.

Similarly with E_MACHINE which is not a standard variable, though has perhaps less scope for confusion. Try to keep package-specific variables out of make.conf: in the longer-term this is better as you can keep an eye on the packages which aren't using the standard setup, and maybe even contribute fixes to make them work in the same manner as everything else.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum