20221021_gnunet_nonstandard_ext.rst (1689B)
1 non-standard gnunet location 2 ############################ 3 4 :date: 2022-10-21 17:30 5 :modified: 2022-10-21 17:30 6 :category: Code 7 :author: Louis Holbrook 8 :tags: gnunet,c 9 :slug: gnunet-nonstandard-lib-location 10 :summary: Building a gnunet application using a non-standard gnunet library location 11 :lang: en 12 :status: draft 13 14 15 16 ## build gnunet 17 18 .. code-block:: console 19 20 $ cd <gnunet-repo-dir> 21 $ ./bootstrap 22 $ mkdir build 23 $ export GNUNET_BUILD_DIR=$(realpath build) 24 $ ./configure --prefix=$GNUNET_BUILD_DIR --enable-logging=veryverbose --disable-documentation 25 $ make -j8 # or whatever cpu count you have 26 # will be installed in ./build 27 $ make install 28 29 ## build extension 30 31 Change the :code:`.project_dirname` from :code:`gnunet_ext` to :code:`gnunet` in the :code:`GNUNET_OS_ProjectData` struct in the tool and service source files, otherwise configuration will be looked up in the wrong location. 32 33 Resolving the gnunet path is done using :code:`libgnunetext.so` so it is important to make sure it has been linked. 34 35 .. code-block:: console 36 37 $ cd <gnunet-ext-repo-dir> 38 $ export PKG_CONFIG_PATH=$GNUNET_BUILD_DIR/lib/pkgconfig/ 39 $ ./bootstrap 40 $ ./configure --with-gnunet=$GNUNET_BUILD_DIR --prefix=$GNUNET_BUILD_DIRk 41 $ make -j8 CFLAGS="-lgnunetext" 42 $ make install 43 44 ## run extension 45 46 .. code-block:: console 47 48 $ GNUNET_BUILD_DIR=/home/lash/src/build/gnunet/cur/build 49 $ export PATH=$GNUNET_BUILD_DIR/lib/gnunet/libexec:$GNUNET_BUILD_DIR/bin:$PATH 50 $ export LD_LIBRARY_PATH=$GNUNET_BUILD_DIR/lib 51 $ ./build/lib/gnunet/libexec/gnunet-service-ext -L debug