Search code examples
androidandroid-ndkvlcgmp

GMP compile error: No rule to make target `mpn/add_n.lo', needed by `libgmp.la'


I am compiling the VLC for Android on Ubuntu 12.04, basing on this instruction

Always get this error when compiling the libgmp

ibstdc++/4.7/include -I/home/jerry/workspaces/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -DNDEBUG  -I/home/jerry/workspaces/vlc/vlc/contrib/arm-linux-androideabi/include -g -c -o mpn/add.lo mpn/add.c
/bin/bash ./libtool --tag=CC   --mode=compile arm-linux-androideabi-gcc --sysroot=/home/jerry/workspaces/android-ndk-r8e/platforms/android-9/arch-arm -std=gnu99 -DHAVE_CONFIG_H -I. -D__GMP_WITHIN_GMP  -g -mfpu=vfpv3-d16 -mcpu=cortex-a8 -mthumb -mfloat-abi=softfp -O2 -I/home/jerry/workspaces/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/include -I/home/jerry/workspaces/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -DNDEBUG  -I/home/jerry/workspaces/vlc/vlc/contrib/arm-linux-androideabi/include  -g -mfpu=vfpv3-d16 -mcpu=cortex-a8 -mthumb -mfloat-abi=softfp -O2 -I/home/jerry/workspaces/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/include -I/home/jerry/workspaces/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -DNDEBUG  -I/home/jerry/workspaces/vlc/vlc/contrib/arm-linux-androideabi/include -g -c -o mpn/add_1.lo mpn/add_1.c
make[3]: *** No rule to make target `mpn/add_n.lo', needed by `libgmp.la'.  Stop.
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/jerry/workspaces/vlc/vlc/contrib/android/gmp'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/jerry/workspaces/vlc/vlc/contrib/android/gmp'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/jerry/workspaces/vlc/vlc/contrib/android/gmp'
make: *** [.gmp] Error 2

Does anyone know to correct this problem?


Solution

  • I had the same error and GMP is still at version 4.2.1 but this was not the problem for me. A lot of other packages also failed. The problem was due to two different (and somehow incompatible) versions of libtool. Version 2.2.10 is provided by vlc itself in vlc/extras/tools, the other came from the distribution (Mint) at version 2.4.2. make clean in this tools-folder solved it for me, if it doesn't for you, you could try to set LIBTOOL_VERSION=2.4.2 or whatever version your distro provides in configure.mak. The root cause was that at when config.status concatenates the config with ltmain.sh, some major parts of ltmain.sh are lost, so no compilation was done at all, hence the missing dependency.

    After that everything compiled fine (didn't try to install though).

    -rw-r--r--  1 user user 8437456 Jun  5 21:00 VLC-debug.apk