English > Sundtek MediaTV Pro (Europe)

/etc/ld.so.preload conflicts on ubuntu

(1/3) > >>

tvrulesme:
I have a Sundtek MediaTV Pro which used to be installed on a raspberry Pi.

I am moving to Ubuntu Server with the following os:
ubuntu:~/$ lsb_release -a
No LSB modules are available.
Distributor ID:   Ubuntu
Description:   Ubuntu 18.04.1 LTS
Release:   18.04
Codename:   bionic

There is a problem with ld.so.preload
With the line /opt/lib/libmediaclient.so # I can use wscan to view my channels

--- Code: ---w_scan -c GB
w_scan version 20170107 (compiled for DVB API 5.10)
using settings for UNITED KINGDOM
DVB aerial
DVB-T GB
scan type TERRESTRIAL, channellist 6
output format vdr-2.0
WARNING: could not guess your codepage. Falling back to 'UTF-8'
output charset 'UTF-8', use -C <charset> to override
Info: using DVB adapter auto detection.
/dev/dvb/adapter0/frontend0 -> TERRESTRIAL "Sundtek DVB-T (III)": very good :-))

Using TERRESTRIAL frontend (adapter /dev/dvb/adapter0/frontend0)
-_-_-_-_ Getting frontend capabilities-_-_-_-_
Using DVB API 5.10
frontend 'Sundtek DVB-T (III)' supports
DVB-T2
INVERSION_AUTO
QAM_AUTO not supported, trying QAM_64.
TRANSMISSION_MODE_AUTO
GUARD_INTERVAL_AUTO
HIERARCHY_AUTO
FEC_AUTO
BANDWIDTH_AUTO not supported, trying 6/7/8 MHz.
FREQ (42.00MHz ... 1002.00MHz)
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Scanning DVB-T...
Scanning 8MHz frequencies...
474000: (time: 00:02.608) ^C
..
--- Ende Code ---

But this causes errors for all other programs:

--- Code: ---ERROR: ld.so: object '/opt/lib/libmediaclient.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
--- Ende Code ---

But if I comment the line wscan fails

--- Code: ---w_scan -c GB
w_scan version 20170107 (compiled for DVB API 5.10)
using settings for UNITED KINGDOM
DVB aerial
DVB-T GB
scan type TERRESTRIAL, channellist 6
output format vdr-2.0
WARNING: could not guess your codepage. Falling back to 'UTF-8'
output charset 'UTF-8', use -C <charset> to override
Info: using DVB adapter auto detection.
main:4007: FATAL: ***** NO USEABLE TERRESTRIAL CARD FOUND. *****
Please check wether dvb driver is loaded and
verify that no dvb application (i.e. vdr) is running.
--- Ende Code ---

Clearly this server is not only used for your Sundtek MediaTV Pro so do you have a fix for this conflict?

Sundtek:
You're mixing 32 and 64bit applications.
Libc is quite advanced, but the dot on the i is missing by separating /etc/ld.so.preload to 64 and 32bit.

You can isolate the command by prefixing your application:

--- Zitat ---LD_PRELOAD=/opt/lib/libmediaclient.so w_scan -c GB

--- Ende Zitat ---

or running "export LD_PRELOAD=/opt/lib/libmediaclient.so" before accessing the tuner within a terminal/shell session

/etc/ld.so.preload is global, and the default behaviour.

The driver can be installed with the flag -service to not register in /etc/ld.so.preload, and you could also use our streaming server: https://support.sundtek.com/index.php?topic=2099.0 (which is work in progress).

The background here is that linux offers 2 kind of drivers, kernelspace and userspace drivers for USB. While kernelspace drivers need to be compiled for every single kernel version out there the userspace drivers lets us having one driver per architecture only supporting all Linux versions from 2006 on.
When we update the driver all systems will benefit of the latest updates because it's so easy to install.

tvrulesme:
I think you're missing the point here

tvrulesme@ubuntu:~/sundtek$ export LD_PRELOAD=/opt/lib/libmediaclient.so
tvrulesme@ubuntu:~/sundtek$ docker ps
ERROR: ld.so: object '/opt/lib/libmediaclient.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/opt/lib/libmediaclient.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

So your meeting of an environment variable for LD_PRELOAD becomes accessible to all applications. Surely this is terrible practice. Even if it doesn't actually cause anything to fail it seems very badly written to me

Sundtek:
This is Libc not our code.
libc was not adapted to separate 32 and 64bit.

You only need to export LD_PRELOAD before running your target TV application - the export command is only temporary for the current session, if you know what you're doing (and prefer to isolate it) you can just isolate it that way.

Redhat once fixed that by introducing LD_PRELOAD_64 etc. however it's not a mainline thing.
The issue should be addressed to the libc project, and mixing 32 and 64bit system binaries.

it's clearly fixable but someone with access to the glibc library has to fix it.

Reference:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/33994

tvrulesme:
"if you know what you're doing (and prefer to isolate it) you can just isolate it that way"

Honestly given the very high price of this unit (89,00 € currently) I would expect you to be a lot more proactive with your help. Libc is included with every single Linux distribution which makes me assume that their customer base is far far wider than yours. The expectation in this case is that you adapt to their changes, not the other way round. The bug you link to was reported in 2006 so they are clearly not in a hurry to resolve it and it also gave you plenty of time to come up with a fix yourselves.

Let's compare this workaround with your competition.

https://www.ebay.co.uk/p/Xbox-One-Digital-TV-Tuner-Xb1-Genuine-Microsoft/2255654535?iid=123475149092&_trkparms=aid%3D333200%26algo%3DCOMP.MBE%26ao%3D1%26asc%3D20140107084022%26meid%3D452b916268ae46ababd5a28c76c8bc06%26pid%3D100011%26rk%3D3%26rkt%3D12%26sd%3D173381285507%26itm%3D123475149092&_trksid=p2047675.c100011.m1850

So for £10.99 I get the equivalent of your product. Installation is simple, drop the dvb-usb-dib0700-1.20.fw into /lib/firmware and sudo reboot. That's it!

When I'm shopping around for products I always check out the support forums to know I will get after sales service, I assume others are the same.

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln