Hi, I cross-post here what I've written on the QNAP forum (sorry for that) because I think that you're not actively monitoring that discussion.
TVHeadend application introduced several additions in the latest versions and I'm not able to compile it anymore with my old ARM VM that is using an old glibc (see for example
my pending support ticket).
So my TVHeadend QPKG 0.9.1.1 distribution package has been upgraded to 0.9.2 with the newer glibc but this unfortunately
broke the Sundtek libmediaclient on ARM.
This does not happen with x86_64, but I didn't change the libc in that case of course.
I haven't an ARM NAS to try myself directly, but I was able to replicate the problem within the ARM VM.
This is what it prints with
older glibc (QPKG 0.9.1.1
WORKING):
root@debian-armel:~/test/old# LD_PRELOAD=/root/test/libmediaclient.so ./tvh-loader --library-path . ./tvheadend --config . --abort
2018-04-21 16:32:45.157 [ INFO] main: Log started
2018-04-21 16:32:45.283 [ INFO] http: Starting HTTP server 0.0.0.0:9981
2018-04-21 16:32:45.450 [ INFO] htsp: Starting HTSP server 0.0.0.0:9982
.. CUT ..
2018-04-21 16:32:46.274 [ NOTICE] START: HTS Tvheadend version 4.3-1152~g2baa719-dirty started, running as PID:1410 UID:0 GID:0, CWD:/root/test/old CNF:/root/test/old
Aborted
And this is with
newer glibc (QPKG 0.9.2
FAILING):
root@debian-armel:~/test# LD_PRELOAD=/root/test/libmediaclient.so ./tvh-loader --library-path . ./tvheadend --config . --abort
ERROR: ld.so: object '/root/test/libmediaclient.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
2018-04-21 16:31:20.125 [ INFO] main: Log started
2018-04-21 16:31:20.257 [ INFO] http: Starting HTTP server 0.0.0.0:9981
2018-04-21 16:31:20.347 [ INFO] htsp: Starting HTSP server 0.0.0.0:9982
.. CUT ..
2018-04-21 16:31:21.391 [ NOTICE] START: HTS Tvheadend version 4.3-1236~g518d57bee started, running as PID:1379 UID:0 GID:0, CWD:/root/test CNF:/root/test
Aborted
The library libmediaclient.so is the latest downloaded from your
armsysvhf archive and it's
the same between the two simulations (older/newer glibc).
As you can see, with the newer glibc it fails to preload with the error
cannot open shared object file. Here's the library:
root@debian-armel:~/test# md5sum /root/test/libmediaclient.so
f5efb30c9169122960bb836f2e4149c5 /root/test/libmediaclient.so
root@debian-armel:~/test# file /root/test/libmediaclient.so
/root/test/libmediaclient.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
The
linux dynamic loader (ld.so renamed here as "tvh-loader" for my convenience) EABI seems compatibile too:
root@debian-armel:~/test# file tvh-loader
tvh-loader: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=4e62b2761d7a64fc51fd22235cff9e0ce5fccaa3, stripped
root@debian-armel:~/test# file old/tvh-loader
old/tvh-loader: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=277b871de46b49b3a538abbdb5d1cc0adb5440ec, stripped
The version of
libc.so.6 is obviously different:
root@debian-armel:~/test# ./libc.so.6 | grep "Compiled"
Compiled by GNU CC version 6.3.0 20170516.
root@debian-armel:~/test# ./old/libc.so.6 | grep "Compiled"
Compiled by GNU CC version 4.4.5.
Compiled on a Linux 2.6.32 system on 2011-01-23.
I've also tried prepending
LD_DEBUG=libs but there are not significant differences, while with
LD_DEBUG=files there's this:
root@debian-armel:~/test# LD_DEBUG=files LD_PRELOAD=/root/test/libmediaclient.so ./tvh-loader --library-path . ./tvheadend --config . --abort
1536: file=./tvheadend [0]; generating link map
1536:
1536: WARNING: Unsupported flag value(s) of 0x8000000 in DT_FLAGS_1.
1536: dynamic: 0xb6d0f84c base: 0xb5751000 size: 0x0180b660
1536: entry: 0xb58410c4 phdr: 0xb5751034 phnum: 10
1536:
1536:
1536: file=/root/test/libmediaclient.so [0]; needed by ./tvheadend [0]
ERROR: ld.so: object '/root/test/libmediaclient.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
1536:
1536: file=libdvbcsa.so.1 [0]; needed by ./tvheadend [0]
1536: file=libdvbcsa.so.1 [0]; generating link map
1536: dynamic: 0xb574df08 base: 0xb572d000 size: 0x00021074
1536: entry: 0xb572db98 phdr: 0xb572d034 phnum: 6
1536:
1536:
1536: file=libssl.so.1.1 [0]; needed by ./tvheadend [0]
1536: file=libssl.so.1.1 [0]; generating link map
1536: dynamic: 0xb5728ee0 base: 0xb56cc000 size: 0x00060c7c
1536: entry: 0xb56da688 phdr: 0xb56cc034 phnum: 6
1536:
1536:
.. CUT ..
root@debian-armel:~/test/old# LD_DEBUG=files LD_PRELOAD=/root/test/libmediaclient.so ./tvh-loader --library-path . ./tvheadend --config . --abort
1566: file=./tvheadend [0]; generating link map
1566: dynamic: 0xb6f0f270 base: 0xb638e000 size: 0x00bd8794
1566: entry: 0xb641c854 phdr: 0xb638e034 phnum: 9
1566:
1566:
1566: file=/root/test/libmediaclient.so [0]; needed by ./tvheadend [0]
1566: file=/root/test/libmediaclient.so [0]; generating link map
1566: dynamic: 0xb638b00c base: 0xb6374000 size: 0x00017b68
1566: entry: 0xb63755b0 phdr: 0xb6374034 phnum: 5
1566:
1566:
1566: file=libssl.so.0.9.8 [0]; needed by ./tvheadend [0]
1566: file=libssl.so.0.9.8 [0]; generating link map
1566: dynamic: 0xb6370f4c base: 0xb632a000 size: 0x00049cb8
1566: entry: 0xb6337d60 phdr: 0xb632a034 phnum: 5
1566:
1566:
.. CUT ..
Have you got any suggestions on how to fix it? As I said, with the older glibc that preloads libmediaclient.so correctly I'm unable to compile the latest TVHeadend...