asdf-postgres: configure: error: library 'crypto' is required for OpenSSL
Trying to install this on macOS 12.3 Beta 2. Getting the following:
/Users/scottrobertson/.asdf/plugins/postgres/bin/install: line 45: uconv: command not found
ls: /opt/openssl@*: No such file or directory
Building with options: --prefix=/Users/scottrobertson/.asdf/installs/postgres/11.5 --with-uuid=e2fs --with-openssl --with-zlib --with-libraries='/opt/local/lib:/sw/lib:/usr/local/opt/openssl/lib:/opt/openssl/lib:/lib:/openssl/lib:/libressl/lib:/lib:/usr/local/lib:/usr/lib' --with-includes='/opt/local/lib:/sw/lib:/usr/local/opt/openssl/include:/opt/openssl/include:/opt/homebrew/include:/include:/openssl/include:/libressl/include:/include:/usr/local/include:/usr/local/lib:/usr/lib'
checking build system type... arm-apple-darwin21.4.0
checking host system type... arm-apple-darwin21.4.0
checking which template to use... darwin
checking whether NLS is wanted... no
checking for default port number... 5432
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gawk... gawk
checking whether gcc supports -Wdeclaration-after-statement, for CFLAGS... yes
checking whether gcc supports -Wendif-labels, for CFLAGS... yes
checking whether g++ supports -Wendif-labels, for CXXFLAGS... yes
checking whether gcc supports -Wmissing-format-attribute, for CFLAGS... yes
checking whether g++ supports -Wmissing-format-attribute, for CXXFLAGS... yes
checking whether gcc supports -Wformat-security, for CFLAGS... yes
checking whether g++ supports -Wformat-security, for CXXFLAGS... yes
checking whether gcc supports -fno-strict-aliasing, for CFLAGS... yes
checking whether g++ supports -fno-strict-aliasing, for CXXFLAGS... yes
checking whether gcc supports -fwrapv, for CFLAGS... yes
checking whether g++ supports -fwrapv, for CXXFLAGS... yes
checking whether gcc supports -fexcess-precision=standard, for CFLAGS... no
checking whether g++ supports -fexcess-precision=standard, for CXXFLAGS... no
checking whether gcc supports -funroll-loops, for CFLAGS_VECTOR... yes
checking whether gcc supports -ftree-vectorize, for CFLAGS_VECTOR... yes
checking whether gcc supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... yes
checking whether gcc supports -Wformat-truncation, for NOT_THE_CFLAGS... no
checking whether gcc supports -Wstringop-truncation, for NOT_THE_CFLAGS... no
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
configure: WARNING: *** Include directory '/opt/local/lib does not exist.
configure: WARNING: *** Include directory /sw/lib does not exist.
configure: WARNING: *** Include directory /usr/local/opt/openssl/include does not exist.
configure: WARNING: *** Include directory /opt/openssl/include does not exist.
configure: WARNING: *** Include directory /include does not exist.
configure: WARNING: *** Include directory /openssl/include does not exist.
configure: WARNING: *** Include directory /libressl/include does not exist.
configure: WARNING: *** Include directory /include does not exist.
configure: WARNING: *** Include directory /usr/local/include does not exist.
configure: WARNING: *** Include directory /usr/lib' does not exist.
configure: WARNING: *** Library directory '/opt/local/lib does not exist.
configure: WARNING: *** Library directory /sw/lib does not exist.
configure: WARNING: *** Library directory /usr/local/opt/openssl/lib does not exist.
configure: WARNING: *** Library directory /opt/openssl/lib does not exist.
configure: WARNING: *** Library directory /lib does not exist.
configure: WARNING: *** Library directory /openssl/lib does not exist.
configure: WARNING: *** Library directory /libressl/lib does not exist.
configure: WARNING: *** Library directory /lib does not exist.
configure: WARNING: *** Library directory /usr/lib' does not exist.
checking allow thread-safe client libraries... yes
checking whether to build with ICU support... no
checking whether to build with Tcl... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build with GSSAPI support... no
checking whether to build with PAM support... no
checking whether to build with BSD Authentication support... no
checking whether to build with LDAP support... no
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... yes
checking whether to build with SELinux support... no
checking whether to build with systemd support... no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by GCC... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for ranlib... ranlib
checking for strip... strip
checking whether it is possible to strip libraries... yes
checking for ar... ar
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking for tar... /usr/bin/tar
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for bison... /usr/bin/bison
configure: using bison (GNU Bison) 2.3
checking for flex... /usr/bin/flex
configure: using flex 2.6.4 Apple(flex-34)
checking for perl... /usr/bin/perl
configure: using perl 5.30.3
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking if compiler needs certain flags to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_REENTRANT
checking for PTHREAD_PRIO_INHERIT... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... no
checking whether strerror_r returns int... yes
checking for main in -lm... yes
checking for library containing setproctitle... no
checking for library containing dlopen... none required
checking for library containing socket... none required
checking for library containing shl_load... no
checking for library containing getopt_long... none required
checking for library containing crypt... none required
checking for library containing shm_open... none required
checking for library containing shm_unlink... none required
checking for library containing clock_gettime... none required
checking for library containing fdatasync... none required
checking for library containing sched_yield... none required
checking for library containing gethostbyname_r... no
checking for library containing shmget... none required
checking for library containing readline... -lreadline
checking for inflate in -lz... yes
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL
Note, I have ran brew install gcc readline zlib curl ossp-uuid as well as also trying brew install openssl
asdf v0.9.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (10 by maintainers)
Today I also hit this error and definining environmental variable
HOMEBREW_PREFIXto/opt/homebrewfixed it for me. Maybe brew is supposed to define that variable but it is missing now on Apple Silicon?Ok, think I got it.
Why is this different on my machine I wonder vs everyone else on the team who does not have these issues.
This situation is still not perfect. Even though
HOMEBREW_PREFIXwas set to the correct path on my new macbook (running Ventura 13.0.1), I still had to follow the steps from @smashedtoatoms’ comment above for it to findcrypto.Fully replacing the LDFLAGS and CPPFLAGS works ‘fine’ for installing this particular asdf command right now, as long as you close the shell afterwards. If you want to install other programs you might need other extensions to library paths. So you might prefer e.g.
instead.
Sorry all, my Github notifications are failing. I updated the readme to capture this. Thanks, @tino415 for figuring it out and @timriley for confirming it.
Completely fresh macOS (12.13.1) and Homebrew install here, and along with the necessary
brew install gcc readline zlib curl ossp-uuidstep from the README, @tino415’sHOMEBREW_PREFIX=/opt/homebrewis what fixed postgres installation for me.May be worth looking at asdf-ruby. They seem to install openssl every time I do a new version install. Or it may be ruby-build doing it.
Also, I love that you’re using this in place of docker. That is literally why I originally did it. Let me know how I can help.
Let me know if it causes problems and I’ll get it sorted. It’s definitely easier to track down if it happens more often or if I can make it happen directly.
I am going to keep this issue open as a signpost. If I get some time, I will bang on it some more. I tried to compile openssl alongside this at one point to just install my own openssl so it would quit happening, but that has its own sets of challenges. I tried to just download binaries, but then people complained they couldn’t set options. Leaving both in inevitably leads to someone setting their own options and running into this. It’s pretty frustrating.