Opened 2 years ago
Last modified 2 years ago
#4717 assigned defect
Cmake compiler Problem with libusb and pcsc and reader/webif
Reported by: | gabberhead | Owned by: | Gorgone Impertinence |
---|---|---|---|
Priority: | minor | Component: | General |
Severity: | Please fill in | Keywords: | build |
Cc: | Gorgone Impertinence | Sensitive: | no |
Description
in the config i have -DHAVE_PCSC=0 -DHAVE_LIBUSB=0. when i compile it with 0 no pcsc or libusb suport is compiled. thats ok. with 1 on both, both are compiled. thats also ok. but in the webinterface there is:
Reader support: no
normaly if i disable all readers and enable at least 1 there is reader support: yes in the webif. but not when i compile pcsc and libusb with -DHAVE_PCSC=1 -DHAVE_LIBUSB=1
in config.h is see those two entries:
#ifdef WITH_PCSC
#define CARDREADER_PCSC 1
#endif
#ifdef WITH_LIBUSB
#define CARDREADER_SMART 1
#endif
and there is i think the problem. cmake only compile pcsc and libusb support with -DHAVE_PCSC=1 -DHAVE_LIBUSB=1 commands.
when i use -DWITH_LIBUSB and -DWITH_PCSC i get this warning when i compile:
CMake Warning:
Manually-specified variables were not used by the project:
WITH_LIBUSB
WITH_PCSC
i think this is only a cometic problem in the webif only. because even though i compile pcsc and libusc with -DHAVE_PCSC=1 -DHAVE_LIBUSB=1 and in the webif there is the reader support: no entry, libusb and pcsc is correctly compile.
Ausgecheckt, Revision 11499.
-- pthread found. Adding pthread support
-- ssl is added by You but it was already enabled by config file
status SSL is added by config file Y compiling with ssl included
-- openssl found.
-- librt found (needed by libusb).
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- libusb 1.0 found (libusb-1.0.so) Adding smartreader support
-- PCSC headers found (/usr/include/PCSC). Adding PCSC support
GEN webif/pages.c
GEN Compressed 353472 template bytes into 148508 bytes. 204964 saved bytes (57.99%).
-- Utils: operating system: Linux
-- Utils: target system: arm-linux-gnueabihf
-- utils use system libusb functions
--
--
-- operating system: Linux
-- target system: arm-linux-gnueabihf
-- revision: 11499
-- use system libcrypto functions
-- use system pcsc functions
-- use system pthread functions
-- use system libusb functions
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gabberhead/oscam/build_dir
Change History (4)
comment:1 by , 2 years ago
Cc: | added |
---|---|
Component: | Webinterface → General |
Keywords: | build added |
Owner: | set to |
Priority: | Please fill in → minor |
Status: | new → assigned |
comment:2 by , 2 years ago
-DWITH_EMU=0 -DWITH_SOFTCAM=0
Is not recognised in the cmake config. In the config i gave it disabled but it is still build. This is the output:
-- libusb 1.0 found (libusb-1.0.so) Adding smartreader support
-- PCSC headers found (/usr/include/PCSC). Adding PCSC support
-- EMU is added by config compiling with EMU
-- SOFTCAM is added by config linking SoftCam.Key
GENwebif/pages.c
GENCompressed 402448 template bytes into 165572 bytes. 236876 saved bytes (58.86%).
-- Utils: operating system: Linux
-- Utils: target system: arm-linux-gnueabihf
-- utils use system libusb functions
--
--
-- operating system: Linux
-- target system: arm-linux-gnueabihf
-- revision: 11503
-- use system libcrypto functions
-- use system pcsc functions
-- use system pthread functions
-- use system libusb functions
-- Compile with EMU support
-- SoftCam.Key will be linked as well
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gabberhead/oscam/build_dir
[ 0%] Built target svnversion-log
Scanning dependencies of target csoscam
[ 0%] Building C object CMakeFiles/csoscam.dir/oscam-aes.o
comment:3 by , 2 years ago
This, for example, works for me:
cd /usr/src svn co http://www.streamboard.tv/svn/oscam/trunk oscam-svn cd oscam-svn ./config.sh --disable WITH_EMU WITH_SOFTCAM cmake -DWEBIF=1 -DWITH_SSL=1 make USE_PCSC=1 USE_LIBUSB=1
Maybe for you too?
comment:4 by , 2 years ago
This is my script which i have now. With this script all enable or disabled Modules are set correctly:
sudo svn co http://streamboard.tv/svn/oscam/trunk oscam
cd oscam
sudo ./config.sh --enable WEBIF WEBIF_LIVELOG WEBIF_JQUERY WITH_SS
L WITH_LB MODULE_CAMD35_TCP --disable TOUCH HAVE_DVBAPI WITH_NEUTR
INO READ_SDT_CHARSETS IRDETO_GUESSING CS_ANTICASC WITH_DEBUG MODUL
E_MONITOR CS_CACHEEX CW_CYCLE_CHECK LCDSUPPORT LEDSUPPORT CLOCKFIX
IPV6SUPPORT WITH_EMU WITH_SOFTCAM MODULE_CAMD33 MODULE_CAMD35 MOD
ULE_NEWCAMD MODULE_CCCAM MODULE_CCCSHARE MODULE_GBOX MODULE_RADEGA
ST MODULE_SCAM MODULE_SERIAL MODULE_CONSTCW MODULE_PANDORA MODULE_
GHTTP READER_NAGRA READER_NAGRA_MERLIN READER_IRDETO READER_CONAX
READER_CRYPTOWORKS READER_SECA READER_VIACCESS READER_VIDEOGUARD R
EADER_DRE READER_TONGFANG READER_BULCRYPT READER_GRIFFIN READER_DG
CRYPT CARDREADER_PHOENIX CARDREADER_INTERNAL CARDREADER_SC8IN1 CAR
DREADER_MP35 CARDREADER_SMARGO CARDREADER_DB2COM CARDREADER_STAPI
CARDREADER_STAPI5 CARDREADER_STINGER CARDREADER_DRECAS
cd build_dir
sudo ./install.sh
sudo mv oscam /media/fritzbox/bin
sudo rm -fr /media/fritzbox/bin/cifs*
cd /home/gabberhead
The only Problem is the same as before.
Enabling and disabling pcsc and libusb only correctly works with -DHAVE_PCSC=1 -DHAVE_LIBUSB=1
But when libusb and pcsc is enabled and compiled in the webif there is: reader support: NO. Normal if enabled, then must be reader support: yes and smartreader and pcsc both also des.
i will look into it