Closed farbodahm closed 3 years ago
You are missing the autoconf-archive package.
# apt-get install build-essential git pkg-config autoconf autoconf-archive libglib2.0-dev libjsoncpp-dev uuid-dev liblz4-dev libcap-ng-dev libxml2-utils python3-minimal python3-dbus python3-docutils python3-jinja2 libxml2-utils libtinyxml2-dev
This should give you all the dependencies you need. If you also want to test out the --enable-dco
feature (also requires a kernel module), you need to add libnl-3-dev libnl-genl-3-dev protobuf-compiler libprotobuf-dev
as well (README.md will be updated accordingly before next release)
@dsommers Thanks for your answer, I have all these packages installed, but still can't build the project with the same problem.
sudo apt-get install build-essential git pkg-config autoconf autoconf-archive libglib2.0-dev libjsoncpp-dev uuid-dev liblz4-dev libcap-ng-dev libxml2-utils python3-minimal python3-dbus python3-docutils python3-jinja2 libxml2-utils libtinyxml2-dev Reading package lists... Done Building dependency tree
Reading state information... Done autoconf is already the newest version (2.69-11.1). build-essential is already the newest version (12.8ubuntu1). git is already the newest version (1:2.25.1-1ubuntu3). libcap-ng-dev is already the newest version (0.7.9-2.1build1). libjsoncpp-dev is already the newest version (1.7.4-3.1ubuntu2). liblz4-dev is already the newest version (1.9.2-2). libxml2-utils is already the newest version (2.9.10+dfsg-5). pkg-config is already the newest version (0.29.1-0ubuntu4). python3-dbus is already the newest version (1.2.16-1build1). python3-docutils is already the newest version (0.16+dfsg-2). python3-jinja2 is already the newest version (2.10.1-2). python3-minimal is already the newest version (3.8.2-0ubuntu2). autoconf-archive is already the newest version (20190106-2.1ubuntu1). libtinyxml2-dev is already the newest version (7.0.0+dfsg-1build1). libglib2.0-dev is already the newest version (2.64.3-1~ubuntu20.04.1). uuid-dev is already the newest version (2.34-0.1ubuntu9.1). 0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
That's really odd. Do you have this file: /usr/share/aclocal/ax_recursive_eval.m4
? This is the file (from autoconf-archive) which defines the AX_RECURSIVE_EVAL
m4 macro.
Yeah I have that, it contains these lines:
sudo cat /usr/share/aclocal/ax_recursive_eval.m4
AC_DEFUN([AX_RECURSIVE_EVAL], [_lcl_receval="$1" $2=
(test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" _lcl_receval_old='' while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do _lcl_receval_old="[$]_lcl_receval" eval _lcl_receval="\"[$]_lcl_receval\"" done echo "[$]_lcl_receval")
])
Can you try to re-run the ./bootstrap.sh
script before running ./configure
? ... and then pastebin config.log
.
Re-running ./bootstrap.sh
solved the problem and ./configure
completed successfully!
I wanna to try to contribute on main C++ code, so, whenever I changed something should I re-run ./bootstrap.sh
and ./configure
or just make
and make install
would be enough?
Well, I have one more question too.
Running make
takes about 10 mins to run on my machine, do I need to run make
every time that I make changes on main C++ code?
(Because I want to start contributing on C++ part of project, I want to find an alternative way to run away from that long compile time :D)
If you only change the source code (C++, Python), make
and make install
should be enough. If you modify Makefile.am
files, you might want to re-run ./configure
if make
fails. And if you modify configure.ac
, you must re-run autoreconf
(which bootstrap.sh
runs).
To get an up-to-date version reference from the git commit (useful to ensure you really run the expected code), just do rm -f config-version.h
before make
. You can see the version reference with openvpn3 version
and openvpn3-admin version --services
.
And really cool that you want to contribute! Feel free to reach out on mailing lists (openpvn-devel@lists.sourceforge.net, sign up here: https://sourceforge.net/p/openvpn/mailman/) or reach out on IRC: #openvpn-devel @ FreeNode (details here: https://community.openvpn.net/openvpn/wiki/GettingHelp#Developersupport)
Well, I have one more question too. Running
make
takes about 10 mins to run on my machine, do I need to runmake
every time that I make changes on main C++ code? (Because I want to start contributing on C++ part of project, I want to find an alternative way to run away from that long compile time :D)
You can shorten the build-time a bit by not compiling the various test programs with ./configure --disable-build-test-progs
. But more importantly, if your computer has multiple CPU cores (grep -E ^processor /proc/cpuinfo
) you can compile code in parallel. If the grep
command gives you 4 lines, then you build with make -j4
. But you need minimum 1GB per CPU core to build successfully, and the more RAM you have, the better and faster it builds.
Just a word on the test-programs. Building them has the advantage of doing an API check. If these programs stops building, the API the failing program uses has changed somehow. And running them might be useful for debugging various specific issues.
Thanks for your great answers, I didn't know that make
have a parallel computing! That's really interesting!
I'm going to put my C++ readings in practice, I hope I can do helpful commits to Openvpn project :)
Thanks!
A few areas where you can quickly get going .... and doesn't require much C++ coding.
This would at least give you a good understanding of how OpenVPN 3 Linux works, which will probably help you understand where to fix issues in the C++ code.
Hi dear OpenVpn Team, I tried to build this project on my Xubuntu 20.04, but it failed when I ran:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/va
And I should verify thatautoconf-archive
is installed too.Here is the log: