Error compiling

Instructions and tips on how to roll your own client installer.
Post Reply
Nookawarra
OpenVpn Newbie
Posts: 2
Joined: Sat Mar 26, 2022 9:35 am

Error compiling

Post by Nookawarra » Sat Mar 26, 2022 9:44 am

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 */

TinCanTech
OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error compiling

Post by TinCanTech » Sat Mar 26, 2022 1:36 pm

Don't use sudo

Always build with a user account.

Nookawarra
OpenVpn Newbie
Posts: 2
Joined: Sat Mar 26, 2022 9:35 am

Re: Error compiling

Post by Nookawarra » Sun Mar 27, 2022 9:36 am

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 */

TinCanTech
OpenVPN Protagonist
Posts: 11142
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error compiling

Post by TinCanTech » Sun Mar 27, 2022 10:19 am

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

300000
OpenVPN Expert
Posts: 676
Joined: Tue May 01, 2012 9:30 pm

Re: Error compiling

Post by 300000 » Sat Sep 24, 2022 10:46 pm

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


User avatar
Pippin
Forum Team
Posts: 1155
Joined: Wed Jul 01, 2015 8:03 am
Location: /dev/null

Re: Error compiling

Post by Pippin » Sun Sep 25, 2022 10:13 am

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.
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

Post Reply