iriscouch / build-couchdb

Batteries-included CouchDB build system
227 stars 36 forks source link

Build fails on OS X Mavericks 10.9 due to lack of ODBC #94

Closed natevw closed 10 years ago

natevw commented 10 years ago

When running rake, the build finishes in a weird state. No error message, but it seems the control is returned to the terminal while output continues, because I don't see the shell prompt until hitting enter (after the rm_f stuff shows up).

Regardless, the build "finishes" without a visible error (forgot to check $?) but there is no couchdb executable:

lib/xmerl/src/xmerl_xpath_parse.erl
make/emd2exml
make/output.mk
make/x86_64-apple-darwin13.0.0/otp.mk
make/x86_64-apple-darwin13.0.0/otp_ded.mk
rm_f /Users/natevw/build-couchdb/build/bin/autoconf
rm_f /Users/natevw/build-couchdb/build/bin/autoreconf
rm_f /Users/natevw/build-couchdb/build/bin/autoheader
rm_f /Users/natevw/build-couchdb/build/bin/autom4te

postel:build-couchdb natevw$ build/bin/couchdb
-bash: build/bin/couchdb: No such file or directory

The full output is here: https://gist.github.com/natevw/1813f0f5722958564b46

This first happened when I was trying to build GeoCouch as well with rake plugin="git://github.com/couchbase/geocouch origin/master" so maybe I need to reset things before side effects of that go away?

natevw commented 10 years ago

Here's my second try, a clean build but checked out into a folder with an apostrophe in it so this failure might be due only to that: https://gist.github.com/natevw/6b68c0daa85e6915474a

Previous build I'm pretty sure was NOT under an "unexpected" path, in the middle of trying yet again and will report back.

natevw commented 10 years ago

Nope, build-couchdb is a no-go on Mavericks for me: https://gist.github.com/natevw/27ebaa8400218957220d


=== Leaving application public_key
=== Skipping subdir ssl, reason:
No usable OpenSSL found
===
=== Skipping subdir toolbar, reason:
Not needed by CouchDB
===
=== Skipping subdir tv, reason:
Not needed by CouchDB
===
=== Skipping subdir observer, reason:
Not needed by CouchDB
===
=== Entering application odbc
erlc -W  +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.10.16"'  +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.10.16"}' -o../ebin odbc.erl
erlc -W  +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.10.16"'  +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.10.16"}' -o../ebin odbc_app.erl
erlc -W  +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.10.16"'  +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.10.16"}' -o../ebin odbc_sup.erl
sed -e 's;%VSN%;2.10.16;' odbc.app.src > ../ebin/odbc.app
sed -e 's;%VSN%;2.10.16;' odbc.appup.src > ../ebin/odbc.appup
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f x86_64-apple-darwin13.0.0/Makefile TYPE=opt
gcc  -Werror=return-type -g -O2 -fno-strict-aliasing  -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_NETDB_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRUCT_SOCKADDR_IN6_SIN6_ADDR=1 -DHAVE_MEMSET=1 -DHAVE_SOCKET=1 -DHAVE_PTHREAD_H=1  -I. -I/usr/lib/include -I/Users/natevw/build-couchdb/dependencies/otp/lib/erl_interface/include -DUNIX -o ../priv/obj/x86_64-apple-darwin13.0.0/odbcserver.o -c odbcserver.c
odbcserver.c:118:10: fatal error: 'sql.h' file not found
#include "sql.h"
         ^
1 error generated.
make[4]: *** [../priv/obj/x86_64-apple-darwin13.0.0/odbcserver.o] Error 1
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
git reset --hard && git clean -fd

So it appears CouchDB's Erlang needs ODBC to build, but it has [wait for it…] No SQL !!1lol!!

yvondamours commented 10 years ago

We came across this exact same issue when trying to install Erlang itself on Mavericks. After digging around, we found this thread, where people were having the same issue trying to install PHP. The fix they found was to brew install unixodbc, then, in our case brew install erlang --with-unixodbc. Hope this helps!

jhs commented 10 years ago

Yes you are right. In fact, the odbc application should not even build at all! https://github.com/iriscouch/build-couchdb/blob/master/tasks/erlang.rake#L15

The odbc application's configure script removes its SKIP file. The new master puts it back, thereby disabling the odbc build. That seems to fix it, although I am not sure if I am playing with fire.