Can't compile on raspbian

Support forum for minisatip
Post Reply
sharky
Posts: 11
Joined: Sat May 14, 2016 6:15 pm

Can't compile on raspbian

Post by sharky »

Hey,

I'm not able to compile minisatip. Google is not very helpfull with this error message.
pi@raspberrypi:~/minisatip $ sudo make
gcc -ggdb -fPIC -DDISABLE_DVBCSA -DDISABLE_DVBCA -DDISABLE_NETCVCLIENT -o minisatip minisatip.o socketworks.o stream.o adapter.o utils.o aes.o dvbapi.o tables.o satipc.o dvb.o -lpthread -lrt -lcrypto -ldvbcsa
/usr/bin/ld: cannot find -ldvbcsa
collect2: error: ld returned 1 exit status
Makefile:94: recipe for target 'minisatip' failed
make: *** [minisatip] Error 1
pi@raspberrypi:~/minisatip $ uname -a
Linux raspberrypi 4.4.8-v7+ #881 SMP Sat Apr 30 12:16:50 BST 2016 armv7l GNU/Linux


Output from ./configure

Code: Select all

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for main in -lrt... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for int16_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for bzero... yes
checking for clock_gettime... yes
checking for dup2... yes
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for memset... yes
checking for munmap... yes
checking for socket... yes
checking for strchr... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strstr... yes
configure:  == Checking LINUX DVB == 
checking linux/dvb/frontend.h usability... yes
checking linux/dvb/frontend.h presence... yes
checking for linux/dvb/frontend.h... yes
configure:  == Checking DVBEN50221 == 
checking libdvben50221/en50221_app_dvb.h usability... no
checking libdvben50221/en50221_app_dvb.h presence... no
checking for libdvben50221/en50221_app_dvb.h... no
configure:  == Checking OpenSSL == 
checking openssl/aes.h usability... yes
checking openssl/aes.h presence... yes
checking for openssl/aes.h... yes
configure:  == Checking Embedded == 
checking for backtrace... yes
configure:  == Checking DVBCSA == 
checking dvbcsa/dvbcsa.h usability... no
checking dvbcsa/dvbcsa.h presence... no
checking for dvbcsa/dvbcsa.h... no
configure:  == Checking NETCVCLIENT == 
checking netceiver.h usability... no
checking netceiver.h presence... no
checking for netceiver.h... no
configure: creating ./config.status
config.status: creating Makefile

minisatip configuration


Linux DVB:				  enabled
Common Interface (needs DVBEN50221):	  disabled
OpenSSL (AES as part of DVBAPI):	  enabled
Embedded system:			  disabled
DVBCSA (needs libdvbcsa):		  disabled
Netceiver support:			  disabled
SatIP Client:				  enabled
Static:					  disabled

cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: Can't compile on raspbian

Post by cata »

It seems there is a bug in the makefile..the simple fix is to do
apt-get install libdvbcsa-dev

Thanks
sharky
Posts: 11
Joined: Sat May 14, 2016 6:15 pm

Re: Can't compile on raspbian

Post by sharky »

Compiled instantly

Thanks !
morlix
Posts: 1
Joined: Mon Jul 04, 2016 6:54 pm

Re: Can't compile on raspbian

Post by morlix »

I had the same issue on my gentoo box, so it isn't related to raspbian only.

You can also just execute the last gcc command yourself, as it is the last command which produces the minisatip binary. But remove the parameter "-ldvbcsa".

Code: Select all

gcc -ggdb -fPIC -DDISABLE_DVBCSA -DDISABLE_DVBCA -DDISABLE_NETCVCLIENT -o minisatip minisatip.o socketworks.o stream.o adapter.o utils.o aes.o dvbapi.o tables.o satipc.o dvb.o -lpthread -lrt -lcrypto
cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: Can't compile on raspbian

Post by cata »

Hi,

I tried to reproduce this, but was not able to (without dvbcsa installed):

minisatip configuration


Linux DVB: enabled
Common Interface (needs DVBEN50221): disabled
OpenSSL (AES as part of DVBAPI): disabled
Embedded system: disabled
DVBCSA (needs libdvbcsa): disabled
Netceiver support: disabled
SatIP Client: enabled
Static: disabled

root@OrangePI:/usr/src/minisatip-master# make
-bash: make: command not found
root@OrangePI:/usr/src/minisatip-master# apt-get install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
make-doc
The following NEW packages will be installed:
make
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 135 kB of archives.
After this operation, 291 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ wily/main make armhf 4.0-8.2 [135 kB]
Fetched 135 kB in 1s (72.2 kB/s)
Selecting previously unselected package make.
(Reading database ... 20660 files and directories currently installed.)
Preparing to unpack .../make_4.0-8.2_armhf.deb ...
Unpacking make (4.0-8.2) ...
Processing triggers for man-db (2.7.4-1) ...
Setting up make (4.0-8.2) ...
root@OrangePI:/usr/src/minisatip-master# make
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c minisatip.c -o minisatip.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c socketworks.c -o socketworks.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c stream.c -o stream.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c adapter.c -o adapter.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c utils.c -o utils.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c satipc.c -o satipc.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -c dvb.c -o dvb.o
gcc -ggdb -fPIC -DDISABLE_DVBAES -DDISABLE_DVBCSA -DDISABLE_DVBAPI -DDISABLE_DVBCA -DDISABLE_TABLES -DDISABLE_NETCVCLIENT -o minisatip minisatip.o socketworks.o stream.o adapter.o utils.o satipc.o dvb.o -lpthread -lrt
root@OrangePI:/usr/src/minisatip-master#

So I would guess that was something left from a pervious compilation...

Let me know if you can consistently reproduce this...
satellit
Posts: 19
Joined: Sun Jul 17, 2016 4:04 pm

Re: Can't compile on raspbian

Post by satellit »

Hi Cata,
I get the same error on Ubuntu with dvbcsa disabled.

Code: Select all

/usr/bin/ld: cannot find -ldvbcsa
collect2: error: ld returned 1 exit status
BR
satellit
cata
Site Admin
Posts: 768
Joined: Tue May 12, 2015 1:01 am

Re: Can't compile on raspbian

Post by cata »

Can you try something for me?

run ./configure before make
and let me know if you can reproduce.

Thanks
Post Reply