Hi All, I am trying to run vdr-plugin-sc on my D-link DNS323 running debian. This NAS has an ARM processor, so FFdecsa fails to compile. I am however able to compile and run vdr-plugin-dvb-api. (I cannot connect to OSCAM yet, but that's another discussion) vdr-plugin-dvb-api has code to use both FFdecsa and dvbcsa. I have changed the source of vdr-plugin-sc to use dvbcsa. This compiles and installs fine, but I see the following error in /var/log/syslog when I start VDR vdr: [8061] ERROR: /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28: undefined symbol: _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s vdr: [8118] VDR version 1.7.28 started I see a strange thing with ldd, libdvbcsa.so.1 has not been linked in. I guess I have forgot to tell the linker to use that library: # ldd /usr/lib/vdr/plugins/libsc-cardclient-30.so.1.7.28 libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0 (0xb6da5000) libcrypt.so.1 => /lib/arm-linux-gnueabi/libcrypt.so.1 (0xb6d73000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6ca4000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6bfb000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6bd1000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6a9b000) libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6a8f000) libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6a71000) /lib/ld-linux.so.3 (0xb6f47000) # ldd /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28 libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0 (0xb6d31000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6c61000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6bb8000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6b8e000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6a58000) libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6a4d000) libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6a2e000) /lib/ld-linux.so.3 (0xb6f08000) # ldd /usr/lib/vdr/plugins/libvdr-dvbapi.so libdvbcsa.so.1 => /usr/lib/arm-linux-gnueabi/libdvbcsa.so.1 (0xb6f9b000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6ecb000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6e22000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6df8000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6cc2000) /lib/ld-linux.so.3 (0xb6fe1000) Could somebody have a look at my Makefile (attached)? I suspect I made a mistake there Best regards, Cedric
Hi All, I am trying to run vdr-plugin-sc on my D-link DNS323 running debian. This NAS has an ARM processor, so FFdecsa fails to compile. I am however able to compile and run vdr-plugin-dvb-api. (I cannot connect to OSCAM yet, but that's another discussion) vdr-plugin-dvb-api has code to use both FFdecsa and dvbcsa. I have changed the source of vdr-plugin-sc to use dvbcsa. This compiles and installs fine, but I see the following error in /var/log/syslog when I start VDR vdr: [8061] ERROR: /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28: undefined symbol: _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s vdr: [8118] VDR version 1.7.28 started I see a strange thing with ldd, libdvbcsa.so.1 has not been linked in. I guess I have forgot to tell the linker to use that library: # ldd /usr/lib/vdr/plugins/libsc-cardclient-30.so.1.7.28 libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0 (0xb6da5000) libcrypt.so.1 => /lib/arm-linux-gnueabi/libcrypt.so.1 (0xb6d73000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6ca4000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6bfb000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6bd1000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6a9b000) libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6a8f000) libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6a71000) /lib/ld-linux.so.3 (0xb6f47000) # ldd /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28 libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0 (0xb6d31000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6c61000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6bb8000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6b8e000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6a58000) libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6a4d000) libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6a2e000) /lib/ld-linux.so.3 (0xb6f08000) # ldd /usr/lib/vdr/plugins/libvdr-dvbapi.so libdvbcsa.so.1 => /usr/lib/arm-linux-gnueabi/libdvbcsa.so.1 (0xb6f9b000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6ecb000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6e22000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6df8000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6cc2000) /lib/ld-linux.so.3 (0xb6fe1000) Could somebody have a look at my Makefile (attached)? I suspect I made a mistake there Best regards, Cedric I have added -ldvbcsa to the makefile, but this did not solve the problem: ### Includes and Defines INCLUDES = -I$(VDRDIR) DEFINES = -DPLUGIN_NAME_I18N='"$(PLUGIN)"' SHAREDDEFINES = -DAPIVERSNUM=$(APIVERSNUM) -D_GNU_SOURCE LIBS = -lcrypto -ldvbcsa SHAREDLIBS = ldd now indeed reports the library being linked in: # ldd /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28 libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabi/libcrypto.so.1.0.0 (0xb6dfb000) libdvbcsa.so.1 => /usr/lib/arm-linux-gnueabi/libdvbcsa.so.1 (0xb6dd8000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabi/libstdc++.so.6 (0xb6d09000) libm.so.6 => /lib/arm-linux-gnueabi/libm.so.6 (0xb6c60000) libgcc_s.so.1 => /lib/arm-linux-gnueabi/libgcc_s.so.1 (0xb6c36000) libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6b00000) libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6af4000) libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6ad6000) /lib/ld-linux.so.3 (0xb6fd2000) But VDR still reports the error: vdr: [10991] ERROR: /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28: undefined symbol: _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s vdr: [11048] VDR version 1.7.28 started And during the build, I got a warning that no symbold are used: g++ -g -Wall -Woverloaded-virtual -Wno-parentheses -O2 -fPIC -fno-strict-aliasing -shared sc.o data.o filter.o system.o misc.o cam.o device.o version.o smartcard.o network.o crypto.o system-common.o parse.o log.o override.o -lcrypto -ldvbcsa -o libvdr-sc.so ... dh_shlibdeps -pvdr-plugin-sc dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/vdr-plugin-sc/usr/lib/vdr/plugins/libvdr-sc.so.1.7.28 was not linked against libdvbcsa.so.1 (it uses none of the library's symbols) dh_installdeb -plibvdr-sc-cardclient I find this odd, because /usr/include/dvbcsa/dvbcsa.h contains the function prototypes for both dvbcsa_bs_key_free and dvbcsa_bs_key_s : void dvbcsa_bs_key_free(struct dvbcsa_bs_key_s *key); struct dvbcsa_bs_key_s * dvbcsa_bs_key_alloc(void); But why are they concatenated into one symbol? Best regards, Cedric
Hi,
Am 27.12.2013 11:30, schrieb cedric.dewijs@telfort.nl:
This compiles and installs fine, but I see the following error in /var/log/syslog when I start VDR vdr: [8061] ERROR: /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28: undefined symbol: _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s vdr: [8118] VDR version 1.7.28 started
I find this odd, because /usr/include/dvbcsa/dvbcsa.h contains the function prototypes for both dvbcsa_bs_key_free and dvbcsa_bs_key_s : void dvbcsa_bs_key_free(struct dvbcsa_bs_key_s *key); struct dvbcsa_bs_key_s * dvbcsa_bs_key_alloc(void);
But why are they concatenated into one symbol?
Looks like you are using a plain C library with C++. The undefined symbol is a C++ decorated one:
corei7:~ # c++filt _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s dvbcsa_bs_key_free(dvbcsa_bs_key_s*) corei7:~ #
It seems like the header files for libdvbcsa are not prepared for C++. So the compiler puts a reference for a C++ decorated symbol into the object file which the linker cannot resolve as the library seems to contain only plain C symbols.
Try to put the #include statements for those header files into an extern C block, like this:
extern "C" { #include "headerfile.h" }
This makes the compiler interpret the header file as plain C and -- as a result -- generate plain C symbol references.
Hope this helps.
Bye.
----Origineel Bericht---- Van : rnissl@gmx.de Datum : 27/12/2013 12:14 Aan : vdr@linuxtv.org Onderwerp : Re: [vdr] porting vdr-plugin-sc from FFdecsa to dvbcsa: undefined symbol
Hi,
Am 27.12.2013 11:30, schrieb cedric.dewijs@telfort.nl:
This compiles and installs fine, but I see the following error in /var/log/syslog when I start VDR vdr: [8061] ERROR: /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28: undefined symbol: _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s vdr: [8118] VDR version 1.7.28 started
I find this odd, because /usr/include/dvbcsa/dvbcsa.h contains the function prototypes for both dvbcsa_bs_key_free and dvbcsa_bs_key_s : void dvbcsa_bs_key_free(struct dvbcsa_bs_key_s *key); struct dvbcsa_bs_key_s * dvbcsa_bs_key_alloc(void);
But why are they concatenated into one symbol?
Looks like you are using a plain C library with C++. The undefined symbol is a C++ decorated one:
corei7:~ # c++filt _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s dvbcsa_bs_key_free(dvbcsa_bs_key_s*) corei7:~ #
It seems like the header files for libdvbcsa are not prepared for C++. So the compiler puts a reference for a C++ decorated symbol into the object file which the linker cannot resolve as the library seems to contain only plain C symbols.
Try to put the #include statements for those header files into an extern C block, like this:
extern "C" { #include "headerfile.h" }
This makes the compiler interpret the header file as plain C and -- as a result -- generate plain C symbol references.
Hope this helps.
Bye.
Dipl.-Inform. (FH) Reinhard Nissl mailto:rnissl@gmx.de
Hi Reinhard,
It works! I have done what you said in cam.c. Now VDR starts the plugin without error messages. now let's add the configuration files for sc, and watch some pay-TV (hopefuly)
Thank you very much. Cedric
Hi Reinhard,
It works! I have done what you said in cam.c. Now VDR starts the plugin without error messages. now let's add the configuration files for sc, and watch some pay-TV (hopefuly)
Thank you very much. Cedric
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
I've added the configuration files, after this guide: https://wiki.debian.org/VDR#Adding_support_for_encrypted_broadcasts
Now I got this error in /var/log/syslog : vdr: [15561] [general.debug] internal: ci rb frame sync got=8 avail=8 - 06 00 00 01 80 02 01 80 vdr: [15562] [general.debug] internal: ci rb frame sync got=8 avail=8 - 06 00 00 01 80 02 01 80 vdr: [15561] [general.debug] internal: ci rb frame sync got=11 avail=11 - 09 00 a0 07 01 91 04 00 03 00 41 vdr: [15562] [general.debug] internal: ci rb frame sync got=11 avail=11 - 09 00 a0 07 01 91 04 00 03 00 41 not all devices ready after 30 seconds
Then I executed this: # /bin/echo 2 > /proc/cpu/alignment
After a restart of VDR everything works. I'm now watching an encrypted show. CPU of the NAS is maxed out, but I don't see any framedrops in the show.
best regards, Cedric
On 12/27/2013 06:55 PM, cedric.dewijs@telfort.nl wrote:
not all devices ready after 30 seconds
Then I executed this: # /bin/echo 2 > /proc/cpu/alignment
This could drop performance, instead you can try apply the fix which is not in vdr-sc but should be cleanly applied to its sources as well: https://github.com/manio/vdr-plugin-dvbapi/commit/6bc3f5a419f97dcc1c9d062881...
regards,