LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-21-2008, 09:27 PM   #1
randomsel
Member
 
Registered: Oct 2006
Location: Wilmington, DE
Distribution: Slackware 11
Posts: 201

Rep: Reputation: 30
default ruby missing library, test case provided.


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:
  1. install sqlite from slackbuilds.org
  2. install rubygems
  3. 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

Last edited by randomsel; 02-21-2008 at 09:40 PM.
 
Old 02-22-2008, 09:50 AM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,846

Rep: Reputation: Disabled
Yeah, ruby has to be compiled with sqlite installed.
Since Slackware doesn't ship sqlite, that's somewhat difficult to have a stock package linked with it, right?
 
Old 02-22-2008, 11:05 AM   #3
randomsel
Member
 
Registered: Oct 2006
Location: Wilmington, DE
Distribution: Slackware 11
Posts: 201

Original Poster
Rep: Reputation: 30
that's... rather logical :P

the same has happened when I tried installing the mysql c adapter for ruby... Next time I'll have an idea of what's happening.

Thanks a bunch!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Qt-mt library redhat_newbie Linux - Desktop 1 07-19-2007 07:27 AM
LXer: Microsoft may lodge patent lawsuit test case: Linux specialist LXer Syndicated Linux News 0 11-22-2006 11:03 AM
missing library kholdstayr Slackware 4 12-20-2003 05:56 PM
theres a missing library! e1000 Linux - Software 2 10-22-2003 02:33 AM
The Case of the Missing Memory mfeat Red Hat 6 09-25-2003 11:52 PM


All times are GMT -5. The time now is 07:14 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration