Willkommen Gast. Bitte einloggen oder registrieren.

Einloggen mit Benutzername, Passwort und Sitzungslänge

 
Erweiterte Suche

17296 Beiträge in 2072 Themen- von 2950 Mitglieder - Neuestes Mitglied: Hannes

September 24, 2017, 12:01:19 am
Sundtek Support ForumEnglishSundtek MediaTV Pro (Europe)DriversQNAP 64-bit drivers development question
Seiten: [1]
Drucken
Autor Thema: QNAP 64-bit drivers development question  (Gelesen 5778 mal)
virtualdj
Newbie
*
Beiträge: 7


Profil anzeigen
« am: April 25, 2015, 04:46:19 pm »

Hi, I'm the same virtualdj user of the QNAP forum.
If you follow the main TVHeadend thread on the QNAP forums you may have known that TVHeadend application is now a fully 64-bit application.

So, thanks to QNAP that provided me a 64-bit NAS to test, I'm trying to develop a further version of the Sundtek QPKG to support TVHeadend in 64-bit mode. In fact, at the moment the only possible way is running TVHeadend 32-bit with the 32-bit flavour of the Sundtek drivers.

Now I understand because you asked me to update the script to support DVBLink package!

At first I tried installing the latest TVH_Dev_Sundtek QPKG and I found I cannot run mediaclient or the other bins.
Code:
[/share/CACHEDEV1_DATA/.qpkg/TVH_Dev_Sundtek/opt/bin] # mediaclient
mediaclient: error while loading shared libraries: librt.so.1: wrong ELF class: ELFCLASS32

That's due to QNAP which does not supply all the complete 64-bit libraries:
Code:
[/share/CACHEDEV1_DATA/.qpkg/TVH_Dev_Sundtek/opt/bin] # ldd mediasrv
        linux-vdso.so.1 =>  (0x00007fff1cdfe000)
        libdl.so.2 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd4cfff9000)
        librt.so.1 => not found
        libc.so.6 => /lib64/libc.so.6 (0x00007fd4cfc76000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd4d0216000)
[/share/CACHEDEV1_DATA/.qpkg/TVH_Dev_Sundtek/opt/bin] # ls /lib64/
ld-2.11.1.so*         libc.so.6*
ld-linux-x86-64.so.2@ libpthread.so.0*

So, to run mediaclient or mediasrv both libdl.so.2 and librt.so.1 are needed, hence you used LD_LIBRARY_PATH to borrow them from the DVBLink package.
I also had to ship those libraries (and actually the complete libc) with TVHeadend as it didn't run without them. We can use the same principle with TVHeadend, but I don't like this very much. Zwinkernd

So I'm asking: what do you think if we build a QPKG specifically for 64-bit with the two libraries shipped with the QPKG, so that mediaclient can use them and TVH_Dev_Suntek will became standalone again?

I'm asking here because I can of course create a script that sets LD_LIBRARY_PATH before running mediaclient or mediasrv, but I prefer to not use LD_LIBRARY_PATH if possible.
So, do you think you can build the mediaclient, mediasrv and libmediaclient.so files (and others as well) compiled with:
Code:
LD_RUN_PATH='$ORIGIN/../libc'

In the future-version QPKG, I can create a libc folder inside the opt directory and place the libraries there and then the binaries should work from every path. Of course, if there is no libc folder, they should work as usual, looking for libraries in the system.

I tried with patchelf and it's working correctly with '$ORIGIN/../libc', at least for the binary files.
While preloading the libraries on 64-bit NAS gives me always this error:
Code:
[~] # LD_PRELOAD=/opt/lib/libmediaclient.so ls
ERROR: ld.so: object '/opt/lib/libmediaclient.so' from LD_PRELOAD cannot be preloaded: ignored.
index_default.html
The same on the 32-bit QNAP doesn't give any error:
Code:
[~] # LD_PRELOAD=/opt/lib/libmediaclient.so ls
index_default.html
I cannot explain this behaviour, maybe it's due to the missing libraries too? We'll see!
Gespeichert
Sundtek
Administrator
Hero Member
*****
Beiträge: 7456


Profil anzeigen
« Antworten #1 am: April 25, 2015, 05:25:01 pm »

There are 2 versions of libmediaclient.so one is 32bit the other one has 64bit.
You can pull the specific drivers from our server as you might know:
http://sundtek.de/media/netinst/32bit/installer.tar.gz
http://sundtek.de/media/netinst/64bit/installer.tar.gz

The only important thing is that you match the target application with it (usually the installer will take care about that).

I don't think that we can compile the drivers with a special path for the libraries because it would break the generic support of the driver, so the only way to get around that is to use LD_LIBRARY_PATH to the libraries which are missing.

Aside of that we're also working on our own VCR software for the NAS systems the ETA will be around 3 months, first we are going to implement a player (ETA for the first beta should be within next month).
Gespeichert

Sundtek Ltd. Support Engineer
virtualdj
Newbie
*
Beiträge: 7


Profil anzeigen
« Antworten #2 am: April 25, 2015, 05:34:35 pm »

There are 2 versions of libmediaclient.so one is 32bit the other one has 64bit.
You can pull the specific drivers from our server as you might know:
http://sundtek.de/media/netinst/32bit/installer.tar.gz
http://sundtek.de/media/netinst/64bit/installer.tar.gz
That's what I just do, otherwise the 32bit libmediaclient.so would not run on the 64bit TVHeadend at all.
I'm just asking if you know why the 64bit spits out that message on every command (in the example, when running "ls").

I don't think that we can compile the drivers with a special path for the libraries because it would break the generic support of the driver, so the only way to get around that is to use LD_LIBRARY_PATH to the libraries which are missing.
Just for my info, why would it break the support if the binaries look for a folder which does not exists (because it's a subfolder of your installation path, "libc" in this case)?
Isn't "$ORIGIN" supported by all the platforms?

Aside of that we're also working on our own VCR software for the NAS systems the ETA will be around 3 months, first we are going to implement a player (ETA for the first beta should be within next month).
Cool! Grinsend
Gespeichert
Sundtek
Administrator
Hero Member
*****
Beiträge: 7456


Profil anzeigen
« Antworten #3 am: April 25, 2015, 05:43:26 pm »

Let me back-check the ORIGIN option with the developer on Monday.
Gespeichert

Sundtek Ltd. Support Engineer
virtualdj
Newbie
*
Beiträge: 7


Profil anzeigen
« Antworten #4 am: April 25, 2015, 05:47:41 pm »

Thanks, exporting LD_LIBRARY_PATH is always an hassle and I removed it from TVHeadend QPKG too.
Gespeichert
virtualdj
Newbie
*
Beiträge: 7


Profil anzeigen
« Antworten #5 am: Mai 05, 2015, 08:48:12 pm »

Hi Sundtek, have you got any news from the developer?
Gespeichert
knusperriegel
Newbie
*
Beiträge: 1


Profil anzeigen
« Antworten #6 am: August 25, 2015, 12:03:59 am »

Hi,

I bought the Sundtek MediaTV Pro III to use it on a QNAP HS-251 FW 4.1.x with tvheadend.
Unfortunately is seems as if the development of the QNAP driver package for 64bit now got stuck, because the developer of the QNAP package (virtualdj) is missing feedback in this thread.

With the 32bit drivers as loaded by the v0.5.1 package and the tvheadend 0.8.4 or 0.8.5 package I'm facing periodic crashes and re-starts of the NAS.
I'd like to continue using the stick & NAS in a stable environment and use future updates of the 64bit tvheadend package.

=> Can you please support the developer and feedback as requested above?

Thanks

Gespeichert
Sundtek
Administrator
Hero Member
*****
Beiträge: 7456


Profil anzeigen
« Antworten #7 am: August 25, 2015, 02:23:40 am »

Hi,

use the USB 2.0 ports.

The devices cannot crash the system, if it crashes then your system has some issues with the USB 3.0 Controller driver.

We continued this discussion in the chatroom as far as I remember (that's why it did not continue here).
« Letzte Änderung: August 25, 2015, 09:16:49 am von Sundtek » Gespeichert

Sundtek Ltd. Support Engineer
virtualdj
Newbie
*
Beiträge: 7


Profil anzeigen
« Antworten #8 am: August 25, 2015, 03:44:42 pm »

Unfortunately is seems as if the development of the QNAP driver package for 64bit now got stuck, because the developer of the QNAP package (virtualdj) is missing feedback in this thread.
We continued this discussion in the chatroom as far as I remember (that's why it did not continue here).
I confirm. I was in contact with the developer via IRC and I did a simple test on my 64-bit NAS.
Unfortunately, due to the missing libraries on the QNAP, it's not possible to use the Sundtek package in 64-bit mode (hence with 64-bit TVHeadend) without preloading all the binaries with LD_LIBRARY_PATH.

I told the developer that I would have tried to make a 64-bit QPKG with this method, but then I realized that there are no real advantages on doing all that stuff.

I'd like to continue using the stick & NAS in a stable environment and use future updates of the 64bit tvheadend package.
Installing TVHeadend 32-bit with TVH_Dev_Sundtek 32-bit solves the issue and should not cause any crashes (or at least they should not be related to the fact the applications are running in 32-bit mode).

As TVHeadend is not using a lot of RAM (it runs on a NAS), there isn't any drawback to stick with 32-bit mode. QNAP in fact use all the applications in that mode (otherwise the libraries would be available) and keeps the kernel with 64-bit to support large volumes (HDD).
Gespeichert
Sundtek
Administrator
Hero Member
*****
Beiträge: 7456


Profil anzeigen
« Antworten #9 am: August 25, 2015, 04:11:42 pm »

Zitat
Installing TVHeadend 32-bit with TVH_Dev_Sundtek 32-bit solves the issue and should not cause any crashes (or at least they should not be related to the fact the applications are running in 32-bit mode).

just be sure that USB 2.0 ports are used with it then it should be ok, USB 3.0 ports are unreliable at the moment due problems inside the Linux USB 3.0 Controller driver.
Gespeichert

Sundtek Ltd. Support Engineer
virtualdj
Newbie
*
Beiträge: 7


Profil anzeigen
« Antworten #10 am: August 25, 2015, 04:29:25 pm »

I will make a note on the download thread, then. Thanks.
Gespeichert
Seiten: [1]
Drucken
Gehe zu: