sentry-native
sentry-native copied to clipboard
Compile the lib for Android with Qt support end with error
How to reproduce;
cmake -B build -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-27 -D SENTRY_BACKEND=none -D CMAKE_PREFIX_PATH=/home/kotr/dev/tools/Qt/5.15.2/android/lib/cmake/Qt5/ -D SENTRY_INTEGRATION_QT=YES --config RelWithDebInfo -S .
it is fine
go for build:
cmake --build build --config RelWithDebInfo --parallel
It unds up with error:
p.s. specifying diffenrent -DANDROID_ABI=armeabi-v7a
parameter does not make any effect
Environment; lib version 0.4.15 OS Kubuntu linux 21.10 x64 cmake 18 Qt 5.15.2
Can you try disabling integration tests when building?
@loewenheim
As the linker is complaining about libQt5Core
not having the right format; which format does it have?
Is it a valid elf file? If so, does it have the same elf architecture, etc?
As you are trying to link to a pre-built qt library, it would be good to double-check that it is indeed matching up.
I tried to find out what is wrong with elf with read elf: readelf -h /home/kotr/dev/tools/Qt/5.15.2/android/lib/libQt5Core_armeabi-v7a.so ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: DYN (Shared object file) Machine: ARM Version: 0x1 Entry point address: 0x0 Start of program headers: 52 (bytes into file) Start of section headers: 5856160 (bytes into file) Flags: 0x5000200, Version5 EABI, soft-float ABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 8 Size of section headers: 40 (bytes) Number of section headers: 41 Section header string table index: 40
Also some data: Attribute Section: aeabi File Attributes Tag_CPU_name: "ARM v7" Tag_CPU_arch: v7 Tag_CPU_arch_profile: Application Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-2 Tag_FP_arch: VFPv3 Tag_ABI_PCS_GOT_use: GOT-indirect Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_enum_size: int Tag_CPU_unaligned_access: v6 Tag_ABI_FP_16bit_format: IEEE 754
I do not know if it is correct or not, but this Qt prebuilt lib was delivered with official installer in the Qt installation. How should I check ?
That looks good so far. How about the build artifacts in the sentry build directory?
C is known to be a pain to cross-compile (on top of CMake itself being a huge pain), and we have limited resources to support the infinite amount of build configurations and setups that people want to use :-(