... on recent MacOS versions. The configure stage of the build fails otherwise.
Instructions on how to make the Homebrew OpenSSL headers visible... #6885
pull giacecco wants to merge 2 commits into bitcoin:master from changing 1 files +9 −4-
giacecco commented at 8:30 AM on October 24, 2015: none
-
Added instructions on how to make the Homebrew OpenSSL headers visible to the configure script 3f2251ae06
-
paveljanik commented at 4:06 PM on October 24, 2015: contributor
Hmm, shouldn't we instead modify
configureaccordingly on OS X instead? @theuni - what do you think? -
DomT4 commented at 4:34 PM on October 24, 2015: contributor
It's probably worth using
$(brew --prefix openssl)instead of a hardcoded/usr/local/opt/openssl. People can (and do) stick Homebrew almost anywhere. -
Wrong variable name a13fe6d3c4
-
theuni commented at 12:51 AM on October 26, 2015: member
Configure already looks for brew's openssl if brew is detected, so this shouldn't be necessary. Could you please paste a config.log where detection fails?
- laanwj added the label Build system on Oct 26, 2015
-
jonasschnelli commented at 7:33 AM on October 26, 2015: contributor
Agree with @theuni: never had problems with openssl installed through homebrew.
-
giacecco commented at 8:07 AM on October 26, 2015: none
As requested by @theuni:
.../bitcoin-0.11.1$ ./configure --with-gui=qt5 checking build system type... x86_64-apple-darwin15.0.0 checking host system type... x86_64-apple-darwin15.0.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... build-aux/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... yes checking whether make supports nested variables... (cached) yes checking for g++... g++ 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 g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for g++... g++ checking whether we are using the GNU Objective C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to print strings... printf checking for gcc... gcc 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 whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm checking the name lister (/usr/bin/nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert x86_64-apple-darwin15.0.0 file names to x86_64-apple-darwin15.0.0 format... func_convert_file_noop checking how to convert x86_64-apple-darwin15.0.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r checking for objdump... no checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver [@FILE](/bitcoin-bitcoin/contributor/file/) support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking how to run the C preprocessor... gcc -E 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 for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin15.0.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fno-common -DPIC checking if g++ PIC flag -fno-common -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin15.0.0 dyld checking how to hardcode library paths into programs... immediate checking for ar... /usr/bin/ar checking for ranlib... /usr/bin/ranlib checking for strip... /usr/bin/strip checking for gcov... /usr/bin/gcov checking for lcov... no checking for java... /usr/bin/java checking for genhtml... no checking for git... /usr/bin/git checking for ccache... no checking for xgettext... no checking for hexdump... /usr/bin/hexdump checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for port... no checking for brew... brew checking whether the linker accepts -Wl,-headerpad_max_install_names... yes checking whether byte ordering is bigendian... no checking if compiler needs -Werror to reject unknown flags... yes checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... -D_THREAD_SAFE checking for PTHREAD_PRIO_INHERIT... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking whether strerror_r is declared... yes checking for strerror_r... yes checking whether strerror_r returns char *... no checking whether the linker accepts -Wl,--large-address-aware... no checking for __attribute__((visibility))... yes checking for __attribute__((dllexport))... no checking for __attribute__((dllimport))... no checking whether C++ compiler accepts -Wstack-protector... yes checking whether C++ compiler accepts -fstack-protector-all... yes checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes checking whether C++ preprocessor accepts -U_FORTIFY_SOURCE... yes checking whether the linker accepts -Wl,--dynamicbase... no checking whether the linker accepts -Wl,--nxcompat... no checking whether the linker accepts -Wl,-z,relro... no checking whether the linker accepts -Wl,-z,now... no checking whether C++ compiler accepts -fPIE... yes checking whether the linker accepts -pie... yes checking whether the linker accepts -Wl,-dead_strip... yes checking endian.h usability... no checking endian.h presence... no checking for endian.h... no checking sys/endian.h usability... no checking sys/endian.h presence... no checking for sys/endian.h... no checking byteswap.h usability... no checking byteswap.h presence... no checking for byteswap.h... no checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for strings.h... (cached) yes checking for sys/types.h... (cached) yes checking for sys/stat.h... (cached) yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/prctl.h usability... no checking sys/prctl.h presence... no checking for sys/prctl.h... no checking for library containing getaddrinfo_a... no checking for library containing inet_pton... none required checking whether strnlen is declared... yes checking whether le16toh is declared... no checking whether le32toh is declared... no checking whether le64toh is declared... no checking whether htole16 is declared... no checking whether htole32 is declared... no checking whether htole64 is declared... no checking whether be16toh is declared... no checking whether be32toh is declared... no checking whether be64toh is declared... no checking whether htobe16 is declared... no checking whether htobe32 is declared... no checking whether htobe64 is declared... no checking whether bswap_16 is declared... no checking whether bswap_32 is declared... no checking whether bswap_64 is declared... no checking for MSG_NOSIGNAL... no checking for library containing clock_gettime... no checking for visibility attribute... yes checking for Berkeley DB C++ headers... default checking for main in -ldb_cxx-4.8... yes checking miniupnpc/miniwget.h usability... yes checking miniupnpc/miniwget.h presence... yes checking for miniupnpc/miniwget.h... yes checking for main in -lminiupnpc... yes checking miniupnpc/miniupnpc.h usability... yes checking miniupnpc/miniupnpc.h presence... yes checking for miniupnpc/miniupnpc.h... yes checking for main in -lminiupnpc... (cached) yes checking miniupnpc/upnpcommands.h usability... yes checking miniupnpc/upnpcommands.h presence... yes checking for miniupnpc/upnpcommands.h... yes checking for main in -lminiupnpc... (cached) yes checking miniupnpc/upnperrors.h usability... yes checking miniupnpc/upnperrors.h presence... yes checking for miniupnpc/upnperrors.h... yes checking for main in -lminiupnpc... (cached) yes checking for QT... yes checking for QT_TEST... yes checking for QT_DBUS... no checking for static Qt... no checking for moc-qt5... no checking for moc5... no checking for moc... /usr/local/Cellar/qt5/5.5.1/bin/moc checking for uic-qt5... no checking for uic5... no checking for uic... /usr/local/Cellar/qt5/5.5.1/bin/uic checking for rcc-qt5... no checking for rcc5... no checking for rcc... /usr/local/Cellar/qt5/5.5.1/bin/rcc checking for lrelease-qt5... no checking for lrelease5... no checking for lrelease... /usr/local/Cellar/qt5/5.5.1/bin/lrelease checking for lupdate-qt5... no checking for lupdate5... no checking for lupdate... /usr/local/Cellar/qt5/5.5.1/bin/lupdate checking whether the linker accepts -framework Foundation -framework ApplicationServices -framework AppKit... yes checking whether to build Bitcoin Core GUI... yes (Qt5) checking for boostlib >= 1.20.0... yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem... yes checking whether the Boost::Program_Options library is available... yes checking for exit in -lboost_program_options-mt... yes checking whether the Boost::Thread library is available... yes checking for exit in -lboost_thread-mt... yes checking whether the Boost::Chrono library is available... yes checking for exit in -lboost_chrono-mt... yes checking whether the Boost::Unit_Test_Framework library is available... yes checking for dynamic linked boost test... yes checking for SSL... yes checking for CRYPTO... yes checking for PROTOBUF... yes checking for QR... no checking for RAND_egd in -lcrypto... yes checking openssl/ec.h usability... no checking openssl/ec.h presence... no checking for openssl/ec.h... no configure: error: OpenSSL ec header missing .../bitcoin-0.11.1$This is running on MacOS 10.11.1 and Homebrew 0.9.5 (git revision 91b03; last commit 2015-10-21) and compiling the 0.11.1 release of Bitcoin. The solution I found comes from the Homebrew team itself, as it is suggested at installation time and by doing
brew info openssl..../bitcoin-0.11.1$ brew info openssl openssl: stable 1.0.2d (bottled) OpenSSL SSL/TLS cryptography library https://openssl.org/ This formula is keg-only. Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries /usr/local/Cellar/openssl/1.0.2d_1 (464 files, 17M) Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/openssl.rb ==> Dependencies Build: makedepend ✘ ==> Options --universal Build a universal binary --without-check Skip build-time tests (not recommended) ==> Caveats A CA file has been bootstrapped using certificates from the system keychain. To add additional certificates, place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash This formula is keg-only, which means it was not symlinked into /usr/local. Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include .../bitcoin-0.11.1$Perhaps something is broken on my system and the configure script fails recognising Homebrew's openssl?
G.
-
laanwj commented at 10:41 AM on October 26, 2015: member
You'll have to debug why this is not working: https://github.com/bitcoin/bitcoin/blob/master/configure.ac#L292 We don't hardcode the path because it should be able to find it using the appropriate utility
-
jgarzik commented at 7:26 PM on October 27, 2015: contributor
NAK - not needed - the user has a local problem
- giacecco closed this on Oct 27, 2015
-
rromanchuk commented at 5:09 PM on October 29, 2015: none
I do not think this is unique to OP. Following the build instructions verbatim on 10.11.1
checking for CURL... yes checking for RAND_egd in -lcrypto... yes checking openssl/ec.h usability... no checking openssl/ec.h presence... no checking for openssl/ec.h... no configure: error: OpenSSL ec header missing -
sipa commented at 5:17 PM on October 29, 2015: member
@rromanchuk That sounds like your OpenSSL version was compiled without EC support.
-
rromanchuk commented at 5:29 PM on October 29, 2015: none
Sure, but I just followed directions. Are you sure the current formula for
brew install openssldoes what you are saying it does? I mean no biggie, not hard to fix, but might be worth mentioning. My guess is that you have two reports in five days using a modern OS and the general velocity of new users building for mac os is right on target for this not being user error -
giacecco commented at 3:14 PM on October 30, 2015: none
@sipa @rromanchuk I don't think it is about EC support, all headers could not be found when I had the issue first (see the top of this issue) and I had to set the LDFLAGS and CPPFLAGS environment variables manually.
-
rromanchuk commented at 4:31 PM on November 6, 2015: none
-
DomT4 commented at 5:21 PM on November 6, 2015: contributor
Homebrew/homebrew#41613
Bitcoin's configure script works around relying on an assumption about where to find
opensslby askingbrewwhereopensslis located directly.Locally I see:
checking openssl/ec.h usability... yes checking openssl/ec.h presence... no configure: WARNING: openssl/ec.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: openssl/ec.h: proceeding with the compiler's result checking for openssl/ec.h... yes -
nkavian commented at 5:00 PM on January 26, 2018: none
I'm seeing this same problem. What is the solution to get configure to work correctly without exporting the two variables?
brew --prefix openssldoes work correctly on the command line and I'm boggled whyconfiguredoesn't work. - DrahtBot locked this on Sep 8, 2021