SWI-Prolog / swipl-devel

SWI-Prolog Main development repository
http://www.swi-prolog.org
Other
974 stars 175 forks source link

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

Open mye opened 5 years ago

mye commented 5 years ago

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.

JanWielemaker commented 5 years ago

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).