Bug report #5620

libqgis_core in the build directory is not used when running crssync during build

Added by Alister Hood about 2 years ago. Updated about 2 years ago.

Status:Closed Start Date:05/19/2012
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Build / Install
Target version:-
Platform:linux Patch supplied:No
Platform version: Affected version:master
Status info: Causes crash or corruption:No
Resolution:worksforme Tag:

Description

Building on Arch Linux fails like this:

Scanning dependencies of target synccrsdb
../../output/bin/crssync: error while loading shared libraries: libqgis_core.so.1.8.0: cannot open shared object file: No such file or directory
make[2]: *** [src/crssync/CMakeFiles/synccrsdb] Error 127
make[1]: *** [src/crssync/CMakeFiles/synccrsdb.dir/all] Error 2
make: *** [all] Error 2

It looks like it is not looking for libs in the build directory, because if I copy libqgis_core.so.1.8.0 to /usr/lib, then try building again, it is successful.

History

Updated by Radim Blazek about 2 years ago

I have the same problem. It fails during the first installation. Developers do not notice that, because they have already the libs installed. I have used export LD_LIBRARY_PATH=`pwd`/src/core/:$LD_LIBRARY_PATH in build dir to get over, but that is not a solution.

Updated by Radim Blazek about 2 years ago

May be it only happens with CMAKE_SKIP_RPATH ON.

Updated by Radim Blazek about 2 years ago

I am not able to reproduce the problem anymore.

Updated by Leyan Ouyang about 2 years ago

I confirm the same problem, also on ArchLinux, now with libqgis_core.so.1.9.0, but all the rest is similar.

It is due to the line 15 in src/crssync/CMakeLists.txt :
ADD_CUSTOM_TARGET(synccrsdb COMMAND crssync)

cmake then tries to execute crssync but doesn't find libqgis_core. The LD_LIBRARY_PATH should be changed to include ${QGIS_OUTPUT_DIRECTORY}/lib but I do not know the preferred way to do this in Cmake.

Updated by Jürgen Fischer about 2 years ago

Leyan Ouyang wrote:

I confirm the same problem, also on ArchLinux, now with libqgis_core.so.1.9.0, but all the rest is similar.

Is QGIS on ArchLinux built with other cmake rpath settings?

Updated by Alister Hood about 2 years ago

In both https://aur.archlinux.org/packages/qg/qgis-git/PKGBUILD and https://aur.archlinux.org/packages/qg/qgis/PKGBUILD there is this:
-DCMAKE_SKIP_RPATH=ON \
Is that what you mean?

Updated by Jürgen Fischer about 2 years ago

  • Status changed from Open to Closed
  • Resolution set to worksforme

Alister Hood wrote:

In both https://aur.archlinux.org/packages/qg/qgis-git/PKGBUILD and https://aur.archlinux.org/packages/qg/qgis/PKGBUILD there is this: -DCMAKE_SKIP_RPATH=ON \ Is that what you mean?

Yes, that's causing the problem.

Also available in: Atom PDF