Ruby & gd

Hi,

I’m posting again and again… after a friend of mine doesn’t manage
to get ruby work with gd on his windows system, I failed making ruby
run with gd under linux.

I did it as written in the INSTALL.en file.
I first ran :
ruby extconf.rb --with-gd-include=/usr/local/lib/
–with-gd-lib=/usr/local/lib

That’s the place where gd is installed.

Then I ran make & make install. There were no errors reported…

Here the error when trying to run the example.rb:

/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so: libgd.so.2: cannot
open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so (LoadError)
from ./sample/example.rb:3

What’s wrong?

SvT

Stick an entry for /usr/local/lib in
/etc/ld.so.conf?

···

Hi,

I’m posting again and again… after a friend of mine doesn’t manage
to get ruby work with gd on his windows system, I failed making ruby
run with gd under linux.

I did it as written in the INSTALL.en file.
I first ran :
ruby extconf.rb --with-gd-include=/usr/local/lib/
–with-gd-lib=/usr/local/lib

That’s the place where gd is installed.

Then I ran make & make install. There were no errors reported…

Here the error when trying to run the example.rb:

/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so: libgd.so.2: cannot
open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so (LoadError)
from ./sample/example.rb:3

What’s wrong?

SvT


A professor is one who talks in someone else’s sleep.
Rasputin :: Jack of All Trades - Master of Nuns

A lacking -Wl,-R /usr/local/lib in the compilation (aka ``rpath’').
You shouldn’t need touching your system’s configuration for the
installation of a packet. Contact the package’s author and complain
about the lack of using the right linker incantations :slight_smile:

-Martin

···

On Thu, Jan 29, 2004 at 01:54:53AM +0900, Safran von Twesla wrote:

Hi,

I’m posting again and again… after a friend of mine doesn’t manage
to get ruby work with gd on his windows system, I failed making ruby
run with gd under linux.

I did it as written in the INSTALL.en file.
I first ran :
ruby extconf.rb --with-gd-include=/usr/local/lib/
–with-gd-lib=/usr/local/lib

That’s the place where gd is installed.

Then I ran make & make install. There were no errors reported…

Here the error when trying to run the example.rb:

/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so: libgd.so.2: cannot
open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so (LoadError)
from ./sample/example.rb:3

What’s wrong?

Hi,

···

At Thu, 29 Jan 2004 01:54:53 +0900, Safran von Twesla wrote:

I first ran :
ruby extconf.rb --with-gd-include=/usr/local/lib/
–with-gd-lib=/usr/local/lib

Are GD headers in /usr/local/lib?


Nobu Nakada

Well, I did. But nothing changed :frowning:

SvT

···

On Thu, 29 Jan 2004 02:15:31 +0900, Rasputin rasputnik@hellooperator.net wrote:

Stick an entry for /usr/local/lib in
/etc/ld.so.conf?

Martin Weber wrote:

···

On Thu, Jan 29, 2004 at 01:54:53AM +0900, Safran von Twesla wrote:

Hi,

I’m posting again and again… after a friend of mine doesn’t manage
to get ruby work with gd on his windows system, I failed making ruby
run with gd under linux.

I did it as written in the INSTALL.en file.
I first ran :
ruby extconf.rb --with-gd-include=/usr/local/lib/
–with-gd-lib=/usr/local/lib

That’s the place where gd is installed.

Then I ran make & make install. There were no errors reported…

Here the error when trying to run the example.rb:

/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so: libgd.so.2: cannot
open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/GD.so (LoadError)
from ./sample/example.rb:3

What’s wrong?

A lacking -Wl,-R /usr/local/lib in the compilation (aka ``rpath’').
You shouldn’t need touching your system’s configuration for the
installation of a packet. Contact the package’s author and complain
about the lack of using the right linker incantations :slight_smile:

Agreed (my OS, NetBSD , doesnt do system library hacks like that.
-Wl,-R /shlibdir is pretty much compulsory). But since most Linux source
builds aim themselves
at /usr/local, this’ll save you hours of hassle .

In article s1vf10h982mqbthdlmc0eai6frf85flprk@4ax.com,

···

Safran von Twesla me@privacy.net wrote:

On Thu, 29 Jan 2004 02:15:31 +0900, Rasputin >rasputnik@hellooperator.net wrote:

Stick an entry for /usr/local/lib in
/etc/ld.so.conf?

Well, I did. But nothing changed :frowning:

did you re-run ldconfig after updating /etc/ld.so.conf?

Mike


mike@stok.co.uk | The “`Stok’ disclaimers” apply.
http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA
mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60
http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA

did you run ldconfig?

-a

···

On Wed, 28 Jan 2004, Safran von Twesla wrote:

Date: Wed, 28 Jan 2004 19:15:47 +0100
From: Safran von Twesla me@privacy.net
Newsgroups: comp.lang.ruby
Subject: Re: Ruby & gd

On Thu, 29 Jan 2004 02:15:31 +0900, Rasputin > rasputnik@hellooperator.net wrote:

Stick an entry for /usr/local/lib in
/etc/ld.so.conf?

Well, I did. But nothing changed :frowning:

SvT

ATTN: please update your address books with address below!

===============================================================================

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
STP :: Solar-Terrestrial Physics Data | NCEI
NGDC :: http://www.ngdc.noaa.gov/
NESDIS :: http://www.nesdis.noaa.gov/
NOAA :: http://www.noaa.gov/
US DOC :: http://www.commerce.gov/

The difference between art and science is that science is what we
understand well enough to explain to a computer.
Art is everything else.
– Donald Knuth, “Discover”

/bin/sh -c ‘for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done’
===============================================================================

True. But being a NetBSD user myself, I prefer to kick all those lazy
folks who do not even know what ‘rpath’ is referring to [preferrably
with patches:)]. You’ll probably know one of hubertf’s sigs:
…because Unix is NOT only #inlude <linux.h>…

Writers of extensions should keep in mind ruby runs on more than linux.
Things like those are just sloppy programming, and should be fixed while
they show up.

So we all who find such problems (and are savvy enough) should work on
fixing that. Hence the kick the author hint :slight_smile: Given that extconf based
installation, makes me wonder whether there’s something broken in
general or not; I’ve not yet used ‘raw’ installation of any ruby package
(pkgsrc suffices for me) - yet if it is, should be fixed globally.

[Most linux users wouldn’t even realize, most std installs have an
ld.so.conf with any directory you might ever think of being added
because most linux distributors don’t know about rpath either :>]

-Martin

···

On Fri, Jan 30, 2004 at 01:17:21AM +0900, Rasputin wrote:

Martin Weber wrote:

(… quotes cut …)
A lacking -Wl,-R /usr/local/lib in the compilation (aka ``rpath’').
You shouldn’t need touching your system’s configuration for the
installation of a packet. Contact the package’s author and complain
about the lack of using the right linker incantations :slight_smile:

Agreed (my OS, NetBSD , doesnt do system library hacks like that.
-Wl,-R /shlibdir is pretty much compulsory). But since most Linux source
builds aim themselves
at /usr/local, this’ll save you hours of hassle .

well, I did not.
And now I did, it looks as if it would work… :wink:

Thx

SvT

···

On Wed, 28 Jan 2004 18:42:10 GMT, mike@stok.co.uk (Mike Stok) wrote:

did you re-run ldconfig after updating /etc/ld.so.conf?