Skip to content
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

t/01-constants.t fails on Mac (if ExtUtils::PkgConfig is installed?) #47

Open
eserte opened this issue Mar 10, 2020 · 4 comments
Open

Comments

@eserte
Copy link
Contributor

eserte commented Mar 10, 2020

See subject. A sample fail report: http://www.cpantesters.org/cpan/report/6cb8dd74-62d5-11ea-a721-b27f1f24ea8f (more will follow). It seems that the test passes if ExtUtils::PkgConfig is not used and the curl-config fallback is used instead.

@creaktive
Copy link
Collaborator

Looks like /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/curl/ does not provide the missing symbols. Do you have multiple installations of libcurl on your testers? I vaguely remember the official libcurl from Apple being mangled and mutilated in most horrible ways. I gave up on it long ago an use the one from brew :(

@eserte
Copy link
Contributor Author

eserte commented Mar 13, 2020

A preliminary result after some research:

  • pkg-config seems to report the wrong version:
$ pkg-config --modversion libcurl
7.49.1
  • curl-config reports the correct version:
$ curl-config --version
libcurl 7.54.0
  • running pkg-config with the --debug option shows the following:
Parsing package file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12/libcurl.pc'

However, the OS version here is 10.14. There's also a 10.14 directory with a libcurl.pc file in --- this one looks correct, with the correct version.

@eserte
Copy link
Contributor Author

eserte commented Mar 13, 2020

Fix is to reinstall the pkg-config package: brew reinstall pkg-config. Now the correct version is printed:

$ pkg-config libcurl --modversion 
7.54.0

And now Net::Curl builds+tests fine, even with ExtUtils::PkgConfig installed.

So probably there's not much what you can do here. In this case prefering curl-config over pkg-config seems to be safer, but maybe there are other situations where it's the other way around.

Feel free to close this issue if you won't do any actions.

@creaktive
Copy link
Collaborator

Thanks for testing this further! The sad part is that no other tests fail, only the constants-related ones. Perhaps I should compile a list of "essential constants" (for instance the ones used in the test suite of Net::Curl). Parsing libcurl's symbols-in-versions is becoming more and more hopeless as the years go by :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants