Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL build fails in 20210927.1 with OpenSSL #4205

Closed
1 of 8 tasks
mkindahl opened this issue Oct 1, 2021 · 2 comments
Closed
1 of 8 tasks

PostgreSQL build fails in 20210927.1 with OpenSSL #4205

mkindahl opened this issue Oct 1, 2021 · 2 comments

Comments

@mkindahl
Copy link

mkindahl commented Oct 1, 2021

Description

Trying to build PostgreSQL with 20210927.1 fails with an error because the symbol CRYPTO_new_ex_data cannot be found.

$ ./configure --prefix=$HOME/$PG_INSTALL_DIR  --with-openssl --without-readline --without-zlib --without-libxml --with-libraries=/usr/local/opt/openssl/lib --with-includes=/usr/local/opt/openssl/include
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... x86_64-apple-darwin19.6.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 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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for clang option to accept ISO C99... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether clang supports -Wdeclaration-after-statement, for CFLAGS... yes
checking whether clang supports -Werror=vla, for CFLAGS... yes
checking whether clang supports -Wendif-labels, for CFLAGS... yes
checking whether clang++ supports -Wendif-labels, for CXXFLAGS... yes
checking whether clang supports -Wmissing-format-attribute, for CFLAGS... yes
checking whether clang++ supports -Wmissing-format-attribute, for CXXFLAGS... yes
checking whether clang supports -Wformat-security, for CFLAGS... yes
checking whether clang++ supports -Wformat-security, for CXXFLAGS... yes
checking whether clang supports -fno-strict-aliasing, for CFLAGS... yes
checking whether clang++ supports -fno-strict-aliasing, for CXXFLAGS... yes
checking whether clang supports -fwrapv, for CFLAGS... yes
checking whether clang++ supports -fwrapv, for CXXFLAGS... yes
checking whether clang supports -fexcess-precision=standard, for CFLAGS... no
checking whether clang++ supports -fexcess-precision=standard, for CXXFLAGS... no
checking whether clang supports -funroll-loops, for CFLAGS_VECTOR... yes
checking whether clang supports -ftree-vectorize, for CFLAGS_VECTOR... yes
checking whether clang supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... yes
checking whether clang supports -Wformat-truncation, for NOT_THE_CFLAGS... no
checking whether clang supports -Wstringop-truncation, for NOT_THE_CFLAGS... no
checking whether the C compiler still works... yes
checking how to run the C preprocessor... clang -E
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: WARNING: *** Include directory /usr/local/opt/openssl/include does not exist.
configure: WARNING: *** Library directory /usr/local/opt/openssl/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 whether to build with XML 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... /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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... /usr/bin/install -c
checking for tar... /usr/bin/tar
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for bison... /usr/bin/bison
configure: using bison (GNU Bison) 2.3
checking for flex... /usr/bin/flex
configure: using flex 2.5.35 Apple(flex-32)
checking for perl... /usr/local/bin/perl
configure: using perl 5.34.0
checking for a sed that does not truncate output... /usr/bin/sed
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 whether clang is Clang... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
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 CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL
Error: Process completed with exit code 1.

Autotools generate the following file and tries to link it using gcc conftest.c -lcrypto:

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char CRYPTO_new_ex_data ();
int
main ()
{
return CRYPTO_new_ex_data ();
  ;
  return 0;
}

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20210927.1

See https://github.com/timescale/timescaledb/runs/3767097575?check_suite_focus=true

Is it regression?

20210919.1 https://github.com/timescale/timescaledb/pull/3610/checks?check_run_id=3719299026

Expected behavior

It should not abort configure with an error that it cannot find libcrypto

Actual behavior

$ ./configure --prefix=$HOME/$PG_INSTALL_DIR  --with-openssl --without-readline --without-zlib --without-libxml --with-libraries=/usr/local/opt/openssl/lib --with-includes=/usr/local/opt/openssl/include
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... x86_64-apple-darwin19.6.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 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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for clang option to accept ISO C99... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether clang supports -Wdeclaration-after-statement, for CFLAGS... yes
checking whether clang supports -Werror=vla, for CFLAGS... yes
checking whether clang supports -Wendif-labels, for CFLAGS... yes
checking whether clang++ supports -Wendif-labels, for CXXFLAGS... yes
checking whether clang supports -Wmissing-format-attribute, for CFLAGS... yes
checking whether clang++ supports -Wmissing-format-attribute, for CXXFLAGS... yes
checking whether clang supports -Wformat-security, for CFLAGS... yes
checking whether clang++ supports -Wformat-security, for CXXFLAGS... yes
checking whether clang supports -fno-strict-aliasing, for CFLAGS... yes
checking whether clang++ supports -fno-strict-aliasing, for CXXFLAGS... yes
checking whether clang supports -fwrapv, for CFLAGS... yes
checking whether clang++ supports -fwrapv, for CXXFLAGS... yes
checking whether clang supports -fexcess-precision=standard, for CFLAGS... no
checking whether clang++ supports -fexcess-precision=standard, for CXXFLAGS... no
checking whether clang supports -funroll-loops, for CFLAGS_VECTOR... yes
checking whether clang supports -ftree-vectorize, for CFLAGS_VECTOR... yes
checking whether clang supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... yes
checking whether clang supports -Wformat-truncation, for NOT_THE_CFLAGS... no
checking whether clang supports -Wstringop-truncation, for NOT_THE_CFLAGS... no
checking whether the C compiler still works... yes
checking how to run the C preprocessor... clang -E
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: WARNING: *** Include directory /usr/local/opt/openssl/include does not exist.
configure: WARNING: *** Library directory /usr/local/opt/openssl/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 whether to build with XML 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... /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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... /usr/bin/install -c
checking for tar... /usr/bin/tar
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for bison... /usr/bin/bison
configure: using bison (GNU Bison) 2.3
checking for flex... /usr/bin/flex
configure: using flex 2.5.35 Apple(flex-32)
checking for perl... /usr/local/bin/perl
configure: using perl 5.34.0
checking for a sed that does not truncate output... /usr/bin/sed
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 whether clang is Clang... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
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 CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL
Error: Process completed with exit code 1.

Repro steps

  1. Check out postgres
  2. Try to configure with the command line above
@al-cheb
Copy link
Contributor

al-cheb commented Oct 1, 2021

Hey, @mkindahl
Could you please invoke brew install openssl or set /usr/local/opt/openssl@1.1 path to the openssl? We are working on possible workarounds due to brew install openssl installs openssl 3.0.

@al-cheb
Copy link
Contributor

al-cheb commented Oct 1, 2021

Close as duplicate: #4195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants