Closed motto76 closed 4 days ago
This error can not reproduce in x64-linux, so I add community-triplet.
This is not a port bug.
It might be a general vcpkg script bug (for static CRT linkage), a CMake bug, or a PROJ bug: PROJ unconditionally sets CMAKE_INSTALL_RPATH (in src/apps/CMakeLists.txt
), and then CMake tries to inject this path into the executable, failing due to static linkage.
There is a mitigation: Inject CMAKE_SKIP_RPATH
into cmake builds. Add
list(PREPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_SKIP_RPATH=ON")
to your custom triplet file. This will affect all (cmake based) ports. YMMV. In case of trouble, you can guard that line with
if([NOT] PORT STREQUAL "...")
Every change to the triplet invalidates cached binary artifacts, so you don't want to do it very often.
For ad-hoc tests, you can also use a command line option:
vcpkg install <port> "--cmake-args=-DVCPKG_CMAKE_CONFIGURE_OPTIONS=-DCMAKE_SKIP_RPATH=ON"
(And that's why I chose to suggest PREPEND
above: Let command line override defaults.)
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
Operating system
Linux Mint 21.4
Compiler
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0,
Steps to reproduce the behavior
Failure logs
nano /home/vmuser/build_proj/vcpkg/buildtrees/proj/install-x64-linux-static-rel-out.log
nano /home/vmuser/build_proj/vcpkg/buildtrees/proj/install-x64-linux-static-rel-err.log
Additional context
I tried a build without the tools and it completed without error.
./vcpkg --overlay-triplets=custom-triplets --triplet=x64-linux-static install proj