Bug #5620
libqgis_core in the build directory is not used when running crssync during build
| 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 |
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 1 year 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 1 year ago
May be it only happens with CMAKE_SKIP_RPATH ON.
Updated by Radim Blazek about 1 year ago
I am not able to reproduce the problem anymore.
Updated by Leyan Ouyang about 1 year 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 11 months 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 11 months 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 11 months ago
- Status changed from New 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.