ruby bindings on OS X are broken? (was Re: [ANN] New awesome vim plug-in using Ruby bindings)

Subject: ruby bindings on OS X are broken? (was Re: [ANN] New awesome vim plug-in using Ruby bindings)

Date: Mon, 23 Apr 2012 10:39:33 +0100

To: notmuch@notmuchmail.org

Cc: Ali Polatel

From: Charlie Allom


Hello, Has anyone seen this on OS X?

I can't see what the linker must be doing.

10:36 capslock:notmuch/bindings/ruby% ruby extconf.rb
checking for notmuch.h in ../../lib... yes
checking for notmuch_database_create() in -lnotmuch... yes
creating Makefile
10:36 capslock:notmuch/bindings/ruby% make
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c database.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c directory.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c filenames.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c init.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c message.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c messages.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c query.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c status.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c tags.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c thread.c
/opt/local/bin/gcc-apple-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin11 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -pipe -O2 -arch x86_64  -fno-common -pipe -fno-common  -arch x86_64 -c threads.c
/opt/local/bin/gcc-apple-4.2 -dynamic -bundle -undefined suppress -flat_namespace -o notmuch.bundle database.o directory.o filenames.o init.o message.o messages.o query.o status.o tags.o thread.o threads.o -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64  -arch x86_64  -lruby -lnotmuch  -lpthread -ldl -lobjc
ld: duplicate symbol _notmuch_rb_cDatabase in directory.o and database.o for architecture x86_64
collect2: ld returned 1 exit status
make: *** [notmuch.bundle] Error 1
10:37 capslock:notmuch/bindings/ruby%

--
 +442077294797
 http://mediasp.com/

Thread: