android平台GMP库配置错误.处理步骤
Configuration error of the GMP library for the android platform
我正试图为android (arm)编译GMP,但我收到了一个非常奇怪的错误。首先,我设置了一些东西来描述另一个SO问题:
export NDKROOT=/prod/ndk
$NDKROOT/build/tools/make-standalone-toolchain.sh --platform=android-9 -- install-dir=$NDKROOT/android_armeabi
export CC="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-gcc --sysroot=$NDKROOT/android_armeabi/sysroot"
export CXX="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-g++ --sysroot=$NDKROOT/android_armeabi/sysroot"
export AR="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-ar"
export SYSROOT="$NDKROOT/android_armeabi/sysroot"
export PATH="$NDKROOT/android_armeabi/bin":$PATH
然后我简单地运行./configure --enable-cxx --prefix=/local/to/where/i/want/to/install --host=arm-none-linux-gnueabi
,配置正常,输出如下:
Version: GNU MP 5.1.1
Host type: arm-none-linux-gnueabi
ABI: standard
Install prefix: /location/to/where/i/want/to/install
Compiler: /prod/ndk/android_armeabi/bin/arm-linux-androideabi-gcc -- sysroot=/prod/ndk/android_armeabi/sysroot -std=gnu99
Static libraries: yes
Shared libraries: yes
到这里一切正常,但是当我运行make
时,我收到以下错误:
ismpf.cc: In function 'std::istream& operator>>(std::istream&, mpf_ptr)':
ismpf.cc:48:43: error: 'struct lconv' has no member named 'decimal_point'
make[2]: *** [ismpf.lo] Error 1
make[2]: Leaving directory `~/Downloads/gmp-5.1.1/cxx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/Downloads/gmp-5.1.1'
make: *** [all] Error 2
我的第一个问题在这里。什么好主意吗?
只是出于好奇,我试图重新运行与上面相同的配置命令,但使用sudo
在它之前。几秒钟后,我收到以下信息:
configure: error: Oops, mp_limb_t is 64 bits, but the assembler code
in this configuration expects 32 bits.
出现了第二个(也是非常奇怪的问题)。
出于好奇,我再次尝试重新启动并清除我们创建的所有变量,并简单地运行GMP手册建议的命令:./configure——prefix=/location/——enable-cxx——host=arm-linux-androideabi
./configure运行,make运行正常,但是当我执行make check
时,所有9/9测试都失败了。有人能指出我在正确的方向与这些错误,或关于如何尝试和正确编译GMP为android?任何帮助都是非常感激的。
取消CFLAGS的env变量为我解决了这个问题。
相关文章:
- 使用返回对象的函数处理错误
- C++:处理错误,看不懂我的错误
- 如何处理错误"E1696命令行错误:无法在Visual Studio 2017中打开元数据文件"mscorlib.dll"?
- C++ 异常处理错误输出
- 信号处理错误
- 文件处理I/O C 错误
- 文件处理 - 错误:与 while 循环 (C++) 中的"运算符>>"不匹配(代码::块)
- SDL的事件处理错误
- HMODULE在重建导入地址表IAT时处理错误
- C++ 中的文件处理错误 - 调用"std::basic_fstream<char, std::char_traits<char> >::open(const char[8],
- 在处理线程时,处理错误的正确方法是什么
- 处理C++错误
- 异常处理C++错误
- CUDA图像处理错误
- 文件处理错误
- 代码::阻止资源预处理错误
- 使用模板创建类的新实例,不知道如何处理错误
- Qt 与 opencv 异常处理错误
- 提升 MSM 中的错误处理错误
- 如何处理错误“vtkTrivialProducer :此数据对象不包含请求的范围”