Can't compile source error on CentOS 7 on aarch64

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
snoobz
Posts: 4
Joined: Fri Jul 19, 2019 6:49 am

Can't compile source error on CentOS 7 on aarch64

Post by snoobz » Sun Dec 20, 2020 12:57 pm

Hello,

So I have a Raspberry Pi 4 (architecture aarch64) with CentOS 7 installed on it.
The problem is when I try to compile the version 4.34-9745 RTM (32bit_-_ARM_EABI version) I get this error :

make

make[1]: Entering directory `/root/vpnserver'
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
1ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -fPIE -O2 -fsigned-char -pthread -lm -lrt -Wl,--no-warn-mismatch -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a -ldl -o vpnserver
code/vpnserver.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [i_read_and_agree_the_license_agreement] Error 1
make[1]: Leaving directory `/root/vpnserver'


I also tried to compile from the source code, this time it worked a bit better, but still got an error, but a different one this time when I try to start the vpnserver service :

vpnserver start

/usr/local/libexec/softether/vpnserver/vpnserver: error while loading shared libraries: libcedar.so: cannot open shared object file: No such file or directory

I found the library libcedar that is missing on Github but can't install it, I get this error :

make

/media/usbdisk/xbmc/xbmc-alwinner/buildroot-allwinner/output/host/usr//bin/arm-linux-gnueabihf-g++ --sysroot=/media/usbdisk/xbmc/xbmc-alwinner/buildroot-allwinner/output/host/usr/arm-unknown-linux-gnueabi/sysroot -isystem/media/usbdisk/xbmc/xbmc-alwinner/buildroot-allwinner/output/host/usr/arm-unknown-linux-gnueabi/sysroot/include -fPIC -pipe -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -O3 -fomit-frame-pointer -mabi=aapcs-linux -Wno-psabi -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog -DCEDAR_LIBRARY -DHAVE_LIBCEDAR -DOS_LINUX -isystem/media/usbdisk/xbmc/xbmc-alwinner/buildroot-allwinner/output/staging/staging/usr/include -Isrc/ -c src/CedarBitstreamBufferManager.cpp -o src/CedarBitstreamBufferManager.o -Wno-deprecated-declarations
make: /media/usbdisk/xbmc/xbmc-alwinner/buildroot-allwinner/output/host/usr//bin/arm-linux-gnueabihf-g++: Command not found
make: *** [src/CedarBitstreamBufferManager.o] Error 127

Also, I can't find a RPM package which can install this library libcedar.

Do you guys have any idead how can I solve this problem? If you guys need more info, feel free to ask in order to solve this matter.

Thank you!

snoobz
Posts: 4
Joined: Fri Jul 19, 2019 6:49 am

Re: Can't compile source error on CentOS 7 on aarch64

Post by snoobz » Sun Dec 20, 2020 6:21 pm

Hello,

I found a fix to my problem.

The solution is then to compile from the source code on Github (like I did) but before starting the compiling, you need to create a file in /etc/ld.so.conf.d/

Let's call the file softether.conf (the extension must be .conf)
And add this line in this file : /usr/local/lib64

Then, type this command to reload the configuration : ldconfig

You'll then be able to use command like : vpnserver start

sky59
Posts: 395
Joined: Tue Sep 11, 2018 5:58 pm

Re: Can't compile source error on CentOS 7 on aarch64

Post by sky59 » Sun Dec 20, 2020 6:23 pm

I do not remember by heart, do not you have to run ./configure before make?

If it does not help use crosscompiling or use raspbian.

Can be that centos is a crap.

snoobz
Posts: 4
Joined: Fri Jul 19, 2019 6:49 am

Re: Can't compile source error on CentOS 7 on aarch64

Post by snoobz » Sun Dec 20, 2020 6:30 pm

sky59 wrote:
Sun Dec 20, 2020 6:23 pm
I do not remember by heart, do not you have to run ./configure before make?

If it does not help use crosscompiling or use raspbian.

Can be that centos is a crap.
Hey!

First of, sorry but CentOS isn't crap... I do use only CentOS rather then Debian.

With that being said, regarding the fact that you need to do ./configure actually depends on where you get the SoftEther program.

If you get the source code from Github (for example), yes you do need to ./configure before make.
But if you get your SoftEther program from this URL : https://www.softether-download.com/files/softether/

You do not need to do ./configure before (you don't even have a configure file available), but you do have a Makefile so you can directly make.

I was always using the SoftEther program from the URL given above and never had any issue, but anyway I found a way to definetely fix my problem and I I shared it above just in case someone gets into the same trouble.

Bye!

sky59
Posts: 395
Joined: Tue Sep 11, 2018 5:58 pm

Re: Can't compile source error on CentOS 7 on aarch64

Post by sky59 » Sun Dec 20, 2020 8:22 pm

Fist of all, you provide with URL only foggy information. It is not clear what you really used, which trunk.

If I get it correct your system is 64bit but you want to compile "precompiled" source?
I really do not know what is difference between real source tar.gz and source you try to use.... (please explain what is expected advantage using it and not tar.gz)

I always use real source tar.gz because at least I do know what it is contrary to the "source" you try to use from URL.

I use always openwrt - it gives great support for networking setting.

As you say, centos is not a crap, why not to use real source? It must it compile in 10 minutes.

Post Reply