-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meson: check for availability of dladdr #1286
Conversation
da93507
to
7858c46
Compare
Delete erroneous comment claiming that compiler.has_function is broken. This is based on a misunderstanding of the original logfile. See: pistacheio#1252 (comment) Checking for dladdr works fine. Checking for `dependency('dl')` on versions of meson that are too old to support it does not work, and this is what happened on RedHat ubi-8.
7858c46
to
c15d99a
Compare
@eli-schwartz - thanks for cogent analysis and update. I had just one remaining question. Would it be OK to guard this new meson.build code with an initial test of whether dladdr is already available? In particular, in the meson.version() < 0.62 case, if dladdr is already available, we are sending meson to look for library 'dl', and then, if library dl is found, we test it for dl_addr and add it as a dependency, none of which (presumably?) we'd actually need to do in that scenario. In other words it would look like:
WDYT? |
On the flip side, in the >0.62 case we are now running 3 compile checks instead of 2. Keep in mind: if dladdr is already available, then there will not be a separate "dl" library at all. On some systems, where there used to be one but isn't any longer (such as very recent Linux glibc systems),
You cannot link directly to the shared library since There are no consequences for the resulting installable pistache and it's just there as a compatibility shim for users of old meson versions, so I figured it's easier to change less. That way once you bump the minimum supported meson version you can just delete the version check without rewriting the surrounding code. |
OK |
Thanks for the fix, Eli! |
Delete erroneous comment claiming that compiler.has_function is broken. This is based on a misunderstanding of the original logfile. See: #1252 (comment)
Checking for dladdr works fine. Checking for
dependency('dl')
on versions of meson that are too old to support it does not work, and this is what happened on RedHat ubi-8./cc @dgreatwood