Skip to content

Commit

Permalink
ci: expand lib64 workaround to more Linux distros
Browse files Browse the repository at this point in the history
Refs: #5299
Change-Id: I0b40cd2b463b92d3b97d08e9edabab673fb13e57
  • Loading branch information
Pesa committed Feb 6, 2024
1 parent 0b6c561 commit 4dc4b3c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
13 changes: 5 additions & 8 deletions .jenkins.d/10-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ fi
if [[ $ID == macos && ${VERSION_ID%%.*} -ge 12 ]]; then
KEYCHAIN="--without-osx-keychain"
fi
if [[ -n $DISABLE_PCH ]]; then
PCH="--without-pch"
fi

set -x

Expand All @@ -25,25 +22,25 @@ if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
./waf --color=yes distclean

# Build static and shared library in release mode with examples
./waf --color=yes configure --enable-static --enable-shared --with-examples $PCH
./waf --color=yes configure --enable-static --enable-shared --with-examples
./waf --color=yes build

# Cleanup
./waf --color=yes distclean
fi

# Build shared library in debug mode with tests
./waf --color=yes configure --disable-static --enable-shared --debug --with-tests $ASAN $COVERAGE $KEYCHAIN $PCH
./waf --color=yes configure --disable-static --enable-shared --debug --with-tests $ASAN $COVERAGE $KEYCHAIN
./waf --color=yes build

# (tests will be run against the debug version)

# Install
sudo ./waf --color=yes install

if [[ $ID_LIKE == *fedora* ]]; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
if [[ $ID_LIKE == *linux* ]]; then
if [[ $(uname -m) == x86_64 && -d /usr/lib64 ]]; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
sudo ldconfig
fi
2 changes: 1 addition & 1 deletion .jenkins.d/40-headers-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [[ -n $DISABLE_HEADERS_CHECK ]]; then
exit 0
fi

if [[ $ID_LIKE == *fedora* ]]; then
if [[ $ID_LIKE == *linux* && -d /usr/local/lib64/pkgconfig ]]; then
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
fi

Expand Down
28 changes: 14 additions & 14 deletions docs/INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,37 +161,37 @@ been installed:
sudo ldconfig
.. note::
When the library is installed in a non-default location (in general: not in ``/usr/lib``
or ``/usr/local/lib``; on some Linux distros like Fedora and its derivatives, including
CentOS: not in ``/usr/lib``), the following additional actions may be necessary.
On Linux, when the library is installed in a non-default location (generally, not in
``/usr/lib`` or ``/usr/local/lib``), the following additional actions may be necessary.

The library installation path should be added to ``/etc/ld.so.conf`` or in
``/etc/ld.so.conf.d/*.conf`` **before** running ``ldconfig``. For example:
The library installation path should be added to ``/etc/ld.so.conf`` or to
``/etc/ld.so.conf.d/*.conf`` before running ``ldconfig``. For example:

.. code-block:: sh
echo /usr/local/lib | sudo tee /etc/ld.so.conf.d/ndn-cxx.conf
echo /usr/local/lib64 | sudo tee /etc/ld.so.conf.d/ndn-cxx.conf
sudo ldconfig
Alternatively, the ``LD_LIBRARY_PATH`` environment variable can be set to point to
the installation directory of the shared library:

.. code-block:: sh
export LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib64
The ``./waf install`` command installs the following files:

- ``<LIBPATH>/libndn-cxx.a``: static NDN C++ library (if enabled).
- ``<LIBPATH>/libndn-cxx.so``, ``<LIBPATH>/libndn-cxx.so.<VERSION>`` (on Linux),
``<LIBPATH>/libndn-cxx.dylib``, ``<LIBPATH>/libndn-cxx.<VERSION>.dylib`` (on macOS):
- ``<LIBDIR>/libndn-cxx.a``: static NDN C++ library (if enabled).
- ``<LIBDIR>/libndn-cxx.so``, ``<LIBDIR>/libndn-cxx.so.<VERSION>`` (on Linux),
``<LIBDIR>/libndn-cxx.dylib``, ``<LIBDIR>/libndn-cxx.<VERSION>.dylib`` (on macOS):
shared NDN C++ library (if enabled).
- ``<LIBPATH>/pkgconfig/libndn-cxx.pc``: pkgconfig file storing all necessary flags to
- ``<LIBDIR>/pkgconfig/libndn-cxx.pc``: pkgconfig file storing all necessary flags to
build against the library. For example, if the ``pkg-config`` or ``pkgconf-pkg-config``
package is installed and ``PKG_CONFIG_PATH`` is configured properly (or if
``<LIBPATH>/pkgconfig`` is a default search path), the command ``pkg-config --cflags
``<LIBDIR>/pkgconfig`` is a default search path), the command ``pkg-config --cflags
--libs libndn-cxx`` will return all necessary compile and link flags for the library.
- ``<BINPATH>/ndnsec``: command-line tool to manage NDN keys and certificates.
- ``<BINPATH>/ndnsec-*``: convenience aliases for ``ndnsec`` tools.
- ``<BINDIR>/ndnsec``: command-line tool to manage NDN keys and certificates.
- ``<BINDIR>/ndnsec-*``: convenience aliases for ``ndnsec`` tools.

If configured with tests (``./waf configure --with-tests``), the above commands
will also produce:
Expand Down

0 comments on commit 4dc4b3c

Please sign in to comment.