linuxdeployqt
linuxdeployqt copied to clipboard
/usr/bin/strip fails on system libraries
System files pulled in with -bundle-non-qt-libs
cause issues when trying to use /usr/bin/strip later in the build process, even with -no-strip
used on linuxdeployqt:
$ strip libasyncns.so.0 strip: stjZYnII: Not enough room for program headers, try linking with -N strip:stjZYnII[.note.gnu.build-id]: Bad value
/usr/lib64/libasyncns.so.0 ldd:
linux-vdso.so.1 => (0x00007ffec979f000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fbe360ed000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fbe35ed4000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbe35cb8000)
libc.so.6 => /lib64/libc.so.6 (0x00007fbe358ea000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbe3650d000)
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1380
Start of program headers: 64 (bytes into file)
Start of section headers: 22088 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 7
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000004554 0x0000000000004554 R E 0x200000
LOAD 0x0000000000004db8 0x0000000000204db8 0x0000000000204db8
0x0000000000000378 0x0000000000000380 RW 0x200000.
DYNAMIC 0x0000000000004dd8 0x0000000000204dd8 0x0000000000204dd8
0x0000000000000200 0x0000000000000200 RW 0x8
NOTE 0x00000000000001c8 0x00000000000001c8 0x00000000000001c8
0x0000000000000024 0x0000000000000024 R 0x4
GNU_EH_FRAME 0x0000000000003f70 0x0000000000003f70 0x0000000000003f70
0x00000000000000cc 0x00000000000000cc R 0x4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x10
GNU_RELRO 0x0000000000004db8 0x0000000000204db8 0x0000000000204db8
0x0000000000000248 0x0000000000000248 R 0x1
[AFTER LINUXDEPLOYQT] /tmp/myproject/.lib/libasyncns.so.0
ldd:
linux-vdso.so.1 => (0x00007ffef03ba000)
libnsl.so.1 => /tmp/myproject/lib/libnsl.so.1 (0x00007f0c0b3b7000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f0c0b19e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0c0af82000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0c0abb4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0c0b7da000)
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1380
Start of program headers: 24576 (bytes into file)
Start of section headers: 22088 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 8
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 24
Program Headers:
Type Offset .VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000004554 0x.0000000000004554 R E 0x200000
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x10
NOTE 0x00000000000001c8 0x00000000000001c8 0x00000000000001c8
0x0000000000000024 0x0000000000000024 R 0x4
GNU_EH_FRAME 0x0000000000003f70 0x0000000000003f70 0x0000000000003f70
0x00000000000000cc 0x00000000000000cc R 0x4
LOAD 0x0000000000004db8 0x0000000000204db8 0x0000000000204db8
0x0000000000000378 0x0000000000000380 RW 0x200000
GNU_RELRO 0x0000000000004db8 0x0000000000204db8 0x0000000000204db8
0x0000000000000248 0x0000000000000248 R 0x1
LOAD 0x0000000000006000 0x0000000000206000 0x0000000000206000
0x0000000000000750 0x0000000000000750 RW 0x1000
DYNAMIC 0x00000000000061c0 0x00000000002061c0 0x00000000002061c0
0x0000000000000210 0x0000000000000210 RW 0x8
Thanks for reporting. Strange that I never ran into this issue so far. Are you building on Ubuntu xenial?
Pulling latest pre-built AppImage for linuxdeployqt, and building my application on CentOS 7.