Build openvpn3 - TODO: edit

From PeerFreedom Wiki
Jump to navigation Jump to search

File:Compile.diff
Environemnt:

- Boost 1.70 with asio and libs (atomic date_time filesystem program_options "regex" system thread)
- packages : liblzo2-2 liblzo2-dev liblz4-1 liblz4-dev

Cloning:

git clone https://github.com/OpenVPN/openvpn3.git
6688f2d372a9ffd58f5717cb237c90e74c6bbdb4

Run:

$ mkdir build && cd build
$ BOOST_ROOT=/path/to/boost_installation CC=/path/to/my/compiler_c CXX=/path/to/my/compiler_c++ cmake ..
Output:
-- The C compiler identification is GNU 7.1.0
-- The CXX compiler identification is GNU 7.1.0  
-- Check for working C compiler: /home/user/.local/bin/gcc
-- Check for working C compiler: /home/user/.local/bin/gcc - works                                                                              
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done                                                                                                                       
-- Detecting C compile features                                                                                                                               
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/user/.local/bin/g++            
-- Check for working CXX compiler: /home/user/.local/bin/g++ - works                                
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/workspace/openvpn3/build/test/unittests/googletest-download
Scanning dependencies of target googletest
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
Note: checking out 'release-1.10.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 703bd9ca... Googletest export
[ 33%] No patch step for 'googletest'
[ 44%] Performing update step for 'googletest'
[ 55%] No configure step for 'googletest'
[ 66%] No build step for 'googletest'
[ 77%] No install step for 'googletest'
[ 88%] No test step for 'googletest'
[100%] Completed 'googletest'
[100%] Built target googletest
-- Found PythonInterp: /usr/bin/python (found version "2.7.13")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /home/user/.local/boost/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.70.0") found components: regex
lzo found, running lzo compression tests
-- Found LZ4: /usr/lib/x86_64-linux-gnu/liblz4.so
-- Found OpenSSL: /home/user/.local/lib/libcrypto.so
-- Found Boost: /home/user/.local/boost/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.70.0")
-- Configuring done
WARNING: Target "coreUnitTests" requests linking to directory "/home/user/.local/boost/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "coreUnitTests" requests linking to directory "/home/user/.local/boost/lib".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/user/workspace/openvpn3/build
$ make
$ find $(pwd) -iregex "[^\.]*" -type f -perm 0755 -exec ls -l {} \;