View previous topic :: View next topic |
Author |
Message |
Ranvier n00b

Joined: 22 Aug 2012 Posts: 3
|
Posted: Wed Aug 22, 2012 3:00 pm Post subject: Raspberry Pi Crossdev Binary Issue |
|
|
Hello. This is my first post on the forum, but I have been lurking for quite a bit. I am a new Gentoo user, and have recently gotten Gentoo up and running on my desktop as well as my Raspberry Pi (via a disk image). I also emerged crossdev and set up a server so that my Raspberry Pi could access the compiled binaries.
The issue is that even though the Raspberry Pi is able to emerge the binaries, they do not work. I get an error when I run the program: "Command Not Found: /bin/[package I installed]"
The binary is clearly installed, and from reading around it implies that it was compiled incorrectly. When I compare the two emerges for a simple package with no dependencies (nbench) they are the exact same, USE flags and everything, except that the crossdev does not have anything following LINKFLAGS= .
Any thoughts? |
|
Back to top |
|
 |
xaviermiller Bodhisattva


Joined: 23 Jul 2004 Posts: 8724 Location: ~Brussels - Belgique
|
Posted: Wed Aug 22, 2012 4:06 pm Post subject: |
|
|
Yep. Can you run ldd on that binary. Maybe it needs /lib/ld-linux-armhf.so.3 which is not present on the distro you use.
Which distribution are you using on the Raspy? And what versions of the cross toolchain are you using? _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
 |
Ranvier n00b

Joined: 22 Aug 2012 Posts: 3
|
Posted: Wed Aug 22, 2012 9:34 pm Post subject: |
|
|
My crossdev environment is armv6j-hardfloat-linux-gnueabi. I have it set so if gets the stable ARM packages.
ldd does not work for some reason. Even though the binary is definitely there, I get:
Code: | /usr/bin/ldd: line 117: /usr/bin/nbench: No such file or directory
|
crossdev make.conf:
Code: | CHOST=armv6j-hardfloat-linux-gnueabi
CBUILD=x86_64-pc-linux-gnu
ARCH=arm
HOSTCC=x86_64-pc-linux-gnu-gcc
E_MACHINE=EM_ARM
ROOT=/usr/${CHOST}/
ACCEPT_KEYWORDS="arm"
USE="acl arm berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre pppd readline session ssl tcpd unicode zlib"
MARCH_TUNE="-march=armv6j -mfpu=vfp -mfloat-abi=hard"
CFLAGS="-O2 -pipe ${MARCH_TUNE}"
CXXFLAGS="${CFLAGS}"
FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/
ELIBC="glibc"
PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
LIBDIR_arm="lib"
LIBDIR_amd64=lib64
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PORTDIR_OVERLAY="/usr/local/portage"
MAKEOPTS="-j2"#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi" #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale" #armv5teb-softfloat-linux-gnueabi
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo/"
|
RPi make.conf:
Code: |
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"
CHOST="armv6j-hardfloat-linux-gnueabi"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
PORTAGE_BINHOST="http://xxxxxx.xxx.xxx/packages"
|
P.S. I also found this discussion about ld-linux-armhf.so.3: http://sources.redhat.com/ml/libc-ports/2012-05/msg00010.html, but I am not entirely sure what they are talking about. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55227 Location: 56N 3W
|
Posted: Wed Aug 22, 2012 10:46 pm Post subject: |
|
|
Ranvier,
Pacages build on th ePi and Packages built with crossdev call the ld by different names.
Code: | -rwxr-xr-x 1 root root 130148 Aug 17 21:36 ld-2.15.so
lrwxrwxrwx 1 root root 10 Aug 17 21:36 ld-linux-armhf.so.3 -> ld-2.15.so
lrwxrwxrwx 1 root root 19 Aug 17 21:36 ld-linux.so.3 -> ld-linux-armhf.so.3 |
You need both symlinks. Hmm, that s a mess, they should both point to the real ld-2.15.so _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
Ranvier n00b

Joined: 22 Aug 2012 Posts: 3
|
Posted: Wed Aug 22, 2012 11:30 pm Post subject: |
|
|
Awesome, that works! Thanks a ton, this problem has been bugging me for a while. |
|
Back to top |
|
 |
|