chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Building the openssl egg on MacOS


From: Lassi Kortela
Subject: [Chicken-users] Building the openssl egg on MacOS
Date: Mon, 15 Jul 2019 11:50:20 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On MacOS Mojave, "chicken-install openssl" fails because the OS doesn't ship any pkg-config definition file for its version of the openssl library. The pkg-config definition is supposed to be in a file called 'openssl.pc' but 'sudo find / -name openssl.pc 2>/dev/null' turns up no such file for the OpenSSL that comes with the OS.

(In this version of MacOS the openssl library is actually the OpenSSL compatibility wrapper of the LibreSSL library: "/usr/bin/openssl version" says "LibreSSL 2.6.5". Even though the library is LibreSSL, it's still designed to ship with a file named 'openssl.pc' for compatibility with OpenSSL. But MacOS doesn't have that file.)

The error chicken-install gives is:

    OpenSSL >= 1.0.2 seems to be unavailable

Using the helpful verbose mode of chicken-install I figured out that the source of the error is the pkg-config invocation in the shell script <~/.cache/chicken-install/openssl/build-openssl>.

The easiest workaround is to install a copy of OpenSSL or LibreSSL from the popular Homebrew package manager and build the egg using that copy:

    brew install openssl
    export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig"
    chicken-install openssl

Or:

    brew install libressl
    export PKG_CONFIG_PATH="$(brew --prefix libressl)/lib/pkgconfig"
    chicken-install openssl

In principle one could use the openssl library that ships with MacOS to build the openssl egg. However, on this OS version I can't find the <openssl/ssl.h> C header file anywhere in the file system, even though the library itself is installed as </usr/lib/libssl.dylib>. I installed Apple's command-line developer tools using "sudo xcode-select --install". As far as I can tell, I don't have the full GUI version of XCode anymore with this OS upgrade. I think the GUI version is still available free of charge but it may now require a Mac App Store login to install. From Chicken's point of view, we unfortunately can't assume that people who use Chicken have the full version of XCode.

Many/most MacOS users of intarweb might stumble onto this problem now that HTTPS websites are everywhere, so would it make sense to add MacOS-specific checks to the build-openssl script? Since it seems tricky to reliably find the system OpenSSL header files, maybe it should suggest that people use Homebrew as the easiest alternative. I can write and test a patch for the 'build-openssl' shell script if it helps (well, I already wrote most of it :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]