Closed zeha closed 2 years ago
I'm building with:
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"
On MacOS 12.5.
I'm building with:
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib" export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include" export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"
On MacOS 12.5.
Yeah, that certainly works. But it should not be necessary: the correct flags are already looked up from pkgconfig. They are just not passed to all the necessary places.
Short description
make fails to link
rec_control
on macOS 12:ld: library not found for -lcrypto
Environment
Steps to reproduce
PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/sqlite3/lib/pkgconfig --with-boost=/opt/homebrew
make
Expected behaviour
it should just link
Actual behaviour
Other information
General observation: It looks like various parts assume openssl is always available in the default include and library paths. I think sometimes this can also lead to using headers from the default include path, but then linking against another libcrypto.
I think some long time ago the idea was that different crypto libraries could be used, but now you must have openssl, and so everything just assumes its fine to use it. But then the openssl CFLAGS/LDFLAGS should maybe be added to all compilation and link steps.