Skip to content

Commit a186007

Browse files
committed
meson: Set up absolute rpaths to libdir
While I (Andres) had planned to use relative rpaths, it looks like agreeing on the precise path might take a bit. So set up absolute rpaths for now. I'm pushing this fairly quickly after posting the patch as several hackers fought with this issue. Discussion: https://postgr.es/m/20220927011951.j3h4o7n6bhf7dwau@awork3.anarazel.de
1 parent 1330dcd commit a186007

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

meson.build

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2471,9 +2471,22 @@ bin_install_rpaths = []
24712471
lib_install_rpaths = []
24722472
mod_install_rpaths = []
24732473

2474-
# Add extra_lib_dirs to rpath. Not needed on darwin, as the install_name of
2475-
# libraries in extra_lib_dirs will be used anyway.
2474+
2475+
# Don't add rpaths on darwin for now - as long as only absolute references to
2476+
# libraries are needed, absolute LC_ID_DYLIB ensures libraries can be found in
2477+
# their final destination.
24762478
if host_system != 'darwin'
2479+
# Add absolute path to libdir to rpath. This ensures installed binaries /
2480+
# libraries find our libraries (mainly libpq).
2481+
bin_install_rpaths += dir_prefix / dir_lib
2482+
lib_install_rpaths += dir_prefix / dir_lib
2483+
mod_install_rpaths += dir_prefix / dir_lib
2484+
2485+
# Add extra_lib_dirs to rpath. This ensures we find libraries we depend on.
2486+
#
2487+
# Not needed on darwin even if we use relative rpaths for our own libraries,
2488+
# as the install_name of libraries in extra_lib_dirs will point to their
2489+
# location anyway.
24772490
bin_install_rpaths += postgres_lib_d
24782491
lib_install_rpaths += postgres_lib_d
24792492
mod_install_rpaths += postgres_lib_d

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy