Skip to content

Commit 7fc14c4

Browse files
authored
Merge pull request #185 from HereThereBeDragons/add-cmake-custom-ldd
Add Building with local libraries
2 parents 6db9b3a + 88bc890 commit 7fc14c4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cpt-quickstart.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,28 @@ On Intel architectures, it needs a gcc :math:`\geq 4.2` compiler, on ARMv7 a gcc
195195
make
196196
sudo make install
197197

198+
199+
Building with local libraries
200+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201+
For development purposes it might be useful to use locally installed libraries instead of using default system libraries.
202+
This can be done by defining variables during the ``cmake`` configuration step.
203+
The correct naming of the variables can be found in ``cmake/Modules``.
204+
For example, in case of Fuse3 following variables must be set: ``FUSE3_INCLUDE_DIR`` and ``FUSE3_LIBRARY``.
205+
206+
Furthermore, ``CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON`` must be set, otherwise will ``sudo make install`` strip all linked libraries that point to none-system libraries.
207+
208+
Example code for building CernVM-FS with locally built Fuse3 and including the CernVM-FS unittests and gateway:
209+
::
210+
211+
cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
212+
-D BUILD_UNITTESTS=ON -D BUILD_GATEWAY=ON \
213+
-D FUSE3_INCLUDE_DIR=/usr/local/include/ \
214+
-D FUSE3_LIBRARY=/usr/local/lib/x86_64-linux-gnu/libfuse3.so.3.10.5 \
215+
../
216+
make
217+
sudo make install
218+
219+
198220
Troubleshooting
199221
---------------
200222

0 commit comments

Comments
 (0)