mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-01 00:19:07 +02:00
Merge bitcoin/bitcoin#31543: cmake: Always provide RPATH
on NetBSD
11115e9aa845d675a88e18e729913f0aaa11e322 cmake: Always provide `RPATH` on NetBSD (Hennadii Stepanov)
Pull request description:
Apparently, runtime paths cannot be skipped on NetBSD, even for system-wide packages.
On NetBSD 10.0:
- on the master branch @ bb57017b2945d5e0bbd95c7f1a9369a8ab7c6fcd:
```
$ cmake -B build -DCMAKE_C_COMPILER="/usr/pkg/gcc14/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/pkg/gcc14/bin/g++"
$ cmake --build build
$ ./build/src/bitcoin-wallet -version
./build/src/bitcoin-wallet: Shared object "libsqlite3.so.0" not found
$ cmake --install build --prefix /home/hebasto/INSTALL
$ /home/hebasto/INSTALL/bin/bitcoin-wallet -version
/home/hebasto/INSTALL/bin/bitcoin-wallet: Shared object "libsqlite3.so.0" not found
```
- with this PR:
```
$ cmake -B build -DCMAKE_C_COMPILER="/usr/pkg/gcc14/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/pkg/gcc14/bin/g++"
$ cmake --build build
$ ./build/src/bitcoin-wallet -version | head -1
Bitcoin Core bitcoin-wallet utility version v28.99.0-11115e9aa845
$ cmake --install build --prefix /home/hebasto/INSTALL
$ /home/hebasto/INSTALL/bin/bitcoin-wallet -version | head -1
Bitcoin Core bitcoin-wallet utility version v28.99.0-11115e9aa845
```
ACKs for top commit:
theuni:
utACK 11115e9aa8
Tree-SHA512: c9cd5d8c65fcf12677c381060dd53794396b7cd3e61ec39d3c5dadd7cdc08ab9790c59aa346402d53f8f9f317830919edf7f8135a6c0d5703c3bd9e519b157a4
This commit is contained in:
commit
89720b7a1b
@ -580,8 +580,13 @@ endif()
|
||||
# Relevant discussions:
|
||||
# - https://github.com/hebasto/bitcoin/pull/236#issuecomment-2183120953
|
||||
# - https://github.com/bitcoin/bitcoin/pull/30312#issuecomment-2191235833
|
||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
|
||||
# NetBSD always requires runtime paths to be set for executables.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
else()
|
||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
|
||||
endif()
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(doc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user