OSVR/OSVR-Android-Build

Public symbols stripped from plugins

JeroMiya opened this issue · 0 comments

I'm not sure when this started happening, but in the current build all plugins are stripped of public symbols, including the plugin entry point. Thus, plugins are not working.

It doesn't appear to be related to any of the libfunctionality macros for the entry point itself. Even if you manually add a symbol to the plugin source, like so:

extern "C" __attribute__ ((visibility ("default"))) void checkForThisSymbol() {
    std::cout << "hello" << std::endl;
}

This symbol is still not visible from the output .so file:
image

Here is the link.txt of one of the plugins - it doesn't look out of the ordinary (unless I'm missing something):

C:\Users\Jeremy\Downloads\crystax-ndk-10.1.0\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe  -fPIC -fexceptions -frtti -Wno-psabi --sysroot=C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/platforms/android-16/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack  -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,muldefs  -shared -Wl,-soname, -o lib\osvr-plugins-0\libcom_osvr_android_sensorTracker.so CMakeFiles/com_osvr_android_sensorTracker.dir/com_osvr_android_sensorTracker.cpp.o  -LC:\Users\Jeremy\Downloads\crystax-ndk-10.1.0\sources\crystax\empty  -LC:\Users\Jeremy\JeroMiya\OSVR-Android-Build-build\install\libs\armeabi-v7a -landroid C:\Users\Jeremy\JeroMiya\OSVR-Android-Build-build\install\lib\libosvrPluginKit.so C:\Users\Jeremy\JeroMiya\OSVR-Android-Build-build\install\lib\libosvrUtil.so -Wl,-rpath-link,C:/Users/Jeremy/JeroMiya/OSVR-Android-Build-build/install/lib  "C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so" "C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libsupc++.a"  C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/sources/crystax/libs/armeabi-v7a/libcrystax.so -lc

Other built android .so files are not affected by this. Everything in libosvrClientKit.so for example is exported correctly.