stoneCC / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
0 stars 0 forks source link

make fails on Mac OS X Server 10.5.6 (Intel) #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure --prefix=/usr
2. sudo make

What is the expected output? What do you see instead?

Here is the output of make:

sunnydale:serf-0.3.0 administrator$ more log
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/aggregate_buckets.lo 
buckets/aggregate_buckets.c && 
touch buckets/aggregate_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/request_buckets.lo 
buckets/request_buckets.c && 
touch buckets/request_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o context.lo context.c && touch context.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/buckets.lo buckets/buckets.c && touch 
buckets/buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/simple_buckets.lo 
buckets/simple_buckets.c && touch 
buckets/simple_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/file_buckets.lo 
buckets/file_buckets.c && touch 
buckets/file_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/mmap_buckets.lo 
buckets/mmap_buckets.c && touch 
buckets/mmap_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/socket_buckets.lo 
buckets/socket_buckets.c && touch 
buckets/socket_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/response_buckets.lo 
buckets/response_buckets.c && 
touch buckets/response_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/headers_buckets.lo 
buckets/headers_buckets.c && 
touch buckets/headers_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/allocator.lo buckets/allocator.c && 
touch 
buckets/allocator.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/dechunk_buckets.lo 
buckets/dechunk_buckets.c && 
touch buckets/dechunk_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/deflate_buckets.lo 
buckets/deflate_buckets.c && touch 
buckets/deflate_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/limit_buckets.lo 
buckets/limit_buckets.c && touch 
buckets/limit_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/ssl_buckets.lo buckets/ssl_buckets.c 
&& touch 
buckets/ssl_buckets.lo
buckets/ssl_buckets.c: In function 'serf_ssl_cert_export':
buckets/ssl_buckets.c:1267: warning: passing argument 2 of 'i2d_X509' from 
incompatible 
pointer type
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/barrier_buckets.lo 
buckets/barrier_buckets.c && touch 
buckets/barrier_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o buckets/chunk_buckets.lo 
buckets/chunk_buckets.c && touch 
buckets/chunk_buckets.lo
/usr/share/apr-1/build-1/libtool --silent --mode=link gcc -L/usr/lib -rpath 
/usr/lib -o 
libserf-0.la buckets/aggregate_buckets.lo buckets/req
uest_buckets.lo context.lo buckets/buckets.lo buckets/simple_buckets.lo 
buckets/file_buckets.lo 
buckets/mmap_buckets.lo buckets/socket_bucket
s.lo buckets/response_buckets.lo buckets/headers_buckets.lo 
buckets/allocator.lo 
buckets/dechunk_buckets.lo buckets/deflate_buckets.lo bucket
s/limit_buckets.lo buckets/ssl_buckets.lo buckets/barrier_buckets.lo 
buckets/chunk_buckets.lo 
-L/usr/lib -R/usr/lib -laprutil-1 -lsqlite3 -le
xpat -liconv  -L/usr/lib -R/usr/lib -lapr-1 -lpthread  -lz -lssl -lcrypto
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc  -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I.  -I/usr/include/apr
-1   -I/usr/include/apr-1   -c -o test/serf_get.lo test/serf_get.c && touch 
test/serf_get.lo
/usr/share/apr-1/build-1/libtool --silent --mode=link gcc -L/usr/lib -static -o 
test/serf_get 
libserf-0.la test/serf_get.lo -L/usr/lib -R/usr
/lib -laprutil-1 -lsqlite3 -lexpat -liconv  -L/usr/lib -R/usr/lib -lapr-1 
-lpthread  -lz -lssl -
lcrypto
Undefined symbols:
  "_BIO_clear_flags", referenced from:
      _bio_bucket_read in libserf-0.a(ssl_buckets.o)
      _bio_bucket_write in libserf-0.a(ssl_buckets.o)
      _bio_file_read in libserf-0.a(ssl_buckets.o)
      _bio_file_write in libserf-0.a(ssl_buckets.o)
  "_SSL_CTX_set_client_cert_cb", referenced from:
      _ssl_init_context in libserf-0.a(ssl_buckets.o)
  "_BIO_set_flags", referenced from:
      _bio_bucket_read in libserf-0.a(ssl_buckets.o)
      _bio_file_read in libserf-0.a(ssl_buckets.o)
  "_BIO_test_flags", referenced from:
      _ssl_encrypt in libserf-0.a(ssl_buckets.o)
      _ssl_encrypt in libserf-0.a(ssl_buckets.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [test/serf_get] Error 1

What version of the product are you using? On what operating system?

I am compiling serf-0.3.0 on Mac OS X Server 10.5.6 (Darwin sunnydale.private 
9.6.0 Darwin 
Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; 
root:xnu-1228.9.59~1/RELEASE_I386 
i386).

Please provide any additional information below.

I also compiled and installed expat-2.0.1 to get the libexpat.a library.

This compilation attempt is using the OS X Server-packaged Apache 2 apr and 
apr-util headers 
and libraries in /usr/include and /usr/lib.

Original issue reported on code.google.com by alexprey...@gmail.com on 26 Feb 2009 at 3:19

GoogleCodeExporter commented 9 years ago
Is there really a line break between the - and lcrypto
on the link command (just above the error)?  That would
explain the errors.

Original comment by roy.fiel...@gmail.com on 26 Feb 2009 at 8:42

GoogleCodeExporter commented 9 years ago
I think that's just an artifact from cutting and pasting the output log.

Original comment by alexprey...@gmail.com on 27 Feb 2009 at 7:02

GoogleCodeExporter commented 9 years ago
What version of openssl do you have installed (run "openssl version")?

Possibly related, I am unable to compile serf HEAD on a Mac OS X 10.4.11 (PPC)
with an updated openssl installed in /usr/local/ssl (0.9.8k).

First, serfmake doesn't support --with-ssl, so it always picks up the system
openssl in /usr/lib (0.9.7l on my old system).

Switching to autoconf, as in

./configure --prefix=/usr/local/serf --with-apr=/usr/local/apr
--with-openssl=/usr/local/ssl

seems to work fine, but linking fails with

/usr/local/apr/build/libtool --silent --mode=link gcc -L/usr/local/apr/lib
-L/usr/local/ssl/lib -R/usr/local/ssl/lib -static -o test/serf_get libserf-0.la
test/serf_get.lo /usr/local/apr/lib/libaprutil-0.la -lexpat -liconv 
/usr/local/apr/lib/libapr-0.la -lresolv  -lpthread  -lz -lssl -lcrypto
/usr/bin/ld: Undefined symbols:
_BIO_clear_flags
_BIO_set_flags
_BIO_test_flags
_SSL_CTX_set_client_cert_cb
collect2: ld returned 1 exit status
make: *** [test/serf_get] Error 1

Original comment by roy.fiel...@gmail.com on 3 May 2009 at 8:05

GoogleCodeExporter commented 9 years ago
This error is due to a mismatch between the OpenSSL headers and the OpenSSL 
libraries.

Original comment by justin.e...@gmail.com on 19 Jul 2009 at 9:00

GoogleCodeExporter commented 9 years ago
This sounds like some extra work for config/compile/runtime version checking. 
Putting this under a task for our scons conversion work.

Original comment by gstein on 13 Jul 2011 at 6:41

GoogleCodeExporter commented 9 years ago
I think it's possibly related to OS X building/linking against an SDK version 
of openssl instead of the one "installed".  On OS X, you have your installed 
stuff in /usr and it gets updated as necessary when OS X supplies system 
updates.  The SDK version(s) stay the same.  So if you let serf find OpenSSL in 
/usr, it finds a version newer than what is in the SDK.  I tested this by using 
/usr as my OpenSSL location and I got the above error.  When I tell serf that 
OpenSSL is in /Developer/SDKs/<SDK_YOU_WANT_TO_USE>/usr, everything 
compiles/links fine without any errors.  In all honesty, I'd expect the OS X 
tool chain to handle this but that is obviously not the case.  At least you 
know a way to work around it.

Original comment by jcscoob...@gmail.com on 8 Aug 2011 at 6:41

GoogleCodeExporter commented 9 years ago
bug#82, I attached rewrite of autotools build system, if you give it a try it 
would be great.

Original comment by alon.barlev@gmail.com on 5 Oct 2011 at 4:14