Hey all,
I don't know where to drop a bug notice for Slackware, and thought this would be as likely a place as any other.
Also, please correct me if I'm wrong. My gcc-fu's not that good.
So the test case:
using the default ruby package:
- install sqlite from slackbuilds.org
- install rubygems
- install the sqlite3-ruby gem
The gem will not compile, complaining about a missing function.
After a bit of struggle and searching for the missing library, passing the parameters that the gem asks for, checking that the library is indeed in /usr/lib, I finally fixed this by doing the most stupid thing possible:
compiled ruby from source using ./configure make make install
then the gem installed with no problem.
here's the failed build's log file in it's entirety:
Code:
root@portalab:/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api# cat mkmf.log
have_header: checking for sqlite3.h... -------------------- yes
"gcc -E -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/usr/local/include -O2 -march=i486 -mtune=i686 -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <sqlite3.h>
/* end */
--------------------
have_library: checking for sqlite3_open() in -lsqlite3... -------------------- no
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/usr/local/include -O2 -march=i486 -mtune=i686 -fPIC conftest.c -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -rdynamic -Wl,-export-dynamic -lruby-static -lsqlite3 -ldl -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:3: error: 'sqlite3_open' undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))sqlite3_open; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/usr/local/include -O2 -march=i486 -mtune=i686 -fPIC conftest.c -L'/usr/lib' -Wl,-R'/usr/lib' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -rdynamic -Wl,-export-dynamic -lruby-static -lsqlite3 -ldl -lcrypt -lm -lc"
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../../i486-slackware-linux/bin/ld: cannot find -lruby-static
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { sqlite3_open(); return 0; }
/* end */
--------------------
root@portalab:/usr/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3/ext# ls /usr/lib/libsqlite3.*
/usr/lib/libsqlite3.a /usr/lib/libsqlite3.la /usr/lib/libsqlite3.so /usr/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so.0.8.6
root@portalab:/usr/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3/ext#
Edit: sorry wrong log file