0

I'm trying to compile the NTL library (host is 64 bit, but target platform is 32), but I'm having some trouble with libtool. The command, alongside with the output can be found in this pastebin. I know I'm doing something wrong with the rpath structure, but I'm not all too familiar with it to know exactly what. Any help?

EDIT: Configure is run as:

./configure CC=/tmp/ntl-build/bin/arm-linux-androideabi-gcc CXX=/tmp/ntl-build/bin/arm-linux-androideabi-g++ SHARED=on AR=/tmp/ntl-build/bin/arm-linux-androideabi-ar RANLIB=/tmp/ntl-build/bin/arm-linux-androideabi-ranlib NTL_GMP_LIP=on GMP_PREFIX=/prod/android-ndk-r8/workspace/verifiable/gmp-precompiled/armeabi-v7a DEF_PREFIX=/tmp/ntl-build/install_dir

shblsh
  • 81
  • 1
  • 9

1 Answers1

0

How's FFT.o compiled? The huge cascade of error messages that ends with:

.libs/FFT.o: could not read symbols: File in wrong format

indicates that something doesn't match up. From the paste, it seems as if you have cross compiled with the Android NDK tools, but are linking with the native (x86_64) gcc (which in turn calls the native ld).

ldav1s
  • 15,885
  • 2
  • 53
  • 56
  • I do apologize if I'm asking a trivial question here, but how would I go about linking to the non-native, Android NDK gcc? I'm asking this because I actually thought that I *had* specifically indicated the use of the Android NDK compiler via --tag=CC, where CC=/tmp/ntl-build/bin/arm-linux-androideabi-gcc . – shblsh Jun 14 '13 at 02:23
  • How did you run `configure`? – ldav1s Jun 14 '13 at 02:25
  • In fact, there is a small article [here](http://www.metastatic.org/text/libtool.html) that talks about this same exact issue, but it doesn't give any details on how to solve it. It just gives *some* solution via LDFLAGS, but I'm not able to follow it. – shblsh Jun 14 '13 at 02:25
  • Yes my apologies, I should have added configure. See edited question above. – shblsh Jun 14 '13 at 02:28
  • In this case try adding `LD=/tmp/ntl-build/bin/arm-linux-androideabi-ld` to the `configure` command. – ldav1s Jun 14 '13 at 02:31
  • `Error: unrecognized option: LD=/tmp/ntl-build/bin/arm-linux-androideabi-ld`. It only allows us to set RANLIB and AR, but not LD. LDFLAGS and LDFLAGS_CXX are present though. – shblsh Jun 14 '13 at 03:04