# Crossdev: Fehler beim Installieren von dev-libs/mpc

## astaecker

Moin,

ich habe gestern meinen Raspberry Pi bekommen. Habe entsprechend Gentoo Wiki dort auch Gentoo installiert bekommen. Da die Rechenpower ja begrenzt ist, kann man ja mittels distcc nachhelfen oder - soweit ich das Embedded Handbuch richtig verstanden habe - auf einem anderen Rechner die Pakete kompilieren und dann übertragen. Zweiteres habe ich versucht. Die Cross-Toolchain (crossdev -S armv6j-hardfloat-linux-gnueabi) ist erfolgreich eingerichtet und etliche weitere Pakete damit kompiliert. Bei dev-libs/mpc kommt dann aber ein Fehler:

```

skycaptain arne # emerge-armv6j-hardfloat-linux-gnueabi --oneshot dev-libs/mpc

These are the packages that would be merged, in order:

Calculating dependencies  ... done!

[ebuild  N     ] dev-libs/mpc-0.8.2 to /usr/armv6j-hardfloat-linux-gnueabi/ 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-libs/mpc-0.8.2 for /usr/armv6j-hardfloat-linux-gnueabi/

 * mpc-0.8.2.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                [ ok ]

>>> Unpacking source...

>>> Unpacking mpc-0.8.2.tar.gz to /usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work

 * Running elibtoolize in: mpc-0.8.2/

 *   Applying portage/2.2 patch ...

 *   Applying sed/1.5.6 patch ...

 *   Applying cross/link-ROOT patch ...

 *   Applying as-needed/2.2.6 patch ...

>>> Source unpacked in /usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work

>>> Compiling source in /usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work/mpc-0.8.2 ...

 * econf: updating mpc-0.8.2/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating mpc-0.8.2/config.sub with /usr/share/gnuconfig/config.sub

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=armv6j-hardfloat-linux-gnueabi --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib

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

configure: loading site script /usr/share/crossdev/include/site/arm-linux-gnu

configure: loading site script /usr/share/crossdev/include/site/linux-gnueabi

configure: loading site script /usr/share/crossdev/include/site/arm-linux-gnueabi

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for armv6j-hardfloat-linux-gnueabi-strip... armv6j-hardfloat-linux-gnueabi-strip

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether to enable maintainer-specific portions of Makefiles... no

checking build system type... x86_64-pc-linux-gnu

checking host system type... armv6j-hardfloat-linux-gnueabi

checking for armv6j-hardfloat-linux-gnueabi-gcc... armv6j-hardfloat-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 armv6j-hardfloat-linux-gnueabi-gcc accepts -g... yes

checking for armv6j-hardfloat-linux-gnueabi-gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of armv6j-hardfloat-linux-gnueabi-gcc... gcc3

checking how to run the C preprocessor... armv6j-hardfloat-linux-gnueabi-gcc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for a sed that does not truncate output... /bin/sed

checking for a sed that does not truncate output... (cached) /bin/sed

checking for fgrep... /bin/grep -F

checking for ld used by armv6j-hardfloat-linux-gnueabi-gcc... /usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/ld

checking if the linker (/usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/armv6j-hardfloat-linux-gnueabi-nm -B

checking the name lister (/usr/bin/armv6j-hardfloat-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 /usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/ld option to reload object files... -r

checking for armv6j-hardfloat-linux-gnueabi-objdump... armv6j-hardfloat-linux-gnueabi-objdump

checking how to recognize dependent libraries... pass_all

checking for armv6j-hardfloat-linux-gnueabi-ar... armv6j-hardfloat-linux-gnueabi-ar

checking for armv6j-hardfloat-linux-gnueabi-strip... (cached) armv6j-hardfloat-linux-gnueabi-strip

checking for armv6j-hardfloat-linux-gnueabi-ranlib... armv6j-hardfloat-linux-gnueabi-ranlib

checking command to parse /usr/bin/armv6j-hardfloat-linux-gnueabi-nm -B output from armv6j-hardfloat-linux-gnueabi-gcc object... ok

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 for dlfcn.h... yes

checking for objdir... .libs

checking if armv6j-hardfloat-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no

checking for armv6j-hardfloat-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC

checking if armv6j-hardfloat-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes

checking if armv6j-hardfloat-linux-gnueabi-gcc static flag -static works... yes

checking if armv6j-hardfloat-linux-gnueabi-gcc supports -c -o file.o... yes

checking if armv6j-hardfloat-linux-gnueabi-gcc supports -c -o file.o... (cached) yes

checking whether the armv6j-hardfloat-linux-gnueabi-gcc linker (/usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/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... yes

checking for __gmpz_init in -lgmp... yes

checking for MPFR... yes

checking for recent GMP... yes

checking for recent MPFR... yes

checking for ANSI C header files... (cached) yes

checking locale.h usability... yes

checking locale.h presence... yes

checking for locale.h... yes

checking for inttypes.h... (cached) yes

checking limits.h usability... yes

checking limits.h presence... yes

checking for limits.h... yes

checking for unistd.h... (cached) yes

checking sys/time.h usability... yes

checking sys/time.h presence... yes

checking for sys/time.h... yes

checking for an ANSI C-conforming const... yes

checking for size_t... yes

checking whether time.h and sys/time.h may both be included... yes

checking for gettimeofday... yes

checking for localeconv... yes

checking for setlocale... yes

checking for dup... yes

checking for dup2... yes

checking for fileno... yes

configure: creating ./config.status

config.status: creating Makefile

config.status: creating src/Makefile

config.status: creating tests/Makefile

config.status: creating doc/Makefile

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

make -j3 

make  all-recursive

make[1]: Entering directory `/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work/mpc-0.8.2'

