[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linaro-cross-distro
Subject:    Cross compiling gmp package on x86_64 for foundation model
From:       Anil Singhar <anil.singhar () linaro ! org>
Date:       2013-10-22 11:17:39
Message-ID: CAMECM2JELgED6SQNedFXxeZc5yGJ--qK7Nv+XtWrLH50k_Q2Kw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I am trying to cross compile gmp on linux machine, the configure and make
steps seem to be going fine but when I do make check on the foundation
model, I get errors. Here is what I am trying:

*Step 1: On x86_64 Ubuntu Host (using
> gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux)*
---------------------------------------------------------------------------------------------------------------------------------
 $export
AARCH64_TOOLCHAIN=/home/anilss/Linaro/tools/gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux/bin
 $export PATH=$PATH:$AARCH64_TOOLCHAIN
$export ARCH=aarch64
$export CROSS_COMPILE=aarch64-linux-gnu-

$./configure --build=coreisbr-unknown-linux-gnu --host=aarch64-oe-linux
--target=aarch64-oe-linux
$make

(Note: the above value for build triplet I got while trying to build gmp
natively on x86_64 machine where it detected it as *
coreisbr-unknown-linux-gnu* and the target/host name *aarch64-oe-linux* for
Foundation model system was obtained likewise. However I am not sure if the
host and target values are correct.)

*Step 2: After this, on the Foundation model (running on another xterm),
from the above path (mounted)*
----------------------------------------------------------------------------------------------------------------------------------------
 root@genericarmv8:~/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3# make check
make  check-recursive
make[1]: Entering directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3'
Making check in tests
make[2]: Entering directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests'
Making check in .
make[3]: Entering directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests'
make  libtests.la t-bswap t-constants t-count_zeros t-gmpmax t-hightomask
t-modlinv t-popc t-parity t-sub
make[4]: Entering directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests'
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o memory.lo memory.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c memory.c  -fPIC -DPIC -o .libs/memory.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c memory.c -o memory.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o misc.lo misc.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c misc.c  -fPIC -DPIC -o .libs/misc.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c misc.c -o misc.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o refmpf.lo refmpf.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpf.c  -fPIC -DPIC -o .libs/refmpf.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpf.c -o refmpf.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o refmpn.lo refmpn.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpn.c  -fPIC -DPIC -o .libs/refmpn.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpn.c -o refmpn.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o refmpq.lo refmpq.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpq.c  -fPIC -DPIC -o .libs/refmpq.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpq.c -o refmpq.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o refmpz.lo refmpz.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpz.c  -fPIC -DPIC -o .libs/refmpz.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c refmpz.c -o refmpz.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o spinner.lo spinner.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c spinner.c  -fPIC -DPIC -o .libs/spinner.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c spinner.c -o spinner.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o trace.lo trace.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c trace.c  -fPIC -DPIC -o .libs/trace.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2
-pedantic -c trace.c -o trace.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic
-o libtests.la  memory.lo misc.lo refmpf.lo refmpn.lo refmpq.lo refmpz.lo
spinner.lo trace.lo  ../libgmp.la
libtool: link: ar cq .libs/libtests.a .libs/memory.o .libs/misc.o
.libs/refmpf.o .libs/refmpn.o .libs/refmpq.o .libs/refmpz.o .libs/spinner.o
.libs/trace.o
libtool: link: ranlib .libs/libtests.a
libtool: link: ( cd ".libs" && rm -f "libtests.la" && ln -s "../libtests.la"
"libtests.la" )
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c t-bswap.c
/bin/bash ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic
-o t-bswap t-bswap.o libtests.la ../libgmp.la
libtool: link: gcc -std=gnu99 -O2 -pedantic -o .libs/t-bswap t-bswap.o
./.libs/libtests.a
/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/.libs/libgmp.so
../.libs/libgmp.so
/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/.libs/libgmp.so: could not
read symbols: *File in wrong format* * <------* ???
collect2: error: ld returned 1 exit status
make[4]: *** [t-bswap] Error 1
make[4]: Leaving directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3'
make: *** [check] Error 2
root@genericarmv8:~/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3#

Will appreciate any help.

Thanks,
Anil


[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div><div><div><div>Hi, <br><br></div>I am trying to cross \
compile gmp on linux machine, the configure and make steps seem to be going fine but \
when I do make check on the foundation model, I get errors. Here is what I am \
trying:<br> <br></div><b>Step 1: On x86_64 Ubuntu Host (using \
:gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux)</b><br>--------------------- \
------------------------------------------------------------------------------------------------------------<br>
 $export AARCH64_TOOLCHAIN=/home/anilss/Linaro/tools/gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux/bin<br>$export \
PATH=$PATH:$AARCH64_TOOLCHAIN<br>$export ARCH=aarch64<br>$export \
CROSS_COMPILE=aarch64-linux-gnu-<br> <br></div><div>$./configure \
--build=coreisbr-unknown-linux-gnu --host=aarch64-oe-linux \
--target=aarch64-oe-linux<br></div><div>$make<br><br></div><div>(Note: the above \
value for build triplet I got while trying to build gmp natively on x86_64 machine \
where it detected it as <b>coreisbr-unknown-linux-gnu</b> and the target/host name \
<b>aarch64-oe-linux</b> for Foundation model system was obtained likewise. However I \
am not sure if the host and target values are correct.)<br> <br></div><div><b>Step 2: \
After this, on the Foundation model (running on another xterm), from the above path \
(mounted)</b><br>----------------------------------------------------------------------------------------------------------------------------------------<br>
 </div><div>root@genericarmv8:~/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3# make \
check<br>make  check-recursive<br>make[1]: Entering directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3&#39;<br>Making check in \
tests<br>make[2]: Entering directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests&#39;<br> Making check in \
.<br>make[3]: Entering directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests&#39;<br>make  <a \
href="http://libtests.la">libtests.la</a> t-bswap t-constants t-count_zeros t-gmpmax \
t-hightomask t-modlinv t-popc t-parity t-sub<br> make[4]: Entering directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests&#39;<br>/bin/bash ../libtool \
--tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I..    -O2 \
                -pedantic -c -o memory.lo memory.c<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
memory.c  -fPIC -DPIC -o .libs/memory.o<br>libtool: compile:  gcc -std=gnu99 \
-DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c memory.c -o memory.o &gt;/dev/null \
                2&gt;&amp;1<br>
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. \
-I.. -I..    -O2 -pedantic -c -o misc.lo misc.c<br>libtool: compile:  gcc -std=gnu99 \
-DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c misc.c  -fPIC -DPIC -o \
                .libs/misc.o<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
misc.c -o misc.o &gt;/dev/null 2&gt;&amp;1<br>/bin/bash ../libtool --tag=CC   \
--mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o \
                refmpf.lo refmpf.c<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
refmpf.c  -fPIC -DPIC -o .libs/refmpf.o<br>libtool: compile:  gcc -std=gnu99 \
-DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c refmpf.c -o refmpf.o &gt;/dev/null \
                2&gt;&amp;1<br>
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. \
-I.. -I..    -O2 -pedantic -c -o refmpn.lo refmpn.c<br>libtool: compile:  gcc \
-std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c refmpn.c  -fPIC -DPIC -o \
                .libs/refmpn.o<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
refmpn.c -o refmpn.o &gt;/dev/null 2&gt;&amp;1<br>/bin/bash ../libtool --tag=CC   \
--mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o \
                refmpq.lo refmpq.c<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
refmpq.c  -fPIC -DPIC -o .libs/refmpq.o<br>libtool: compile:  gcc -std=gnu99 \
-DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c refmpq.c -o refmpq.o &gt;/dev/null \
                2&gt;&amp;1<br>
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. \
-I.. -I..    -O2 -pedantic -c -o refmpz.lo refmpz.c<br>libtool: compile:  gcc \
-std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c refmpz.c  -fPIC -DPIC -o \
                .libs/refmpz.o<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
refmpz.c -o refmpz.o &gt;/dev/null 2&gt;&amp;1<br>/bin/bash ../libtool --tag=CC   \
--mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I..    -O2 -pedantic -c -o \
                spinner.lo spinner.c<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
spinner.c  -fPIC -DPIC -o .libs/spinner.o<br>libtool: compile:  gcc -std=gnu99 \
-DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c spinner.c -o spinner.o &gt;/dev/null \
                2&gt;&amp;1<br>
/bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. \
-I.. -I..    -O2 -pedantic -c -o trace.lo trace.c<br>libtool: compile:  gcc \
-std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c trace.c  -fPIC -DPIC -o \
                .libs/trace.o<br>
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -pedantic -c \
trace.c -o trace.o &gt;/dev/null 2&gt;&amp;1<br>/bin/bash ../libtool --tag=CC   \
--mode=link gcc -std=gnu99  -O2 -pedantic   -o <a \
href="http://libtests.la">libtests.la</a>  memory.lo misc.lo refmpf.lo refmpn.lo \
refmpq.lo refmpz.lo spinner.lo trace.lo  ../<a href="http://libgmp.la">libgmp.la</a> \
                <br>
libtool: link: ar cq .libs/libtests.a .libs/memory.o .libs/misc.o .libs/refmpf.o \
.libs/refmpn.o .libs/refmpq.o .libs/refmpz.o .libs/spinner.o .libs/trace.o \
<br>libtool: link: ranlib .libs/libtests.a<br>libtool: link: ( cd &quot;.libs&quot; \
&amp;&amp; rm -f &quot;<a href="http://libtests.la">libtests.la</a>&quot; &amp;&amp; \
ln -s &quot;../<a href="http://libtests.la">libtests.la</a>&quot; &quot;<a \
href="http://libtests.la">libtests.la</a>&quot; )<br> gcc -std=gnu99 -DHAVE_CONFIG_H \
-I. -I.. -I..    -O2 -pedantic -c t-bswap.c<br>/bin/bash ../libtool --tag=CC   \
--mode=link gcc -std=gnu99  -O2 -pedantic   -o t-bswap t-bswap.o <a \
href="http://libtests.la">libtests.la</a> ../<a href="http://libgmp.la">libgmp.la</a> \
                <br>
libtool: link: gcc -std=gnu99 -O2 -pedantic -o .libs/t-bswap t-bswap.o  \
./.libs/libtests.a /home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/.libs/libgmp.so \
../.libs/libgmp.so<br>/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/.libs/libgmp.so: \
                could not read symbols: <b>File in wrong format</b> <b> \
                &lt;------</b> ???<br>
collect2: error: ld returned 1 exit status<br>make[4]: *** [t-bswap] Error \
1<br>make[4]: Leaving directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests&#39;<br>make[3]: *** \
[check-am] Error 2<br>make[3]: Leaving directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests&#39;<br> make[2]: *** \
[check-recursive] Error 1<br>make[2]: Leaving directory \
`/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3/tests&#39;<br>make[1]: *** \
[check-recursive] Error 1<br>make[1]: Leaving directory \
                `/home/root/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3&#39;<br>
make: *** [check] Error \
2<br>root@genericarmv8:~/anilss/pkgs/gmp/cross_arm64/gmp-5.1.3# \
<br></div><br></div>Will appreciate any \
help.<br><br></div>Thanks,<br></div>Anil<br><div><div><div><div><div><br></div></div></div></div>
 </div></div>



_______________________________________________
cross-distro mailing list
cross-distro@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/cross-distro


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic