drachtio-server
drachtio-server copied to clipboard
Build issue on Mac OS 11.6 (Big Sur) with Xcode 13.0 command line tools, locating OpenSSL header file and library
Various posts on Stack Overflow suggest that the Xcode command line tools in recent versions of Mac OS are unable to locate the OpenSSL header file and library, even after installing them with brew install openssl
, for example this one.
This was the case for me when trying to build the Drachtio-server. I finally found a way, without having to modify the make file.
The OpenSSL library and header file can be found on my system at /usr/local/opt/[email protected]/lib
and /usr/local/opt/[email protected]/include
. My solution to the build problem was to set the following environment variables, per this Stack Overflow post:
export CPATH=/usr/local/opt/[email protected]/include
export LIBRARY_PATH=/usr/local/opt/[email protected]/lib
These effectively add to the command line parameters for g++ and the linker, but it would probably be helpful to include them in the make file, too.