beanstalkd commit 12299e05b4a0e472c97fe73073d5e2d5bcecd5a7 breaks OS X build

146 views
Skip to first unread message

Johan Bergström

unread,
May 7, 2009, 10:37:36 AM5/7/09
to beanstalk-talk
I'm on OS X Leopard 10.5.6:

beanstalkgit # make
make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o
beanstalkd.o beanstalkd.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o binlog.o
binlog.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o conn.o
conn.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o job.o
job.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o ms.o
ms.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o net.o
net.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o pq.o
pq.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o primes.o
primes.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o prot.o
prot.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o tube.o
tube.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o util.o
util.c
gcc -g -O2 -I/usr/local/include -L/usr/local/lib -Wl,-rpath,/usr/
local/lib -o beanstalkd beanstalkd.o binlog.o conn.o job.o ms.o net.o
pq.o primes.o prot.o tube.o util.o -levent -levent -levent
Undefined symbols:
"_posix_fallocate", referenced from:
_binlog_open in binlog.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [beanstalkd] Error 1
make: *** [all] Error 2


posix_fallocate isn't available in OS X. I did something similar to
how transmission handle's fallocate on different platforms which
seemed to do the trick (not posting code here since it's so ugly you'd
probably never reply to this):
http://trac.transmissionbt.com/browser/branches/1.5x/libtransmission/fdlimit.c?rev=8203#L170

Thanks,
Johan

Keith Rarick

unread,
May 7, 2009, 6:02:37 PM5/7/09
to beansta...@googlegroups.com
Grr. Thanks for the heads up. I guess we'll have to do something like
that. I was thinking of using fallocate if it's present, but I thought
posix_fallocate would be a safe fallback. Oh well.

kr

2009/5/7 Johan Bergström <bu...@bergstroem.nu>:
Reply all
Reply to author
Forward
0 new messages