Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#48330 closed defect (fixed)

unbound 1.5.4 does not build on Mac OS X 10.6.8 (Snow Leopard) because it can't find a suitable and modern OpenSSL version

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port: unbound

Description

checking for SSL... found in /opt/local
checking for HMAC_CTX_init in -lcrypto... no
checking if -lcrypto needs -lgdi32... no
checking if -lcrypto needs -ldl... no
configure: error: OpenSSL found in /opt/local, but version 0.9.7 or higher is required
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_unbound/unbound/work/unbound-1.5.4" && ./configure --prefix=/opt/local --with-pidfile=/opt/local/var/run/unbound/unbound.pid --with-rootkey-file=/opt/local/var/run/unbound/root.key 
Exit code: 1
Error: Failed to configure unbound, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_unbound/unbound/work/unbound-1.5.4/config.log
Error: org.macports.configure for port unbound returned: configure failure: command execution failed
DEBUG: Error code: NONE

although I get:

port installed | grep openssl
  openssl @1.0.2d_0 (active)

config.log contains:

configure:15442: checking for pthread-config
configure:15470: result: no
configure:16337: checking for SSL
configure:16361: result: found in /opt/local
configure:16376: checking for HMAC_CTX_init in -lcrypto
configure:16394: /usr/bin/llvm-gcc-4.2 -o conftest -pipe -Os -arch x86_64 -flto -I/opt/local/include -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib conftest.c  -lcrypto >&5
ld: lto: could not merge in /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_unbound/unbound/work/.tmp/ccYrP6Cm.o because Unknown instruction for architecture x86_64
collect2: ld returned 1 exit status
configure:16394: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "unbound"
| #define PACKAGE_TARNAME "unbound"
| #define PACKAGE_VERSION "1.5.4"
| #define PACKAGE_STRING "unbound 1.5.4"
| #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define CONFIGFILE "/opt/local/etc/unbound/unbound.conf"
| #define RUN_DIR "/opt/local/etc/unbound"
| #define CHROOT_DIR "/opt/local/etc/unbound"
| #define SHARE_DIR "/opt/local/etc/unbound"
| #define PIDFILE "/opt/local/var/run/unbound/unbound.pid"
| #define ROOT_ANCHOR_FILE "/opt/local/var/run/unbound/root.key"
| #define ROOT_CERT_FILE "/opt/local/etc/unbound/icannbundle.pem"
| #define UB_USERNAME "unbound"
| #define WINVER 0x0502
| #define RSRC_PACKAGE_VERSION 1,5,4,0
| #define HAVE_GETOPT_H 1
| #define HAVE_TIME_H 1
| #define HAVE_ATTR_FORMAT 1
| #define HAVE_ATTR_UNUSED 1
| #define LEX_HAS_YYLEX_DESTROY 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_STDARG_H 1
| #define HAVE_STDBOOL_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_GRP_H 1
| #define SIZEOF_TIME_T 0
| #define HAVE_UNISTD_H 1
| #define vfork fork
| #define RETSIGTYPE void
| #define NONBLOCKING_IS_BROKEN 1
| #define HAVE_MALLOC 1
| #define HAVE_SSL /**/
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|                 int HMAC_CTX_init(void);
|                 (void)HMAC_CTX_init();
| 
|   ;
|   return 0;
| }
configure:16404: result: no
…
configure:16459: /usr/bin/llvm-gcc-4.2 -o conftest -pipe -Os -arch x86_64 -flto -I/opt/local/include -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib conftest.c  -lcrypto -ldl >&5
ld: lto: could not merge in /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_unbound/unbound/work/.tmp/ccpgjMhl.o because Unknown instruction for architecture x86_64
collect2: ld returned 1 exit status
configure:16459: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "unbound"
| #define PACKAGE_TARNAME "unbound"
| #define PACKAGE_VERSION "1.5.4"
| #define PACKAGE_STRING "unbound 1.5.4"
| #define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl"
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define CONFIGFILE "/opt/local/etc/unbound/unbound.conf"
| #define RUN_DIR "/opt/local/etc/unbound"
| #define CHROOT_DIR "/opt/local/etc/unbound"
| #define SHARE_DIR "/opt/local/etc/unbound"
| #define PIDFILE "/opt/local/var/run/unbound/unbound.pid"
| #define ROOT_ANCHOR_FILE "/opt/local/var/run/unbound/root.key"
| #define ROOT_CERT_FILE "/opt/local/etc/unbound/icannbundle.pem"
| #define UB_USERNAME "unbound"
| #define WINVER 0x0502
| #define RSRC_PACKAGE_VERSION 1,5,4,0
| #define HAVE_GETOPT_H 1
| #define HAVE_TIME_H 1
| #define HAVE_ATTR_FORMAT 1
| #define HAVE_ATTR_UNUSED 1
| #define LEX_HAS_YYLEX_DESTROY 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_STDARG_H 1
| #define HAVE_STDBOOL_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_GRP_H 1
| #define SIZEOF_TIME_T 0
| #define HAVE_UNISTD_H 1
| #define vfork fork
| #define RETSIGTYPE void
| #define NONBLOCKING_IS_BROKEN 1
| #define HAVE_MALLOC 1
| #define HAVE_SSL /**/
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|                         int HMAC_CTX_init(void);
|                         (void)HMAC_CTX_init();
| 
|   ;
|   return 0;
| }
configure:16469: result: no
configure:16471: error: OpenSSL found in /opt/local, but version 0.9.7 or higher is required

