今天使用mac编译spidermonkey的android库时遇到下面报错,可是从configure中没找到怎么把log库关联到编译环境中。求各位大大指点,感谢!
configure参数设置如下:
../configure --with-android-ndk="/Users/xxx/.mozbuild/android-ndk-r15c" --disable-shared-js --with-android-sdk="/Users/xxx/.mozbuild/android-sdk-macosx" --with-android-version=23 --with-android-toolchain="/Users/xxx/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" --target=arm-linux-androideabi
报错信息如下:
/Users/xxx/.mozbuild/android-ndk-r15c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -std=gnu++14 --target=arm-linux-androideabi -o ../../../dist/bin/js -Qunused-arguments -isystem /Users/xxx/.mozbuild/android-ndk-r15c/platforms/android-23/arch-arm/usr/include -isystem /Users/xxx/.mozbuild/android-ndk-r15c/platforms/android-23/arch-arm/usr/include -gcc-toolchain /Users/xxx/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 -D__ANDROID_API__=23 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fno-short-enums -fno-exceptions -I/Users/xxx/.mozbuild/android-ndk-r15c/sources/cxx-stl/llvm-libc++/include -I/Users/xxx/.mozbuild/android-ndk-r15c/sources/android/support/include -I/Users/xxx/.mozbuild/android-ndk-r15c/sources/cxx-stl/llvm-libc++abi/include -march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -mno-unaligned-access -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-rtti -fno-exceptions -fno-math-errno -pipe -g -O3 -funwind-tables /Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/js/src/shell/js.list -L/Users/xxx/.mozbuild/android-ndk-r15c/platforms/android-23/arch-arm/usr/lib -Wl,-rpath-link=/Users/xxx/.mozbuild/android-ndk-r15c/platforms/android-23/arch-arm/usr/lib --sysroot=/Users/xxx/.mozbuild/android-ndk-r15c/platforms/android-23/arch-arm -Wl,--allow-shlib-undefined -gcc-toolchain /Users/xxx/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 -mthumb -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,--build-id -B /Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold -Wl,-rpath-link,/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/dist/bin -Wl,-rpath-link,/usr/local/lib ../../../js/src/build/libjs_static.a -pie ../../../mozglue/build/libmozglue.so -lm -lz -lm -ldl -llog -L/Users/xxx/.mozbuild/android-ndk-r15c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -lc++_static -lc++abi -lunwind -landroid_support
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
/Users/xxx/src/mozilla-central/js/src/build_OPT.OBJ/build/unix/gold/ld: error: hidden symbol '__android_log_print' is not defined locally
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../../../dist/bin/js] Error 1
make[2]: *** [js/src/shell/target] Error 2
make[1]: *** [compile] Error 2
make: *** [default] Error 2
有大大知道的话请指点下,谢谢。