stoneCC / serf

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

make fails #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install apr to /usr/local/apr
2. install apr-util to /usr/local/apr-util
3. configure serf:
# ./configure --prefix=/usr/local/serf --with-apr=/usr/local/apr
--with-apr-util=/usr/local/apr-util/
checking for chosen layout... Serf
checking for working mkdir -p... yes
checking build system type... i386-unknown-freebsd6.0
checking host system type... i386-unknown-freebsd6.0
checking target system type... i386-unknown-freebsd6.0

Configuring Apache Portable Runtime library...

checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting APR_LIBTOOL to "/usr/local/apr/build-1/libtool"
  setting CFLAGS to " -g -O2"
  setting CPPFLAGS to " "
  setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
  adding "-L/usr/local/lib" to LDFLAGS
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
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 how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
Configuring Serf...

checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 openssl/opensslv.h usability... yes
checking openssl/opensslv.h presence... yes
checking for openssl/opensslv.h... yes
  setting SERF_LIBS to " /usr/local/apr-util/lib/libaprutil-1.la  -lexpat 
/usr/local/apr/lib/libapr-1.la -lcrypt  -lpthread"
configure: creating ./config.status
config.status: creating Makefile
config.status: executing mkdir-vpath commands

# make
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/aggregate_buckets.lo buckets/aggregate_buckets.c && touch
buckets/aggregate_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/request_buckets.lo buckets/request_buckets.c && touch
buckets/request_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
context.lo context.c && touch context.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/buckets.lo buckets/buckets.c && touch buckets/buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/simple_buckets.lo buckets/simple_buckets.c && touch
buckets/simple_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/file_buckets.lo buckets/file_buckets.c && touch buckets/file_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/mmap_buckets.lo buckets/mmap_buckets.c && touch buckets/mmap_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/socket_buckets.lo buckets/socket_buckets.c && touch
buckets/socket_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/response_buckets.lo buckets/response_buckets.c && touch
buckets/response_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/headers_buckets.lo buckets/headers_buckets.c && touch
buckets/headers_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/allocator.lo buckets/allocator.c && touch buckets/allocator.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/dechunk_buckets.lo buckets/dechunk_buckets.c && touch
buckets/dechunk_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/deflate_buckets.lo buckets/deflate_buckets.c && touch
buckets/deflate_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/limit_buckets.lo buckets/limit_buckets.c && touch
buckets/limit_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/ssl_buckets.lo buckets/ssl_buckets.c && touch buckets/ssl_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/barrier_buckets.lo buckets/barrier_buckets.c && touch
buckets/barrier_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
buckets/chunk_buckets.lo buckets/chunk_buckets.c && touch
buckets/chunk_buckets.lo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -L/usr/local/lib
-rpath /usr/local/serf/lib -o libserf-0.la 
/usr/local/apr-util/lib/libaprutil-1.la  -lexpat 
/usr/local/apr/lib/libapr-1.la -lcrypt  -lpthread -lz -lssl -lcrypto
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2  -I.
-I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1  -c -o
test/serf_get.lo test/serf_get.c && touch test/serf_get.lo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -L/usr/local/lib
-static -o test/serf_get  /usr/local/apr-util/lib/libaprutil-1.la  -lexpat
 /usr/local/apr/lib/libapr-1.la -lcrypt  -lpthread -lz -lssl -lcrypto
/usr/lib/crt1.o(.text+0x72): In function `_start':
: undefined reference to `main'
*** Error code 1

Stop in /var/upload/serf-0.2.0.

What is the expected output? What do you see instead?
How can I make and make install it without such stop?

What version of the product are you using? On what operating system?
serf-0.2.0
apr-1.3.2
apr-util-1.3.2

Please provide any additional information below.
FreeBSD system.

Original issue reported on code.google.com by mal...@gmail.com on 15 Jul 2008 at 7:37

GoogleCodeExporter commented 9 years ago
I tried serf-0.1.2, and it did not work too.

Original comment by mal...@gmail.com on 15 Jul 2008 at 7:55

GoogleCodeExporter commented 9 years ago
Any particular reason you are using ports ?

cd /usr/ports/www/serf
sudo make all install clean

done.

Also, if you are going to do it by hand, pass the full path to apr-1-config and
apu-1-config not the installdir.

Original comment by pgollu...@gmail.com on 23 Jul 2008 at 5:41

GoogleCodeExporter commented 9 years ago
I'm trying to compile Subversion 1.5.1 from source, and it fails for me with 
the same issue as well. Same exact 
failure. Downloading the code from googlecode does the same thing.

On FreeBSD 4.11, both gcc 2.95 and 4.04 fail (crt1.o dated Jan21 2005)

On MacOSX 10.4.11,  it succeeds (crt1.o is dated Sept 11 2006).

I'd try updating the crt.o file if I knew what library package to download.

Original comment by resonant...@gmail.com on 18 Aug 2008 at 6:01

GoogleCodeExporter commented 9 years ago
Have you tried using GNU make and not BSD make?

Original comment by justin.e...@gmail.com on 18 Aug 2008 at 1:33

GoogleCodeExporter commented 9 years ago
You can do

./configure --without-serf

to get the subversion and deps packages to build on FreeBSD.  I am not using 
web 
access so I think not having serf doesnt affect me.

Original comment by Steven.H...@gmail.com on 4 Sep 2008 at 12:08

GoogleCodeExporter commented 9 years ago
I was getting the same error (undefined reference to `main') when trying to 
compile
on AIX (5.3 and 6.1).  Once I used GNU make instead of the default AIX make,
everything compiled and installed correctly.

Original comment by mecca%bi...@gtempaccount.com on 18 May 2009 at 8:50

GoogleCodeExporter commented 9 years ago
Thanks to comment #6, I was able to compile on AIX platform. Same problem here: 
it was 
impossible until I used the GNU tools under /opt/freeware/bin (notably make).

Cheers

Original comment by bmathus on 10 Mar 2010 at 8:35

GoogleCodeExporter commented 9 years ago
We will probably eliminate the autotools support and toolchain, in favor of the 
serfmake script or possibly Scons. 
But until we do that, I'll take a look at why BSD make is messing things up.

Original comment by gstein on 21 May 2010 at 10:11

GoogleCodeExporter commented 9 years ago
Fixed in r1511.

Original comment by gstein on 25 Jun 2011 at 9:22