This error because Unknown instruction for architecture x86_64 comes quite often in config.log…

Attachments (2)

main.log (18.9 KB) - added by ballapete (Peter "Pete" Dyballa) 9 years ago.
config.log (386.4 KB) - added by ballapete (Peter "Pete" Dyballa) 9 years ago.
config.log

Download all attachments as: .zip

Change History (13)

Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: config.log added

config.log

comment:1 Changed 9 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… removed
Owner: changed from macports-tickets@… to snc@…
Status: newassigned

comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

I see you are using llvm-gcc-4.2. Does that mean you are using Xcode 4? If so, does using a different compiler help?

comment:3 in reply to:  2 ; Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign@…:

I see you are using llvm-gcc-4.2. Does that mean you are using Xcode 4? If so, does using a different compiler help?

I have Xcode 4.2 (4C199) installed. And, well, when looking into the Portfile I don't get an idea how to change the compiler setting… There is none!

comment:4 in reply to:  3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to Peter_Dyballa@…:

I don't get an idea how to change the compiler setting…

See wiki:ProblemHotlist?version=120#xcode40 for instructions. Compilers I'd try would include "clang", "macports-clang-3.4" (or 3.5 or 3.6), and lastly "apple-gcc-4.2".

comment:5 Changed 9 years ago by nerdling (Jeremy Lavergne)

Resolution: wontfix
Status: assignedclosed

If you found a working compiler for 10.6, I'll happily include those changes. Otherwise this is a won't fix.

comment:6 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Trying port -vd upgrade unbound configure.compiler=gcc-4.2 configure now found:

checking for SSL... found in /opt/local
checking for HMAC_CTX_init in -lcrypto... yes
checking for library containing dlopen... none required
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for openssl/rand.h... yes
checking if libssl needs libdl... no
checking for LibreSSL... no
checking for openssl/conf.h... yes
checking for openssl/engine.h... yes
checking for OPENSSL_config... yes
checking for EVP_sha1... yes
checking for EVP_sha256... yes
checking for EVP_sha512... yes
checking for FIPS_mode... yes
checking whether SSL_COMP_get_compression_methods is declared... yes
checking whether sk_SSL_COMP_pop_free is declared... yes
checking for EVP_PKEY_set_type_str... yes
checking for EC_KEY_new... yes
checking if GOST works... yes
checking for ECDSA_sign... yes
checking for SHA384_Init... yes
checking whether NID_X9_62_prime256v1 is declared... yes
checking whether NID_secp384r1 is declared... yes
checking if openssl supports SHA2 and ECDSA with EVP... yes
checking for libexpat... found in /opt/local

and port succeeded to build unbound. It reported:

Error: The following dependencies were not installed: apple-gcc42

when I tried to use configure.compiler=apple-gcc-4.2. Success also when I tried to use Clang 3.4, which emitted a few extra warnings:

clang: warning: argument unused during compilation: '-pthread'

Both, GCC 4.2 from Xcode and Clang 3.4, reported:

libtool: install: warning: remember to run `libtool --finish /opt/local/lib'

Since I could easily remove unbound, i.e. there is no port that depends on it, why was unbound installed automatically? I did not know of unbound before so I never would have tried to install it.

Is it necessary to install the package apple-gcc42 and try another build?

comment:7 in reply to:  6 Changed 9 years ago by nerdling (Jeremy Lavergne)

Resolution: wontfix
Status: closedreopened

Replying to Peter_Dyballa@…:

Both, GCC 4.2 from Xcode and Clang 3.4

Great! I'll update the Portfile to use clang-3.4 on 10.6.

Since I could easily remove unbound, i.e. there is no port that depends on it, why was unbound installed automatically? I did not know of unbound before so I never would have tried to install it.

MacPorts doesn't randomly install software. A quick grep shows these two packages depending on unbound: gnutls, opendkim.

Is it necessary to install the package apple-gcc42 and try another build?

Nope, we'll go with clang 3.4. If you have the time and want to try other clangs, perhaps the newest version that compiles for 10.6 would be ideal.

comment:8 Changed 9 years ago by nerdling (Jeremy Lavergne)

Resolution: fixed
Status: reopenedclosed

Use clang 3.4 on snow leopard: r141053

comment:9 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Why did you make the port depend on MacPorts clang-3.4 when Xcode gcc42 worked? The only thing we determined in this ticket was that llvm-gcc42 didn't work, so the correct solution was to blacklist llvm-gcc42.

comment:10 in reply to:  9 Changed 9 years ago by nerdling (Jeremy Lavergne)

Replying to ryandesign@…:

Why did you make the port depend on MacPorts clang-3.4 when Xcode gcc42 worked? The only thing we determined in this ticket was that llvm-gcc42 didn't work, so the correct solution was to blacklist llvm-gcc42.

Newer compilers are better than older (they even have bug fixes). If you want to make further changes, go for it. I can't review anything since MacPorts infrastructure seems busted again (I can't even view my own changes).

comment:11 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

All these installed Clang compilers do build unbound on Mac OS X 10.6.8, Snow Leoprad:

  clang-3.4 @3.4.2_9+analyzer+arm_runtime (active)
  clang-3.5 @3.5.2_6+analyzer+arm_runtime (active)
  clang-3.6 @3.6.2_2+analyzer (active)
  clang-3.7 @3.7.0_0+analyzer (active)
  clang-3.8 @3.8-r246024_0+analyzer+assertions (active)
Note: See TracTickets for help on using tickets.