-
Notifications
You must be signed in to change notification settings - Fork 12
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
Makefile.PL: set include paths correctly #213
base: develop
Are you sure you want to change the base?
Makefile.PL: set include paths correctly #213
Conversation
It turns out that the cc_include_flags function, from Module::Install::XSUtil, doesn’t like being given raw command-line arguments (e.g. a string like "-I/path/to/thing -I/some/thing/else"). We have to give it a list of strings without the prefixing "-I" (e.g. "/path/to/thing", "/some/thing/else"). This commit takes care of that.
@marc-vanderwal, this is a draft. Is it ready for review? |
Not yet, I’d like to know if it works on someone else’s machine, for example @ondohotola’s setup. |
I have built and installed on FreeBSD without any issues. |
It builds on the Intel (15.1.1) without any issues. On the Silicon (15.1.1) with Homebrew (including
The following works:
showing:
|
The cc_libs function in Module::Install::XSUtil expects a list of strings, while we were passing it a single string containing whitespace-delimited items. Split it, so that it hopefully works as intended.
@ondohotola Thanks for the feedback! And it’s a good thing that passing I’ve found a small mistake in my new code and pushed a fix. Does that work on ARM-based Macs too? |
No, does not work on ARM:
|
I just found out that
also works. Still not ideal, but one doesn't have to go into the build directory. |
When pkg-config is used to discover the appropriate header and library locations, the new code forgot to update a hash that is passed to the cc_assert_lib function later on. This means that on systems with non-traditional locations for openssl or ldns libraries, the cc_assert_lib didn’t check the locations previously discovered by pkg-config. This commit should ensure that cc_assert_lib finds those libraries when testing for their presence.
I agree that it isn’t ideal. Actually, I think I’ve found the problem: I forgot to update a data structure later passed on to functions in Devel::CheckLib with the information obtained from |
Same error on AMR, works on Intel |
Purpose
This PR addresses an oversight in #210 that causes Makefile.PL to fail when a library needs include paths (
-I
) specified on the compiler command line.Context
See:
Changes
Filter the output of
pkg-config
to turn it into a list of raw paths, for consumption bycc_include_paths
from Module::Install::XSUtil.How to test this PR
Run Makefile.PL, ideally while having OpenSSL or LDNS installed in a custom location such as the user’s home directory.