Making all in src

make[2]: Entering directory `/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work/mpc-0.8.2/src'

...

libtool: link: armv6j-hardfloat-linux-gnueabi-gcc -shared  .libs/abs.o .libs/acos.o .libs/acosh.o .libs/add.o .libs/add_fr.o .libs/add_ui.o .libs/arg.o .libs/asin.o .libs/asinh.o .libs/atan.o .libs/atanh.o .libs/clear.o .libs/cmp.o .libs/cmp_si_si.o .libs/conj.o .libs/cos.o .libs/cosh.o .libs/div_2exp.o .libs/div.o .libs/div_fr.o .libs/div_ui.o .libs/exp.o .libs/fr_div.o .libs/fr_sub.o .libs/get_prec2.o .libs/get_prec.o .libs/get_str.o .libs/get_version.o .libs/imag.o .libs/init2.o .libs/init3.o .libs/inp_str.o .libs/log.o .libs/mem.o .libs/mul_2exp.o .libs/mul.o .libs/mul_fr.o .libs/mul_i.o .libs/mul_si.o .libs/mul_ui.o .libs/neg.o .libs/norm.o .libs/out_str.o .libs/pow.o .libs/pow_fr.o .libs/pow_ld.o .libs/pow_d.o .libs/pow_si.o .libs/pow_ui.o .libs/pow_z.o .libs/proj.o .libs/real.o .libs/urandom.o .libs/set.o .libs/set_prec.o .libs/set_str.o .libs/set_x.o .libs/set_x_x.o .libs/sin.o .libs/sinh.o .libs/sqr.o .libs/sqrt.o .libs/strtoc.o .libs/sub.o .libs/sub_fr.o .libs/sub_ui.o .libs/swap.o .libs/tan.o .libs/tanh.o .libs/uceil_log2.o .libs/ui_div.o .libs/ui_ui_sub.o   -Wl,--as-needed /usr/lib/libmpfr.so -lgmp  -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Wl,-O1   -Wl,-soname -Wl,libmpc.so.2 -o .libs/libmpc.so.2.0.0

/usr/lib/libmpfr.so: file not recognized: File format not recognized

collect2: ld returned 1 exit status

make[2]: *** [libmpc.la] Fehler 1

make[2]: Leaving directory `/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work/mpc-0.8.2/src'

make[1]: *** [all-recursive] Fehler 1

make[1]: Leaving directory `/usr/armv6j-hardfloat-linux-gnueabi/tmp/portage/dev-libs/mpc-0.8.2/work/mpc-0.8.2'

make: *** [all] Fehler 2

emake failed
```

Soweit ich es verstehe, versucht er mpfr zu linken, erkennt aber nicht dessen Dateiformat. Das macht Sinn, wenn er das mpfr von meinem amd64 Rechner verwendet anstatt das  mpfr vom cross compile.

Aber warum macht er das nicht? Kann ich mittels crossdev also kein System auf einen anderen Rechner kompilieren? Kenne mich in Embedded-Sachen nicht wirklich aus.

----------

