migrating from ndk r15c to r19c to build PhysX

88 views
Skip to first unread message

신한슬

unread,
Jul 30, 2019, 12:26:06 PM7/30/19
to android-ndk
I'm trying to build physX library for android.

By specifying -gcc-toolchain and --sysroot, I was able to build the library with ndk r15c.

With r19c, I've tried to build it with (Failed) and without specifying -gcc-toolchain and --sysroot.

below is the result without -gcc-toolchain and --sysroot.


Target: x86_64-none-linux-android Thread model: posix InstalledDir: C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin Found candidate GCC installation: C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/i686-linux-android\4.9.x Found candidate GCC installation: C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/x86_64-linux-android\4.9.x Selected GCC installation: C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/x86_64-linux-android/4.9.x Candidate multilib: .;@m64 Selected multilib: .;@m64

"C:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin\\ld.gold.exe" --enable-new-dtags --eh-frame-hdr -m elf_x86_64 -shared -o

"C:\\Release\\PhysX\\Bin\\Android\\Release\\x86_64\\libNativePhysX.so" crtbegin_so.o

"-L..\\..\\Externals\\PhysX-3.4\\obj\\libs\\Android\\Release\\x86_64"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\sysroot\\usr\\lib\\x86_64-linux-android\\21"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\lib64\\clang\\8.0.2\\lib\\linux\\x86_64"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin/../lib/gcc/x86_64-linux-android/4.9.x"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin/../sysroot/usr/lib/x86_64-linux-android"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib"

"-LC:\\android-ndk-r19c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin/../sysroot/usr/lib"


--start-group -l:libPhysX.a -l:libPhysXCooking.a -l:libPhysXExtensions.a -l:libPxFoundation.a -l:libPxPvdSDK.a -l:libLowLevel.a -l:libLowLevelAABB.a -l:libLowLevelCloth.a -l:libLowLevelDynamics.a
-l:libLowLevelParticles.a -l:libPhysXCharacterKinematic.a -l:libPhysXCommon.a -l:libPhysXVehicle.a -l:libSceneQuery.a -l:libSimulationController.a -l:libPsFastXml.a -l:libPxTask.a --end-group

-llog --gc-sections --build-id --no-undefined -z noexecstack -z relro -z now -llog -landroid --icf=all -O3 --compress-debug-sections=zlib --no-threads --relax --no-map-whole-files"

-rpath-link=C:\\android-ndk-r19c\\platforms\\21\\arch-x86_64\\usr\\lib64" -Bstatic -lstdc++ -Bdynamic -lm -lgcc -ldl -lc -lgcc -ldl crtend_so.o
C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin\ld.gold.exe: error: cannot open crtbegin_so.o: No such file or directory C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin\ld.gold.exe: error: cannot open crtend_so.o: No such file or directory bionic/libc/bionic/__cxa_pure_virtual.cpp:20: error: undefined reference to 'async_safe_fatal_no_abort' bionic/libc/bionic/new.cpp:29: error: undefined reference to 'async_safe_fatal_no_abort' bionic/libc/bionic/new.cpp:37: error: undefined reference to 'async_safe_fatal_no_abort' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) 4> Failed to build DLL (error 1) 'C:\release\PhysX\Bin\Android\Release\x86_64\libNativePhysX.so'

I've been trying to solve this issue for 2 weeks but could not find any answer.



John Dallman

unread,
Jul 30, 2019, 1:04:29 PM7/30/19
to andro...@googlegroups.com
I can't answer most of this, but GCC was removed from the NDK at NDK 18b, in September 2018. 

John

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5ff2d667-09b7-4a3b-8f12-84b74b4a129a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages