Page 1 of 1

Error compiling

Posted: Sat Mar 26, 2022 9:44 am
by Nookawarra
When installing openvpn-2.5.6 running ./configure produced an error. Output of terminal and relevant section of config.log attached.

I have a Gigabyte B560M board and Intel series 11 i5 cpu running Linux Mint Una with kernel 5.13.0.37

I cannot install the files it seems to be complaining about - Scrt1.o, crti.o

Assistance would be appreciated

Terminal:

graeme@B560M:~/Documents/My_download_files/Software/OpenVPN/openvpn-2.5.6$ sudo ./configure
[sudo] password for graeme:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/graeme/Documents/My_download_files/Software/OpenVPN/openvpn-2.5.6':
configure: error: C compiler cannot create executables
See `config.log' for more details

config-log extract:

configure:4072: checking whether the C compiler works
configure:4094: gcc conftest.c >&5
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:4098: $? = 1
configure:4136: result: no
configure: failed program was:
| /* confdefs.h */

Re: Error compiling

Posted: Sat Mar 26, 2022 1:36 pm
by TinCanTech
Don't use sudo

Always build with a user account.

Re: Error compiling

Posted: Sun Mar 27, 2022 9:36 am
by Nookawarra
Thanks TinCanTech

Tried that with the same result. config-log has more info this time - please see below.


Terminal

graeme@B560M:~/Documents/My_download_files/Software/OpenVPN/openvpn-2.5.6$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/graeme/Documents/My_download_files/Software/OpenVPN/openvpn-2.5.6':
configure: error: C compiler cannot create executables
See `config.log' for more details

config-log extract

gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configure:4052: $? = 0
configure:4041: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4052: $? = 1
configure:4041: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:4052: $? = 1
configure:4072: checking whether the C compiler works
configure:4094: gcc conftest.c >&5
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:4098: $? = 1
configure:4136: result: no
configure: failed program was:
| /* confdefs.h */

Re: Error compiling

Posted: Sun Mar 27, 2022 10:19 am
by TinCanTech
Nookawarra wrote:
Sun Mar 27, 2022 9:36 am
checking whether the C compiler works... no
Looks sort-of fatal ..

Re: Error compiling

Posted: Sat Sep 24, 2022 10:46 pm
by 300000
This is how I am compliling Openvpn 2.7 on unbutu 18 if you like you can try it .

Code: Select all

 sudo apt remove openvpn

sudo apt install build-essential

sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev

sudo apt install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev  uuid-dev


sudo add-apt-repository universe
sudo apt update
sudo apt install subversion

 curl -o openvpn-2.5.7.tar.gz https://swupdate.openvpn.org/community/releases/openvpn-2.5.7.tar.gz


tar -xf openvpn-2.5.7.tar.gz


cd openvpn-2.5.7

sudo ./configure

sudo make

sudo make install


Re: Error compiling

Posted: Sun Sep 25, 2022 10:13 am
by Pippin
Hi,

This topic is now 6 months old.
TS is on Ubuntu 20.04.3 (LM Una) and I presume TS has found a solution by now.
I have little experience building from source but a bit of search suggests some packages you listed are not needed, did not verify that though.


Following
https://community.openvpn.net/openvpn/w ... twareRepos
might be the better option.