kr/beanstalkd — Issue #79: Cannot build on OS X Lion
Author: snoe
Created: 2011-10-20 03:27:46+00:00
State: open

Trying to install with homebrew, it seems that the configure is incorrectly detecting the presence of fdatasync. If I remove the #define HAVE_FDATASYNC 1 line from the config.h, I can make install ok. I think this is a similar issue on Node https://github.com/joyent/node/issues/1733

==> Downloading https://github.com/downloads/kr/beanstalkd/beanstalkd-1.4.6.tar.gz
File already downloaded in /Users/snoe/Library/Caches/Homebrew
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file prot.c
patching file util.h
==> ./configure --disable-debug --prefix=/usr/local/Cellar/beanstalk/1.4.6 --with-event=/usr/local
==> make install
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o beanstalkd.o beanstalkd.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o binlog.o binlog.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o conn.o conn.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o job.o job.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o ms.o ms.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o net.o net.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o port.o port.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o pq.o pq.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o primes.o primes.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o prot.o prot.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o tube.o tube.c
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -I/usr/local/include -c -o util.o util.c
/usr/bin/gcc-4.2 -O3 -march=nocona -mfpmath=sse -w -pipe -Wall -Werror -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 port.o pq.o primes.o prot.o tube.o util.o -levent -levent -levent
Undefined symbols:
"_fdatasync", referenced from:
_binlog_write_job in binlog.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [beanstalkd] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/beanstalk.rb#L21
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.5.8
Kernel Architecture: i386
Ruby: 1.8.6-369
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.1.3
GCC-4.0: build 5493
GCC-4.2: build 5574 (5577 or newer recommended)
LLVM: N/A
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
LD: /usr/bin/gcc-4.2
CFLAGS: -O3 -march=nocona -mfpmath=sse -w -pipe
CXXFLAGS: -O3 -march=nocona -mfpmath=sse -w -pipe
MAKEFLAGS: -j2

Error: Failed executing: make install