Opened 6 years ago
Closed 5 years ago
#4590 closed defect (fixed)
Compile error Debian 9 #11370
Reported by: | Gorgone Impertinence | Owned by: | |
---|---|---|---|
Priority: | blocker | Component: | Reader |
Severity: | Please fill in | Keywords: | |
Cc: | Sensitive: | no |
Description
reader-cryptoworks.c:10:18: error: field ‘exp’ has incomplete type BIGNUM exp; ^~~ reader-cryptoworks.c:11:18: error: field ‘ucpk’ has incomplete type BIGNUM ucpk; ^~~~ CC<---->reader-irdeto.c
Attachments (6)
Change History (27)
by , 6 years ago
Attachment: | 2EINGR~3.LOG added |
---|
comment:2 by , 6 years ago
Sorry habe Debian 9 überlesen! :-)
Test Umgebung wird gerade installiert.
by , 6 years ago
Attachment: | s3_native_build.log added |
---|
by , 6 years ago
Attachment: | 2PEOVW~0.LOG added |
---|
comment:4 by , 6 years ago
oscam build dont import/execute the struct bignum_st from
cscrypt/bn.h
if i add the struct directly to reader-cryptoworks.c
build is fine
/opt/s3/oscam-svn/reader-cryptoworks.c [-M--] 20 L:[ 1+ 0 1/882] *(20 /23997b) 0010 0x00A [*][X] #include "globals.h" #ifdef READER_CRYPTOWORKS #include "cscrypt/bn.h" #include "oscam-config.h" #include "oscam-emm.h" #include "reader-common.h" typedef struct bignum_st { <------>BN_ULONG *d; <------>int top; <------>int dmax; <------>int neg; <------>int flags; } BIGNUM; struct cryptoworks_data { <------>BIGNUM exp; <------>BIGNUM ucpk; <------>int32_t ucpk_valid; };
comment:6 by , 6 years ago
Priority: | minor → blocker |
---|
comment:7 by , 6 years ago
@gorgone.impertinence stimmt kann ich bestätigen ist im Moment wohl nur unter Debian9 native ein Problem.
Läuft aber mit den Änderungen ohne Probleme durch.
by , 6 years ago
Attachment: | S3_Native.log added |
---|
comment:8 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:9 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
build normal ok
make USE_LIBCRYPTO=1 fail
comment:10 by , 6 years ago
this is trivial because no exist provider on this momen used UCPK on cryptoworks. Whitnout compile cryptoworks reader work all, ssl and too BN in openssl
comment:11 by , 6 years ago
Why do not you use more portable way? Typedef struct not working on every toolchain, beter idea use struct bignum_st *blabla instead of BIGNUM blabla
comment:12 by , 6 years ago
problemexist only if you instaled on PC dev versiu openssl, or you compiled manually openssl, because in latest version you must defined in ./config way and too share libraries as libcrypto etc etc, or make whitnout share this libraries.. i am used debian 64 on intel PC and too on amd pc. all work ok with apt-get install openssl
comment:13 by , 6 years ago
Same problem on Ubuntu. Disabling the reader cryptoworks compiles like a charm. Though, I would like to have all readers in my binary.
Any solution so far?
Cheers
comment:14 by , 6 years ago
Modifying the openssl version I was able to compile oscam with the reader cryptoworks too. I concretely used openssl.1.0.2e.tar.gz
A bit of hardening with the gcc flags and the binary looks like a castle :)
RELRO STACK CANARY NX PIE RPATH RUNPATH FORTIFY FORTIFIED FORTIFY-able FILE Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH Yes 15 30 oscam-1.20-unstable_svn11378-arm-linux-gnueabihf-ssl-hardened
by , 6 years ago
Attachment: | reader-cryptoworks.patch added |
---|
comment:15 by , 6 years ago
With above attached patch oscam compiles and runs fine, but I don't have any cryptoworks card so can't test if it works.
comment:16 by , 6 years ago
Updated my debian today from 8.8 to 9.0
Update and compiling of oscam fails here too with warnings and errors:
CC module-webif-lib.c module-webif-lib.c:836:13: warning: ‘SSL_dyn_destroy_function’ defined but not used [-Wunused-function] static void SSL_dyn_destroy_function(struct CRYPTO_dynlock_value *l, const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:822:13: warning: ‘SSL_dyn_lock_function’ defined but not used [-Wunused-function] static void SSL_dyn_lock_function(int32_t mode, struct CRYPTO_dynlock_value *l, const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:804:37: warning: ‘SSL_dyn_create_function’ defined but not used [-Wunused-function] static struct CRYPTO_dynlock_value *SSL_dyn_create_function(const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:790:13: warning: ‘SSL_locking_function’ defined but not used [-Wunused-function] static void SSL_locking_function(int32_t mode, int32_t type, const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:785:22: warning: ‘SSL_id_function’ defined but not used [-Wunused-function] static unsigned long SSL_id_function(void) ^~~~~~~~~~~~~~~ CC module-webif-tpl.c CC module-webif.c CC webif/pages.c CC reader-common.c CC reader-conax.c CC reader-cryptoworks.c reader-cryptoworks.c:11:18: error: field ‘exp’ has incomplete type BIGNUM exp; ^~~ reader-cryptoworks.c:12:18: error: field ‘ucpk’ has incomplete type BIGNUM ucpk; ^~~~ Makefile:415: die Regel für Ziel „build/x86_64-linux-gnu-ssl/reader-cryptoworks.o“ scheiterte make[1]: *** [build/x86_64-linux-gnu-ssl/reader-cryptoworks.o] Fehler 1 Makefile:367: die Regel für Ziel „all“ scheiterte make: *** [all] Fehler 2
comment:17 by , 6 years ago
Cross compilation on FreeBSD 11.1-STABLE for Debian 9 x86_64 (OpenSSL 1.1.0f included in toolchain) - there're some warnings, but oscam built ok according to this (castrated) setup:
+------------------------------------------------------------------------------- | OSCam ver: 1.20-unstable_svn rev: 11385 target: linux-t5730-oscam-ssl | Tools: | CROSS = /home/oscam/OSCAM/toolchains/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu- | CC = /home/oscam/OSCAM/toolchains/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc | Settings: | CONF_DIR = /usr/local/etc | CC_OPTS = -O2 -ggdb -pipe -ffunction-sections -fdata-sections | CC_WARN = -W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition | CFLAGS = -DWITH_SSL=1 -DWITH_LIBCRYPTO=1 | LDFLAGS = -Wl,--gc-sections -DWITH_SSL=1 -DWITH_LIBCRYPTO=1 | LIBS = -lssl -lcrypto -lpthread | UseFlags = USE_SSL=1 USE_LIBCRYPTO=1 | Config: | Addons : WEBIF WEBIF_LIVELOG WEBIF_JQUERY TOUCH WITH_SSL WITH_DEBUG CLOCKFIX | Protocols: CCCAM CCCSHARE | Readers : NAGRA | CardRdrs : PHOENIX | Compiler : x86_64-unknown-linux-gnu-gcc (crosstool-NG crosstool-ng-1.23.0) 6.3.0 | Config : build/linux-t5730-oscam-ssl/config.mak | Binary : Distribution/oscam-1.20-unstable_svn11385-linux-t5730-oscam-ssl +------------------------------------------------------------------------------- HOSTCC webif/pages_gen GEN webif/pages.c GEN Compressed 437656 template bytes into 177578 bytes. 260078 saved bytes (59.43%). CC cscrypt/i_cbc.c CC cscrypt/i_skey.c CC cscrypt/i_ecb.c CC cscrypt/rc6.c CC cscrypt/md5.c CC csctapi/atr.c CC csctapi/icc_async.c CC csctapi/io_serial.c CC csctapi/protocol_t0.c CC csctapi/protocol_t1.c CC csctapi/ifd_phoenix.c CC minilzo/minilzo.c CC module-cccam.c CC module-cccshare.c CC module-webif-tpl.c CC module-webif-lib.c CC module-webif.c CC webif/pages.c CC reader-common.c CC reader-nagra.c module-webif-lib.c:836:13: warning: 'SSL_dyn_destroy_function' defined but not used [-Wunused-function] static void SSL_dyn_destroy_function(struct CRYPTO_dynlock_value *l, const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:822:13: warning: 'SSL_dyn_lock_function' defined but not used [-Wunused-function] static void SSL_dyn_lock_function(int32_t mode, struct CRYPTO_dynlock_value *l, const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:804:37: warning: 'SSL_dyn_create_function' defined but not used [-Wunused-function] static struct CRYPTO_dynlock_value *SSL_dyn_create_function(const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:790:13: warning: 'SSL_locking_function' defined but not used [-Wunused-function] static void SSL_locking_function(int32_t mode, int32_t type, const char *file, int32_t line) ^~~~~~~~~~~~~~~~~~~~ module-webif-lib.c:785:22: warning: 'SSL_id_function' defined but not used [-Wunused-function] static unsigned long SSL_id_function(void) ^~~~~~~~~~~~~~~ CC oscam-aes.c CC oscam-hashtable.c CC oscam-array.c CC oscam-cache.c CC oscam-chk.c CC oscam-client.c CC oscam-conf.c CC oscam-conf-chk.c CC oscam-conf-mk.c CC oscam-config-account.c CC oscam-config-global.c CC oscam-config-reader.c CC oscam-config.c CC oscam-ecm.c CC oscam-emm.c CC oscam-emm-cache.c CC oscam-failban.c CC oscam-files.c CC oscam-garbage.c CC oscam-lock.c CC oscam-log.c CC oscam-log-reader.c CC oscam-net.c CC oscam-llist.c CC oscam-reader.c CC oscam-simples.c CC oscam-string.c CC oscam-time.c CC oscam-work.c CONF build/linux-t5730-oscam-ssl/config.c CC oscam.c LINK Distribution/oscam-1.20-unstable_svn11385-linux-t5730-oscam-ssl.debug STRIP Distribution/oscam-1.20-unstable_svn11385-linux-t5730-oscam-ssl
Run test:
# ./oscam -V Version: oscam-1.20-unstable_svn-r11385 Compiler: linux-t5730-oscam-ssl Box type: generic (generic) PID: 370 TempDir: ConfigDir: /usr/local/etc/ WebifPort: 0 Web interface support: yes LiveLog support: yes jQuery support intern: yes Touch interface support: yes SSL support: yes DVB API support: no Irdeto guessing: no Anti-cascading support: no Debug mode: yes Monitor: no Loadbalancing support: no Cache exchange support: no CW Cycle Check support: no LCD support: no LED support: no Clockfix with realtime clock: yes IPv6 support: no camd 3.3x: no camd 3.5 UDP: no camd 3.5 TCP: no newcamd: no CCcam: yes CCcam share: yes gbox: no radegast: no scam: no serial: no constant CW: no Pandora: no ghttp: no Reader support: yes Nagra: yes Irdeto: no - no EMM support! Conax: no - no EMM support! Cryptoworks: no - no EMM support! Seca: no - no EMM support! Viaccess: no - no EMM support! NDS Videoguard: no - no EMM support! DRE Crypt: no - no EMM support! TONGFANG: no - no EMM support! Bulcrypt: no - no EMM support! Griffin: no - no EMM support! DGCrypt: no - no EMM support! cardreader_phoenix: yes cardreader_drecas: no cardreader_internal_azbox: no cardreader_internal_coolapi: no cardreader_internal_coolapi2: no cardreader_internal_sci: no cardreader_sc8in1: no cardreader_mp35: no cardreader_smargo: no cardreader_pcsc: no cardreader_smartreader: no cardreader_db2com: no cardreader_stapi: no cardreader_stapi5: no cardreader_stinger: no
I didn't test compilation on bare metal Debian 9.
comment:18 by , 6 years ago
Hi,
any news for this
Description: Debian GNU/Linux 9.0 (stretch) Release: 9.0 Codename: stretch
Compile still doesn't work break at cryptowork reader in:
/usr/src/oscam-svn/reader-cryptoworks.c:11:18: error: field ‘exp’ has incomplete type BIGNUM exp; ^~~ /usr/src/oscam-svn/reader-cryptoworks.c:12:18: error: field ‘ucpk’ has incomplete type BIGNUM ucpk; ^~~~
CMakeFiles/csreaders.dir/build.make:134: návod pro cíl „CMakeFiles/csreaders.dir/reader-cryptoworks.o“ selhal make[2]: *** [CMakeFiles/csreaders.dir/reader-cryptoworks.o] Chyba 1 CMakeFiles/Makefile2:221: návod pro cíl „CMakeFiles/csreaders.dir/all“ selhal make[1]: *** [CMakeFiles/csreaders.dir/all] Chyba 2 Makefile:149: návod pro cíl „all“ selhal make: *** [all] Chyba 2
comment:19 by , 6 years ago
The patch from tmn505 does NOT work for me. Looks like it is malformed. So i build a new patch and this seems to work.
comment:20 by , 6 years ago
Thankyou @The_Raven.
Patch provided worked while building on Raspberry Pi3 "jessie lite"
comment:21 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
build log