[squid-users] Re: problem compiling squid 3.2.0.15 + openssl 0.9.8 with llvm-gcc-4.2.1

From: YJZ <gewehre_at_gmx.net>
Date: Wed, 29 Feb 2012 07:17:53 +0100

-------- Original-Nachricht --------

> I can compile squid 3.2.0.15 nightlies fine with the --enable-ssl option
> on Mac OS X 10.4.11 (Tiger) that has the regular gcc 4.0.1 and gcc 4.2.1, as
> well as openssl 1.0.0(?) in /usr/local/.
>
> After to upgrading to Mac OS X 10.7.3 (Lion), which ships with openssl
> 0.9.8r and llvm-gcc-4.2.1, now squid 3.2.0.15 aborts during "make" with the
> following:
> ...
> libtool: link: ranlib .libs/libeui.a
> ranlib: file: .libs/libeui.a(Eui48.o) has no symbols
> ranlib: file: .libs/libeui.a(Eui64.o) has no symbols
> libtool: link: ( cd ".libs" && rm -f "libeui.la" && ln -s "../libeui.la"
> "libeui.la" )
> make[4]: Nothing to be done for `install-exec-am'.
> make[4]: Nothing to be done for `install-data-am'.
> Making install in acl
> /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
> -I../.. -I../../include -I../../lib -I../../src -I../../include -Wall
> -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -c
> -o Acl.lo Acl.cc
> libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib
> -I../../src -I../../include -Wall -Wpointer-arith -Wwrite-strings
> -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -c Acl.cc -fno-common -DPIC -o
> .libs/Acl.o
> cc1plus: warnings being treated as errors
> In file included from ../../src/ProtoPort.h:12,
> from Acl.cc:40:
> ../../src/ssl/gadgets.h: In function 'void Ssl::sk_X509_free_cpp(STACK*)':
> ../../src/ssl/gadgets.h:42: warning: 'sk_free' is deprecated (declared at
> /usr/include/openssl/stack.h:88)
> ../../src/ssl/gadgets.h:42: warning: 'sk_free' is deprecated (declared at
> /usr/include/openssl/stack.h:88)
> ../../src/ssl/gadgets.h: In function 'void
> Ssl::EVP_PKEY_free_cpp(EVP_PKEY*)':
> ../../src/ssl/gadgets.h:45: warning: 'EVP_PKEY_free' is deprecated
> (declared at /usr/include/openssl/evp.h:885)
> ../../src/ssl/gadgets.h:45: warning: 'EVP_PKEY_free' is deprecated
> (declared at /usr/include/openssl/evp.h:885)
> ../../src/ssl/gadgets.h: In function 'void Ssl::BN_free_cpp(BIGNUM*)':
> ../../src/ssl/gadgets.h:48: warning: 'BN_free' is deprecated (declared at
> /usr/include/openssl/bn.h:468)
> ../../src/ssl/gadgets.h:48: warning: 'BN_free' is deprecated (declared at
> /usr/include/openssl/bn.h:468)
> ../../src/ssl/gadgets.h: In function 'void Ssl::BIO_free_cpp(BIO*)':
> ../../src/ssl/gadgets.h:51: warning: 'BIO_free' is deprecated (declared at
> /usr/include/openssl/bio.h:583)
> ../../src/ssl/gadgets.h:51: warning: 'BIO_free' is deprecated (declared at
> /usr/include/openssl/bio.h:583)
> ../../src/ssl/gadgets.h: In function 'void Ssl::TXT_DB_free_cpp(TXT_DB*)':
> ../../src/ssl/gadgets.h:57: warning: 'TXT_DB_free' is deprecated (declared
> at /usr/include/openssl/txt_db.h:103)
> ../../src/ssl/gadgets.h:57: warning: 'TXT_DB_free' is deprecated (declared
> at /usr/include/openssl/txt_db.h:103)
> ../../src/ssl/gadgets.h: In function 'void Ssl::RSA_free_cpp(RSA*)':
> ../../src/ssl/gadgets.h:63: warning: 'RSA_free' is deprecated (declared at
> /usr/include/openssl/rsa.h:282)
> ../../src/ssl/gadgets.h:63: warning: 'RSA_free' is deprecated (declared at
> /usr/include/openssl/rsa.h:282)
> ../../src/ssl/gadgets.h: In function 'void
> Ssl::SSL_CTX_free_cpp(SSL_CTX*)':
> ../../src/ssl/gadgets.h:69: warning: 'SSL_CTX_free' is deprecated
> (declared at /usr/include/openssl/ssl.h:1347)
> ../../src/ssl/gadgets.h:69: warning: 'SSL_CTX_free' is deprecated
> (declared at /usr/include/openssl/ssl.h:1347)
> ../../src/ssl/gadgets.h: In function 'void Ssl::SSL_free_cpp(SSL*)':
> ../../src/ssl/gadgets.h:72: warning: 'SSL_free' is deprecated (declared at
> /usr/include/openssl/ssl.h:1490)
> ../../src/ssl/gadgets.h:72: warning: 'SSL_free' is deprecated (declared at
> /usr/include/openssl/ssl.h:1490)
> make[3]: *** [Acl.lo] Error 1
> make[2]: *** [install-recursive] Error 1
> make[1]: *** [install] Error 2
> make: *** [install-recursive] Error 1
>
> Is this a result of openssl 0.9.8r or the llvm-gcc that Apple decides to
> use? What's the easier workaround to get 3.2.0.15 compiling successfully
> again? Thanks in advance.
>
>
>

Well, I found the explanation:

1. http://stackoverflow.com/questions/7406946/why-is-apple-depricating-openssl-in-macos-10-7-lion

2. http://ludovicrousseau.blogspot.com/2011/08/mac-os-x-lion-and-openssl.html

"OpenSSL should be removed in a later Mac OS X version.

For projects using OpenSSL on Mac OS X you have two options:

    move from OpenSSL to Common Crypto
    provide your own version of OpenSSL in the installer (or use a static link)"

So my question now is: Which option would squid go with, in order to compile with --enable-ssl on Mac OS X?

In the meantime, I tried to get around it without --disable-ssl or without --enable-ssl. In that case, "make" of squid-3.2.0.15-20120228-r11519 stops at:

/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -DDEFAULT_STATEDIR=\"/usr/local/squid/var/run/squid\" -I../.. -I../../include -I../../lib -I../../src -I../../include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -c -o StrandCoord.lo StrandCoord.cc
libtool: compile: g++ -DHAVE_CONFIG_H -DDEFAULT_STATEDIR=\"/usr/local/squid/var/run/squid\" -I../.. -I../../include -I../../lib -I../../src -I../../include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -c StrandCoord.cc -fno-common -DPIC -o .libs/StrandCoord.o
In file included from StrandCoord.cc:13:
../../src/ipc/TypedMsgHdr.h:93: error: array bound is not an integer constant
make[3]: *** [StrandCoord.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Is this a side-effect of gcc 4.2.1 being a symlink to llvm-gcc on OS X 10.7.x?

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Received on Wed Feb 29 2012 - 06:18:03 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 01 2012 - 12:00:05 MST