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

Installing on Mac with HomeBrew #2

Open
genio opened this issue Feb 22, 2017 · 4 comments
Open

Installing on Mac with HomeBrew #2

genio opened this issue Feb 22, 2017 · 4 comments

Comments

@genio
Copy link

genio commented Feb 22, 2017

Crypt::OpenSSL::VerifyX509 refuses to install on Macs where OpenSSL is installed via homebrew.

brew install openssl
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
cpanm IO::Socket::SSL

Is generally the path taken in this circumstance, however, with Crypt::OpenSSL::VerifyX509, one must:

cpanm --look Crypt::OpenSSL::VerifyX509
vim Makefile.PL

elsif (-d "/usr/local/ssl/include") {
    cc_inc_paths('/usr/local/ssl/include');
    cc_lib_paths('/usr/local/ssl/lib');
}

perl Makefile.PL
make
make test # fails with bad test
make install

Could you please alter the Makefile.PL to use the above ENV variables if they're set?

@fayland
Copy link

fayland commented Feb 22, 2017

we made a remove on

cc_lib_links('crypto');

and it works for tests. @genio

@fayland
Copy link

fayland commented Feb 22, 2017

https://gist.github.com/fayland/8768b7d7405bb1de68143b4821fd0791

@genio
Copy link
Author

genio commented Feb 22, 2017

That worked here.

diff --git a/Makefile.PL b/Makefile.PL
index c2d26d3..aa85a4e 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -51,9 +51,12 @@ if (-d "/usr/include/openssl") {
 } elsif (-d "/usr/local/ssl/include") {
        cc_inc_paths('/usr/local/ssl/include');
        cc_lib_paths('/usr/local/ssl/lib');
+} elsif (-d "/usr/local/opt/openssl/include") {
+    cc_inc_paths('/usr/local/opt/openssl/include');
+    # cc_lib_paths('/usr/local/opt/openssl/lib');
 }

-cc_lib_links('crypto');
+# cc_lib_links('crypto');
 cc_optimize_flags('-O3 -Wall -Werror');

 requires 'Crypt::OpenSSL::X509';

@jonisno
Copy link

jonisno commented Nov 14, 2018

Same issue here, any chance of a release that fixes this?

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

3 participants