Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile on Ubuntu 18.04 Server #447

Open
heruan opened this Issue Aug 3, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@heruan
Copy link

heruan commented Aug 3, 2018

I'm on the Ubuntu 18.04.1 Server image for Rasberry Pi 2 provided by Ubuntu here and I'm trying to compile CoovaChilli as described in http://coova.github.io/CoovaChilli/DistroBuilding/

This is the output of debuild -b (only the error part):

libtool: compile:  arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I.. -I../json -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF=\"/etc/chilli.conf\" -DDEFPIDFILE=\"/var/run/chilli.pid\" -DDEFSTATEDIR=\"/var/run\" -DSBINDIR=\"/usr/sbin\" -I../json -DDEFLIBDIR=\"/usr/lib/coova-chilli\" -MT ms_chap.lo -MD -MP -MF .deps/ms_chap.Tpo -c ms_chap.c  -fPIC -DPIC -o .libs/ms_chap.o
ms_chap.c: In function ‘MakeKey’:
ms_chap.c:99:3: error: implicit declaration of function ‘des_set_odd_parity’; did you mean ‘DES_set_odd_parity’? [-Werror=implicit-function-declaration]
   des_set_odd_parity((des_cblock *)des_key);
   ^~~~~~~~~~~~~~~~~~
   DES_set_odd_parity
ms_chap.c:99:23: error: ‘des_cblock’ undeclared (first use in this function); did you mean ‘DES_cblock’?
   des_set_odd_parity((des_cblock *)des_key);
                       ^~~~~~~~~~
                       DES_cblock
ms_chap.c:99:23: note: each undeclared identifier is reported only once for each function it appears in
ms_chap.c:99:35: error: expected expression before ‘)’ token
   des_set_odd_parity((des_cblock *)des_key);
                                   ^
ms_chap.c: In function ‘DesEncrypt’:
ms_chap.c:105:3: error: unknown type name ‘des_cblock’; did you mean ‘DES_cblock’?
   des_cblock  des_key;
   ^~~~~~~~~~
   DES_cblock
ms_chap.c:106:3: error: unknown type name ‘des_key_schedule’; did you mean ‘DES_key_schedule’?
   des_key_schedule key_schedule;
   ^~~~~~~~~~~~~~~~
   DES_key_schedule
ms_chap.c:108:16: error: passing argument 2 of ‘MakeKey’ makes pointer from integer without a cast [-Werror=int-conversion]
   MakeKey(key, des_key);
                ^~~~~~~
ms_chap.c:88:1: note: expected ‘u_char * {aka unsigned char *}’ but argument is of type ‘int’
 MakeKey(u_char *key, u_char *des_key)
 ^~~~~~~
ms_chap.c:109:3: error: implicit declaration of function ‘des_set_key’; did you mean ‘DES_set_key’? [-Werror=implicit-function-declaration]
   des_set_key(&des_key, key_schedule);
   ^~~~~~~~~~~
   DES_set_key
ms_chap.c:110:3: error: implicit declaration of function ‘des_ecb_encrypt’; did you mean ‘DES_ecb_encrypt’? [-Werror=implicit-function-declaration]
   des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
   ^~~~~~~~~~~~~~~
   DES_ecb_encrypt
ms_chap.c:110:20: error: ‘des_cblock’ undeclared (first use in this function); did you mean ‘DES_cblock’?
   des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
                    ^~~~~~~~~~
                    DES_cblock
ms_chap.c:110:32: error: expected expression before ‘)’ token
   des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1);
                                ^
cc1: all warnings being treated as errors
Makefile:938: recipe for target 'ms_chap.lo' failed
make[4]: *** [ms_chap.lo] Error 1
make[4]: Leaving directory '/home/ubuntu/src/coova-chilli/src'
Makefile:981: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/ubuntu/src/coova-chilli/src'
Makefile:417: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/ubuntu/src/coova-chilli'
Makefile:345: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/ubuntu/src/coova-chilli'
debian/rules:34: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1152:
dpkg-buildpackage -rfakeroot -us -uc -ui -b failed

Am I missing some dependency? Or maybe a library version mismatch?

@yoanbosch

This comment has been minimized.

Copy link

yoanbosch commented Sep 4, 2018

Hi, did you manage to find a solution to your issue? I am getting he same errors except I'm using a PC with Ubuntu 18.04

@heruan

This comment has been minimized.

Copy link
Author

heruan commented Sep 4, 2018

Not yet, unfortunately; I was hoping for a feedback from the maintainers.

@heruan heruan changed the title Compile on Ubuntu 18.04 Server for ARMHF (Raspberry) Compile on Ubuntu 18.04 Server Sep 4, 2018

@yoanbosch

This comment has been minimized.

Copy link

yoanbosch commented Sep 4, 2018

Hi, the problem is OpenSSL 1.1 - CoovaChilli needs OpenSSL 1.0

apt install openssl1.0
mv /usr/bin/openssl /root/
ln -s /usr/lib/ssl1.0/openssl /usr/bin/openssl
apt remove libssl-dev
apt install libssl1.0-dev

@heruan

This comment has been minimized.

Copy link
Author

heruan commented Sep 5, 2018

Thank you @yoanbosch for the workaround. I'll leave this open to keep track on updating CoovaChilli to OpenSSL 1.1.

@heruan

This comment has been minimized.

Copy link
Author

heruan commented Sep 5, 2018

I'll just add that this command is sufficient for a successful build:

$ sudo apt install libssl1.0-dev

No need to install openssl1.0, nor to move or link binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.