swipl-devel icon indicating copy to clipboard operation
swipl-devel copied to clipboard

Fixing the package/ssl build on Mac OS X with homebrew deps

Open mye opened this issue 5 years ago • 1 comments

Homebrew installs openssl without SSL3 support which causes the error

Undefined symbols for architecture x86_64:
  "_SSLv3_method", referenced from:
      _pl_ssl_context in ssl4pl.c.o
ld: symbol(s) not found for architecture x86_64

I fixed this by adding

add_compile_definitions(OPENSSL_NO_SSL3_METHOD)

to the end of packages/ssl/CMakeLists.txt. I barely know cmake so I'm not sure if this guarded by some OS-detecting flag would be a proper fix, can make a pull request if so.

mye avatar Feb 27 '19 18:02 mye

That is definitely not the final solution :) Have a look at packages/ssl/CMakeList.txt, where you should find a lot of inspiration to do the right check. Note that while working and testing this, you can run cmake -U 'pattern' .. to only re-run the configuration tests that match pattern (a file glob pattern).

JanWielemaker avatar Feb 27 '19 18:02 JanWielemaker