Can't Compile SoftEther

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Can't Compile SoftEther

Post by Virgil » Thu Jan 05, 2017 8:03 pm

I'm in the very first stages of setting up SoftEther and have done it for months with no problem until recently. When I try to issue to issue the 'make' command, I get the following error:

make[1]: Entering directory '/root/vpnserver'
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libintelaes.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -O2 -fsigned-char -pthread -m64 -lm -ldl -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a lib/libi
ntelaes.a -o vpnserver
/usr/bin/ld: code/vpnserver.a(vpnserver.o): relocation R_X86_64_32 against symbol `StopProcess' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(Unix.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(Cedar.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(Connection.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(Hub.o): relocation R_X86_64_32 against symbol `VPN_9670DF295170' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(Interop_OpenVPN.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(IPsec_IPC.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: code/vpnserver.a(IPsec_PPP.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_termcap.o): relocation R_X86_64_32S against symbol `_nc_globals' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_ti.o): relocation R_X86_64_32S against symbol `boolnames' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_tparm.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_tputs.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(read_entry.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(setbuf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(trim_sgr0.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(unctrl.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_color.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_mvcur.o): relocation R_X86_64_32 against symbol `_nc_outch' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_tstp.o): relocation R_X86_64_32S against symbol `_nc_outch' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_vidattr.o): relocation R_X86_64_32 against symbol `_nc_outch' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(comp_error.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(db_iterator.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(home_terminfo.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(init_keytry.o): relocation R_X86_64_32S against symbol `_nc_tinfo_fkeys' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_baudrate.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_set_term.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(lib_slkrefr.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libncurses.a(resizeterm.o): relocation R_X86_64_32 against symbol `_nc_prescreen' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(compress.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(uncompr.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(deflate.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(trees.o): relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(zutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(inflate.o): relocation R_X86_64_32 against symbol `zcalloc' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(inftrees.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(inffast.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/libintelaes.a(intel_aes.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'i_read_and_agree_the_license_agreement' failed
make[1]: *** [i_read_and_agree_the_license_agreement] Error 1
make[1]: Leaving directory '/root/vpnserver'


How may I fix this?

Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Re: Can't Compile SoftEther

Post by Virgil » Fri Jan 06, 2017 2:12 pm

Anyone? I would appreciate it if someone could provide me with some tips.

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Can't Compile SoftEther

Post by moatazelmasry » Fri Jan 06, 2017 9:17 pm

Which compiler are you using? which OS? Versions???

Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Re: Can't Compile SoftEther

Post by Virgil » Fri Jan 06, 2017 9:52 pm

moatazelmasry wrote:
> Which compiler are you using? which OS? Versions???
Hi @moatazelmasry, I'm using Ubuntu 16.10 and I'm trying to compile softether-vpnserver-v4.20-9608-rtm-2016.04.17-linux-x64-64bit.tar.gz. It's 64 bit.

Do you have any tips?

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Can't Compile SoftEther

Post by moatazelmasry » Sat Jan 07, 2017 12:04 am

Yes please download the latest source from github instead and compile it
https://github.com/SoftEtherVPN/SoftEtherVPN

Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Re: Can't Compile SoftEther

Post by Virgil » Sat Jan 07, 2017 9:09 am

moatazelmasry wrote:
> Yes please download the latest source from github instead and compile it
> https://github.com/SoftEtherVPN/SoftEtherVPN

I did and I get the following error now when I try to issue the 'make' command using the latest source code from github:

root@de ~/SoftEtherVPN # make
cc -DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64 tmp/objs/Mayaqua/Cfg.o tmp/objs/Mayaqua/Encrypt.o tmp/objs/Mayaqua/FileIO.o tmp/objs/Mayaqua/Internat.o tmp/objs/Mayaqua/Kernel.o tmp/objs/Mayaqua/Mayaqua.o tmp/objs/Mayaqua/Memory.o tmp/objs/Mayaqua/Microsoft.o tmp/objs/Mayaqua/Network.o tmp/objs/Mayaqua/Object.o tmp/objs/Mayaqua/OS.o tmp/objs/Mayaqua/Pack.o tmp/objs/Mayaqua/Secure.o tmp/objs/Mayaqua/Str.o tmp/objs/Mayaqua/Table.o tmp/objs/Mayaqua/TcpIp.o tmp/objs/Mayaqua/Tick64.o tmp/objs/Mayaqua/Tracking.o tmp/objs/Mayaqua/Unix.o tmp/objs/Mayaqua/Win32.o tmp/objs/Cedar/Account.o tmp/objs/Cedar/Admin.o tmp/objs/Cedar/AzureClient.o tmp/objs/Cedar/AzureServer.o tmp/objs/Cedar/Bridge.o tmp/objs/Cedar/BridgeUnix.o tmp/objs/Cedar/BridgeWin32.o tmp/objs/Cedar/Cedar.o tmp/objs/Cedar/CedarPch.o tmp/objs/Cedar/Client.o tmp/objs/Cedar/CM.o tmp/objs/Cedar/Command.o tmp/objs/Cedar/Connection.o tmp/objs/Cedar/Console.o tmp/objs/Cedar/Database.o tmp/objs/Cedar/DDNS.o tmp/objs/Cedar/EM.o tmp/objs/Cedar/EtherLog.o tmp/objs/Cedar/Hub.o tmp/objs/Cedar/Interop_OpenVPN.o tmp/objs/Cedar/Interop_SSTP.o tmp/objs/Cedar/IPsec.o tmp/objs/Cedar/IPsec_EtherIP.o tmp/objs/Cedar/IPsec_IKE.o tmp/objs/Cedar/IPsec_IkePacket.o tmp/objs/Cedar/IPsec_IPC.o tmp/objs/Cedar/IPsec_L2TP.o tmp/objs/Cedar/IPsec_PPP.o tmp/objs/Cedar/IPsec_Win7.o tmp/objs/Cedar/Layer3.o tmp/objs/Cedar/Link.o tmp/objs/Cedar/Listener.o tmp/objs/Cedar/Logging.o tmp/objs/Cedar/Nat.o tmp/objs/Cedar/NativeStack.o tmp/objs/Cedar/NM.o tmp/objs/Cedar/NullLan.o tmp/objs/Cedar/Protocol.o tmp/objs/Cedar/Radius.o tmp/objs/Cedar/Remote.o tmp/objs/Cedar/Sam.o tmp/objs/Cedar/SecureInfo.o tmp/objs/Cedar/SecureNAT.o tmp/objs/Cedar/SeLowUser.o tmp/objs/Cedar/Server.o tmp/objs/Cedar/Session.o tmp/objs/Cedar/SM.o tmp/objs/Cedar/SW.o tmp/objs/Cedar/UdpAccel.o tmp/objs/Cedar/UT.o tmp/objs/Cedar/VG.o tmp/objs/Cedar/Virtual.o tmp/objs/Cedar/VLan.o tmp/objs/Cedar/VLanUnix.o tmp/objs/Cedar/VLanWin32.o tmp/objs/Cedar/WaterMark.o tmp/objs/Cedar/WebUI.o tmp/objs/Cedar/WinUi.o tmp/objs/Cedar/Wpc.o src/hamcorebuilder/hamcorebuilder.c -O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz -o tmp/hamcorebuilder
/usr/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
Makefile:318: recipe for target 'tmp/hamcorebuilder' failed
make: *** [tmp/hamcorebuilder] Error 1

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Can't Compile SoftEther

Post by moatazelmasry » Sat Jan 07, 2017 12:00 pm

Please run
apt-get install -y libncurses-dev"

Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Re: Can't Compile SoftEther

Post by Virgil » Sat Jan 07, 2017 7:56 pm

moatazelmasry wrote:
> Please run
> apt-get install -y libncurses-dev"

I'll bother you for the last time. Unfortunately, I still get the exact same errors when I simply issue the command 'make' when I cd into the 'vpnserver' folder. I've taken a screenshot of the error and you can access it through the following link:

https://www.dropbox.com/s/6vwlbhp101unl ... 7.png?dl=0

Again, I've never experienced this before and I've set SoftEther up in countless servers. Your help would be most welcome!

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Can't Compile SoftEther

Post by moatazelmasry » Sat Jan 07, 2017 8:24 pm

You are not bothering me :)

Sorry to ask, but are you sure you installed "libncurses-dev" ??

If you are sure, then try the command:
$ ld -lncurses --verbose

My output:
attempt to open //usr/local/lib/x86_64-linux-gnu/libncurses.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libncurses.a failed
attempt to open //lib/x86_64-linux-gnu/libncurses.so failed
attempt to open //lib/x86_64-linux-gnu/libncurses.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libncurses.so succeeded
opened script file //usr/lib/x86_64-linux-gnu/libncurses.so
opened script file //usr/lib/x86_64-linux-gnu/libncurses.so
attempt to open libncurses.so.5 failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libncurses.so.5 failed
attempt to open //lib/x86_64-linux-gnu/libncurses.so.5 succeeded
libncurses.so.5 (//lib/x86_64-linux-gnu/libncurses.so.5)
attempt to open //usr/local/lib/x86_64-linux-gnu/libtinfo.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libtinfo.a failed
attempt to open //lib/x86_64-linux-gnu/libtinfo.so failed
attempt to open //lib/x86_64-linux-gnu/libtinfo.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libtinfo.so succeeded
-ltinfo (//usr/lib/x86_64-linux-gnu/libtinfo.so)
libdl.so.2 needed by //lib/x86_64-linux-gnu/libncurses.so.5
found libdl.so.2 at //lib/x86_64-linux-gnu/libdl.so.2
libc.so.6 needed by //lib/x86_64-linux-gnu/libncurses.so.5
found libc.so.6 at //lib/x86_64-linux-gnu/libc.so.6
ld-linux-x86-64.so.2 needed by //lib/x86_64-linux-gnu/libdl.so.2
found ld-linux-x86-64.so.2 at //lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
ld: warning: cannot find entry symbol _start; not setting start address

Some paths will succeed and some paths will fail. This command also tells you where ld is looking for the library.

Now search for the library on your system:
$ find / -name libncurses.so

Assume you found it under /bla/libncurses.so
Then create s symlink to that lib under a default path which is being used by ld:
$ ln -sf /bla/libncurses.so /lib/x86_64-linux-gnu/libncurses.so.5

Also try reconfiguring the installed package:
dpkg-reconfigure ncurses-dev

To be honest, if ld search is not able to find ncurses by its own, something is really messed up on your machine

Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Re: Can't Compile SoftEther

Post by Virgil » Sat Jan 07, 2017 9:22 pm

moatazelmasry wrote:
> You are not bothering me :)
>
> Sorry to ask, but are you sure you installed "libncurses-dev" ??
>
> If you are sure, then try the command:

Thanks for the prompt reply! I'm certain that it's installed. I ensured that it was by following the steps you indicated.

1. $ld -lncurses --verbose

The following pops up when I issue that command: https://www.dropbox.com/s/aa3oai566cf70 ... 5.png?dl=0

2. To be honest, if ld search is not able to find ncurses by its own, something is really messed up on your machine

ncurses has been found and is installed in the system, any other tips mate? I'm pulling my hair at the moment

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Can't Compile SoftEther

Post by moatazelmasry » Sat Jan 07, 2017 10:00 pm

To mimic the case, I fired up a new server on digitalocean, with ubuntu 16.10 64 bits
Ran the following commands as root:
$ apt-get update && apt-get upgrade -y
$ apt-get install -y gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev
$ mkdir -p /opt && cd /opt
$ git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
$ cd /opt/SoftEtherVPN
$ ./configure
$ make

and it compiled successfully! So I can not reproduce your problem. Any tips how to do that?


I googled a bit, and it looks like the error similar to "relocation R_X86_64_32 against symbol `StopProcess' can not be used when making a shared object; recompile with -fPIC" means that you can not use a static library to be linked against the dynamic libarary you are trying to build (weird).

The easiest solution is to try from scratsh if you are using some cloud machine.
If not, then we need to clean up a bit before trying further.
Delete and re-clone SoftEther. Then run
$ ./configure --enable-shared
$ make -fPIC

I have no idea whether this will work, since I can not reproduce the error, but try that anyway

Virgil
Posts: 7
Joined: Thu Jan 05, 2017 7:57 pm

Re: Can't Compile SoftEther

Post by Virgil » Sat Jan 07, 2017 11:59 pm

The issues were starting to pile up as I tried getting SoftEther to function with Ubuntu 16.10. I decided to downgrade to wipe my server clean and downgrade to Ubuntu 16.04. I had no issues at all whatsoever. Also, if anyone's reading this and using Hetzner's VPS, keep in mind that you'll be using a NAT configuration (something that wasn't evident to me until I logged in and checked with Hetzner since I could connect to the VPN but not access the Internet).

Thanks for being patient and trying to ensure that I would get this up and running, much appreciated moatazelmasry!

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Can't Compile SoftEther

Post by moatazelmasry » Sun Jan 08, 2017 12:27 am

Cool. Glad it worked out

Mada
Posts: 102
Joined: Sat Jun 20, 2015 9:40 am

Re: Can't Compile SoftEther

Post by Mada » Tue Jan 10, 2017 8:53 am

I´m hitting this problem too when downloading the source from www.softether.com.

Getting it with git clone works. Is it not the same?

There is a ppa for Ubuntu with daily automatically built binary's. Maybe you should advertise that on the home page?

liuxinjianshang
Posts: 5
Joined: Mon Mar 06, 2017 5:06 am

Re: Can't Compile SoftEther

Post by liuxinjianshang » Wed Mar 08, 2017 12:40 pm

moatazelmasry wrote:
> Please run
> apt-get install -y libncurses-dev"
Thank you
Very good answer
me build Success

yanggis
Posts: 9
Joined: Tue Sep 30, 2014 5:13 am

Re: Can't Compile SoftEther

Post by yanggis » Fri Jun 02, 2017 7:54 am

I'm on the same boat. SoftEther cannot compile on Ubuntu server 17.04 with the exactly same error.

jayko
Posts: 6
Joined: Fri Jul 19, 2019 6:00 am

Re: Can't Compile SoftEther

Post by jayko » Sat Jul 20, 2019 2:19 pm

Made an improve and manage to compile but stuck at linker below. anyone have any clue?

the problem start at this line,

ld: archive has no table of contents file 'tmp/as/vpnserver.a' for architecture x86_64

Jays-Mac-mini:SoftEtherVPN_Stable jayko$ make
cc -DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_MACOS -DBRIDGE_PCAP -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64 tmp/objs/Mayaqua/Cfg.o tmp/objs/Mayaqua/Encrypt.o tmp/objs/Mayaqua/FileIO.o tmp/objs/Mayaqua/Internat.o tmp/objs/Mayaqua/Kernel.o tmp/objs/Mayaqua/Mayaqua.o tmp/objs/Mayaqua/Memory.o tmp/objs/Mayaqua/Microsoft.o tmp/objs/Mayaqua/Network.o tmp/objs/Mayaqua/Object.o tmp/objs/Mayaqua/OS.o tmp/objs/Mayaqua/Pack.o tmp/objs/Mayaqua/Secure.o tmp/objs/Mayaqua/Str.o tmp/objs/Mayaqua/Table.o tmp/objs/Mayaqua/TcpIp.o tmp/objs/Mayaqua/Tick64.o tmp/objs/Mayaqua/Tracking.o tmp/objs/Mayaqua/Unix.o tmp/objs/Mayaqua/Win32.o tmp/objs/Cedar/Account.o tmp/objs/Cedar/Admin.o tmp/objs/Cedar/AzureClient.o tmp/objs/Cedar/AzureServer.o tmp/objs/Cedar/Bridge.o tmp/objs/Cedar/BridgeUnix.o tmp/objs/Cedar/BridgeWin32.o tmp/objs/Cedar/Cedar.o tmp/objs/Cedar/CedarPch.o tmp/objs/Cedar/Client.o tmp/objs/Cedar/CM.o tmp/objs/Cedar/Command.o tmp/objs/Cedar/Connection.o tmp/objs/Cedar/Console.o tmp/objs/Cedar/Database.o tmp/objs/Cedar/DDNS.o tmp/objs/Cedar/EM.o tmp/objs/Cedar/EtherLog.o tmp/objs/Cedar/Hub.o tmp/objs/Cedar/Interop_OpenVPN.o tmp/objs/Cedar/Interop_SSTP.o tmp/objs/Cedar/IPsec.o tmp/objs/Cedar/IPsec_EtherIP.o tmp/objs/Cedar/IPsec_IKE.o tmp/objs/Cedar/IPsec_IkePacket.o tmp/objs/Cedar/IPsec_IPC.o tmp/objs/Cedar/IPsec_L2TP.o tmp/objs/Cedar/IPsec_PPP.o tmp/objs/Cedar/IPsec_Win7.o tmp/objs/Cedar/Layer3.o tmp/objs/Cedar/Link.o tmp/objs/Cedar/Listener.o tmp/objs/Cedar/Logging.o tmp/objs/Cedar/Nat.o tmp/objs/Cedar/NativeStack.o tmp/objs/Cedar/NM.o tmp/objs/Cedar/NullLan.o tmp/objs/Cedar/Protocol.o tmp/objs/Cedar/Radius.o tmp/objs/Cedar/Remote.o tmp/objs/Cedar/Sam.o tmp/objs/Cedar/SecureInfo.o tmp/objs/Cedar/SecureNAT.o tmp/objs/Cedar/SeLowUser.o tmp/objs/Cedar/Server.o tmp/objs/Cedar/Session.o tmp/objs/Cedar/SM.o tmp/objs/Cedar/SW.o tmp/objs/Cedar/UdpAccel.o tmp/objs/Cedar/UT.o tmp/objs/Cedar/VG.o tmp/objs/Cedar/Virtual.o tmp/objs/Cedar/VLan.o tmp/objs/Cedar/VLanUnix.o tmp/objs/Cedar/VLanWin32.o tmp/objs/Cedar/WaterMark.o tmp/objs/Cedar/WebUI.o tmp/objs/Cedar/WinUi.o tmp/objs/Cedar/Wpc.o src/hamcorebuilder/hamcorebuilder.c -O2 -fsigned-char -m64 -lm -lpthread -lssl -lcrypto -liconv -lreadline -lncurses -lz -lpcap -o tmp/hamcorebuilder
tmp/hamcorebuilder src/bin/hamcore/ src/bin/BuiltHamcoreFiles/unix/hamcore.se2
hamcore.se2 Build Utility
Copyright (c) SoftEther VPN Project. All Rights Reserved.

Src Dir: 'src/bin/hamcore/'
Dest Filename: 'src/bin/BuiltHamcoreFiles/unix/hamcore.se2'

Processing...
src/bin/hamcore/authors.txt: 82 -> 78
src/bin/hamcore/backup_dir_readme.txt: 314 -> 130
src/bin/hamcore/empty.config: 37 -> 42
src/bin/hamcore/empty_sevpnclient.config: 1921 -> 866
src/bin/hamcore/eula.txt: 3587 -> 1671
src/bin/hamcore/install_src.dat: 13 -> 21
src/bin/hamcore/lang.config: 698 -> 409
src/bin/hamcore/languages.txt: 403 -> 346
src/bin/hamcore/languages_wine.txt: 260 -> 223
src/bin/hamcore/legal.txt: 43321 -> 12071
src/bin/hamcore/openvpn_readme.pdf: 490556 -> 479129
src/bin/hamcore/openvpn_readme.txt: 13030 -> 5081
src/bin/hamcore/openvpn_sample.ovpn: 4535 -> 1682
src/bin/hamcore/root_certs.dat: 400489 -> 275260
src/bin/hamcore/SOURCES_OF_BINARY_FILES.TXT: 6167 -> 2530
src/bin/hamcore/strtable_cn.stb: 564093 -> 151976
src/bin/hamcore/strtable_en.stb: 646635 -> 147560
src/bin/hamcore/strtable_ja.stb: 811031 -> 157501
src/bin/hamcore/vpnserver_api_doc.html: 627154 -> 53763
src/bin/hamcore/vpnweb_sample_cn.htm: 3965 -> 1578
src/bin/hamcore/vpnweb_sample_en.htm: 3965 -> 1578
src/bin/hamcore/vpnweb_sample_ja.htm: 4856 -> 1978
src/bin/hamcore/warning_cn.txt: 32104 -> 11779
src/bin/hamcore/warning_en.txt: 37596 -> 11815
src/bin/hamcore/warning_ja.txt: 52545 -> 13598
src/bin/hamcore/webui/cryptcom.cgi: 1729 -> 865
src/bin/hamcore/webui/edituser.cgi: 1495 -> 723
src/bin/hamcore/webui/error.cgi: 279 -> 243
src/bin/hamcore/webui/hub.cgi: 2633 -> 893
src/bin/hamcore/webui/license.cgi: 1852 -> 895
src/bin/hamcore/webui/listener.cgi: 463 -> 328
src/bin/hamcore/webui/localbridge.cgi: 1876 -> 918
src/bin/hamcore/webui/login.cgi: 767 -> 499
src/bin/hamcore/webui/newhub.cgi: 805 -> 473
src/bin/hamcore/webui/redirect.cgi: 254 -> 177
src/bin/hamcore/webui/securenat.cgi: 3169 -> 1125
src/bin/hamcore/webui/server.cgi: 2367 -> 960
src/bin/hamcore/webui/session.cgi: 979 -> 546
src/bin/hamcore/webui/user.cgi: 951 -> 533
src/bin/hamcore/webui/webui.css: 30 -> 38
src/bin/hamcore/wwwroot/index.html: 1999 -> 908
src/bin/hamcore/wwwroot/admin/index.html: 274 -> 180
src/bin/hamcore/wwwroot/admin/README.md: 1170 -> 557
src/bin/hamcore/wwwroot/admin/default/.gitignore: 15 -> 23
src/bin/hamcore/wwwroot/admin/default/hub.html: 653 -> 339
src/bin/hamcore/wwwroot/admin/default/include_footer.html: 106 -> 92
src/bin/hamcore/wwwroot/admin/default/include_head.html: 692 -> 296
src/bin/hamcore/wwwroot/admin/default/include_menu.html: 1464 -> 490
src/bin/hamcore/wwwroot/admin/default/index.html: 2878 -> 1192
src/bin/hamcore/wwwroot/admin/default/package-lock.json: 170740 -> 37920
src/bin/hamcore/wwwroot/admin/default/package.json: 608 -> 299
src/bin/hamcore/wwwroot/admin/default/theme.css: 273 -> 166
src/bin/hamcore/wwwroot/admin/default/tsconfig.json: 5449 -> 1839
src/bin/hamcore/wwwroot/admin/default/tsconfig_webpack.json: 5440 -> 1840
src/bin/hamcore/wwwroot/admin/default/tslint.json: 523 -> 225
src/bin/hamcore/wwwroot/admin/default/webpack.config.js: 833 -> 377
src/bin/hamcore/wwwroot/admin/default/.vscode/launch.json: 454 -> 226
src/bin/hamcore/wwwroot/admin/default/.vscode/settings.json: 82 -> 74
src/bin/hamcore/wwwroot/admin/default/.vscode/tasks.json: 1198 -> 328
src/bin/hamcore/wwwroot/admin/default/out_webpack/bundle.js: 2622100 -> 614017
src/bin/hamcore/wwwroot/admin/default/out_webpack/ts/index.d.ts: 542 -> 256
src/bin/hamcore/wwwroot/admin/default/out_webpack/ts/index.d.ts.map: 555 -> 242
src/bin/hamcore/wwwroot/admin/default/out_webpack/ts/main.d.ts: 620 -> 264
src/bin/hamcore/wwwroot/admin/default/out_webpack/ts/main.d.ts.map: 624 -> 256
src/bin/hamcore/wwwroot/admin/default/out_webpack/ts/vpnadmin.d.ts: 50 -> 58
src/bin/hamcore/wwwroot/admin/default/out_webpack/ts/vpnadmin.d.ts.map: 116 -> 98
src/bin/hamcore/wwwroot/admin/default/src/ts/main.ts: 5662 -> 1736
authors.txt: offset: 2773
backup_dir_readme.txt: offset: 2851
empty.config: offset: 2981
empty_sevpnclient.config: offset: 3023
eula.txt: offset: 3889
install_src.dat: offset: 5560
lang.config: offset: 5581
languages.txt: offset: 5990
languages_wine.txt: offset: 6336
legal.txt: offset: 6559
openvpn_readme.pdf: offset: 18630
openvpn_readme.txt: offset: 497759
openvpn_sample.ovpn: offset: 502840
root_certs.dat: offset: 504522
SOURCES_OF_BINARY_FILES.TXT: offset: 779782
strtable_cn.stb: offset: 782312
strtable_en.stb: offset: 934288
strtable_ja.stb: offset: 1081848
vpnserver_api_doc.html: offset: 1239349
vpnweb_sample_cn.htm: offset: 1293112
vpnweb_sample_en.htm: offset: 1294690
vpnweb_sample_ja.htm: offset: 1296268
warning_cn.txt: offset: 1298246
warning_en.txt: offset: 1310025
warning_ja.txt: offset: 1321840
webui\cryptcom.cgi: offset: 1335438
webui\edituser.cgi: offset: 1336303
webui\error.cgi: offset: 1337026
webui\hub.cgi: offset: 1337269
webui\license.cgi: offset: 1338162
webui\listener.cgi: offset: 1339057
webui\localbridge.cgi: offset: 1339385
webui\login.cgi: offset: 1340303
webui\newhub.cgi: offset: 1340802
webui\redirect.cgi: offset: 1341275
webui\securenat.cgi: offset: 1341452
webui\server.cgi: offset: 1342577
webui\session.cgi: offset: 1343537
webui\user.cgi: offset: 1344083
webui\webui.css: offset: 1344616
wwwroot\admin\default\.gitignore: offset: 1344654
wwwroot\admin\default\.vscode\launch.json: offset: 1344677
wwwroot\admin\default\.vscode\settings.json: offset: 1344903
wwwroot\admin\default\.vscode\tasks.json: offset: 1344977
wwwroot\admin\default\hub.html: offset: 1345305
wwwroot\admin\default\include_footer.html: offset: 1345644
wwwroot\admin\default\include_head.html: offset: 1345736
wwwroot\admin\default\include_menu.html: offset: 1346032
wwwroot\admin\default\index.html: offset: 1346522
wwwroot\admin\default\out_webpack\bundle.js: offset: 1347714
wwwroot\admin\default\out_webpack\ts\index.d.ts: offset: 1961731
wwwroot\admin\default\out_webpack\ts\index.d.ts.map: offset: 1961987
wwwroot\admin\default\out_webpack\ts\main.d.ts: offset: 1962229
wwwroot\admin\default\out_webpack\ts\main.d.ts.map: offset: 1962493
wwwroot\admin\default\out_webpack\ts\vpnadmin.d.ts: offset: 1962749
wwwroot\admin\default\out_webpack\ts\vpnadmin.d.ts.map: offset: 1962807
wwwroot\admin\default\package-lock.json: offset: 1962905
wwwroot\admin\default\package.json: offset: 2000825
wwwroot\admin\default\src\ts\main.ts: offset: 2001124
wwwroot\admin\default\theme.css: offset: 2002860
wwwroot\admin\default\tsconfig.json: offset: 2003026
wwwroot\admin\default\tsconfig_webpack.json: offset: 2004865
wwwroot\admin\default\tslint.json: offset: 2006705
wwwroot\admin\default\webpack.config.js: offset: 2006930
wwwroot\admin\index.html: offset: 2007307
wwwroot\admin\README.md: offset: 2007487
wwwroot\index.html: offset: 2008044
Writing src/bin/BuiltHamcoreFiles/unix/hamcore.se2...

Done.
cp src/bin/BuiltHamcoreFiles/unix/hamcore.se2 bin/vpnserver/hamcore.se2
cc tmp/as/vpnserver.a -O2 -fsigned-char -m64 -lm -lpthread -lssl -lcrypto -liconv -lreadline -lncurses -lz -lpcap -o bin/vpnserver/vpnserver
ld: archive has no table of contents file 'tmp/as/vpnserver.a' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/vpnserver/vpnserver] Error 1
Jays-Mac-mini:SoftEtherVPN_Stable jayko$

jayko
Posts: 6
Joined: Fri Jul 19, 2019 6:00 am

Re: Can't Compile SoftEther

Post by jayko » Sun Jul 21, 2019 2:51 am

output after the adding verbose mode as suggested by the compiler

Jays-Mac-mini:SoftEtherVPN_Stable jayko$ make
cc tmp/as/vpnserver.a -O2 -fsigned-char -m64 -lm -lpthread -lssl -lcrypto -liconv -lreadline -lncurses -lz -lpcap -v -o bin/vpnserver/vpnserver
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o bin/vpnserver/vpnserver tmp/as/vpnserver.a -lm -lpthread -lssl -lcrypto -liconv -lreadline -lncurses -lz -lpcap -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin/libclang_rt.osx.a
ld: archive has no table of contents file 'tmp/as/vpnserver.a' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/vpnserver/vpnserver] Error 1
Jays-Mac-mini:SoftEtherVPN_Stable jayko$

olih10200
Posts: 1
Joined: Sat Mar 04, 2023 6:39 am
Contact:

Re: Can't Compile SoftEther

Post by olih10200 » Sat Mar 04, 2023 7:05 am

Hey Folks,

Xorry, if i cannot find a solve ..

Have a newly installed Debi11 (BullsEye) ... Tried to make, but problem as above, .... after reading the build doc for x, i think all dev files are peresnt

can citate the exact (like above :P )
###
root@d11-usb:/tmp/x/SoftEtherVPN_Stable-master# make
cc -DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64 tmp/objs/Mayaqua/Cfg.o tmp/objs/Mayaqua/Encrypt.o tmp/objs/Mayaqua/FileIO.o tmp/objs/Mayaqua/Internat.o tmp/objs/Mayaqua/Kernel.o tmp/objs/Mayaqua/Mayaqua.o tmp/objs/Mayaqua/Memory.o tmp/objs/Mayaqua/Microsoft.o tmp/objs/Mayaqua/Network.o tmp/objs/Mayaqua/Object.o tmp/objs/Mayaqua/OS.o tmp/objs/Mayaqua/Pack.o tmp/objs/Mayaqua/Secure.o tmp/objs/Mayaqua/Str.o tmp/objs/Mayaqua/Table.o tmp/objs/Mayaqua/TcpIp.o tmp/objs/Mayaqua/Tick64.o tmp/objs/Mayaqua/Tracking.o tmp/objs/Mayaqua/Unix.o tmp/objs/Mayaqua/Win32.o tmp/objs/Cedar/Account.o tmp/objs/Cedar/Admin.o tmp/objs/Cedar/AzureClient.o tmp/objs/Cedar/AzureServer.o tmp/objs/Cedar/Bridge.o tmp/objs/Cedar/BridgeUnix.o tmp/objs/Cedar/BridgeWin32.o tmp/objs/Cedar/Cedar.o tmp/objs/Cedar/CedarPch.o tmp/objs/Cedar/Client.o tmp/objs/Cedar/CM.o tmp/objs/Cedar/Command.o tmp/objs/Cedar/Connection.o tmp/objs/Cedar/Console.o tmp/objs/Cedar/Database.o tmp/objs/Cedar/DDNS.o tmp/objs/Cedar/EM.o tmp/objs/Cedar/EtherLog.o tmp/objs/Cedar/Hub.o tmp/objs/Cedar/Interop_OpenVPN.o tmp/objs/Cedar/Interop_SSTP.o tmp/objs/Cedar/IPsec.o tmp/objs/Cedar/IPsec_EtherIP.o tmp/objs/Cedar/IPsec_IKE.o tmp/objs/Cedar/IPsec_IkePacket.o tmp/objs/Cedar/IPsec_IPC.o tmp/objs/Cedar/IPsec_L2TP.o tmp/objs/Cedar/IPsec_PPP.o tmp/objs/Cedar/IPsec_Win7.o tmp/objs/Cedar/Layer3.o tmp/objs/Cedar/Link.o tmp/objs/Cedar/Listener.o tmp/objs/Cedar/Logging.o tmp/objs/Cedar/Nat.o tmp/objs/Cedar/NativeStack.o tmp/objs/Cedar/NM.o tmp/objs/Cedar/NullLan.o tmp/objs/Cedar/Protocol.o tmp/objs/Cedar/Radius.o tmp/objs/Cedar/Remote.o tmp/objs/Cedar/Sam.o tmp/objs/Cedar/SecureInfo.o tmp/objs/Cedar/SecureNAT.o tmp/objs/Cedar/SeLowUser.o tmp/objs/Cedar/Server.o tmp/objs/Cedar/Session.o tmp/objs/Cedar/SM.o tmp/objs/Cedar/SW.o tmp/objs/Cedar/UdpAccel.o tmp/objs/Cedar/UT.o tmp/objs/Cedar/VG.o tmp/objs/Cedar/Virtual.o tmp/objs/Cedar/VLan.o tmp/objs/Cedar/VLanUnix.o tmp/objs/Cedar/VLanWin32.o tmp/objs/Cedar/WaterMark.o tmp/objs/Cedar/WebUI.o tmp/objs/Cedar/WinUi.o tmp/objs/Cedar/Wpc.o src/hamcorebuilder/hamcorebuilder.c -O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz -o tmp/hamcorebuilder
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [Makefile:356: tmp/hamcorebuilder] Error 1
###

pls. make a suggestion, where to ...
thx
--
Olivér

shakibamoshiri
Posts: 285
Joined: Wed Dec 28, 2022 9:10 pm

Re: Can't Compile SoftEther

Post by shakibamoshiri » Sat Mar 04, 2023 10:00 am

stable or master (Debian 11)

prerequisites

Code: Select all

apt-get install -y  cmake gcc g++ make libncurses5-dev libssl-dev libsodium-dev libreadline-dev zlib1g-dev pkg-config
apt-get install -y git curl

build stable

Code: Select all

wget -c 'http://www.softether-download.com/files/softether/v4.41-9782-beta-2022.11.17-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.41-9782-beta-2022.11.17-linux-x64-64bit.tar.gz'
tar -xzf softether-vpnserver-v4.41-9782-beta-2022.11.17-linux-x64-64bit.tar.gz

# build
cd vpnserver
make
ls -la
build latest

Code: Select all

# clone master branch 
git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git softether_latest

# build
cd softether_latest
git submodule init && git submodule update
./configure
make -C build
cd build
ls -la

chadray
Posts: 1
Joined: Sun May 14, 2023 9:50 pm

Re: Can't Compile SoftEther

Post by chadray » Sun May 14, 2023 11:13 pm

I'm having this same issues - linker error when compiling on mac os...

I don't see any resolution, just the stable build / download and pre-req links...??

Has anyone resolved this? I've successfully compiled and executed the client (although i do recall seeing something about the client service not working on mac).

Much appreciate any direction on this...

Post Reply