Ruby on AIX 4.3.3

M

Matt Lawrence

I just built Ruby 1.8.1 on an AIX 4.3.3 box using gcc. When I try to run
something that uses "require 'net/http'", I get the following:

/usr/local/lib/ruby/1.8/net/protocol.rb:21:in `require': No such file to
load -- socket (LoadError)
from /usr/local/lib/ruby/1.8/net/protocol.rb:21
from /usr/local/lib/ruby/1.8/net/http.rb:26:in `require'
from /usr/local/lib/ruby/1.8/net/http.rb:26
from ./testit:3:in `require'
from ./testit:3

And, I can't fins any file named 'socket*' under /usr/local/lib

HELP?????

-- Matt
The American Non-Sequiteur Society: We may not make sense, but we do like
pizza.
 
M

Mark Hubbart

I just built Ruby 1.8.1 on an AIX 4.3.3 box using gcc. When I try to
run
something that uses "require 'net/http'", I get the following:

/usr/local/lib/ruby/1.8/net/protocol.rb:21:in `require': No such file
to
load -- socket (LoadError)
from /usr/local/lib/ruby/1.8/net/protocol.rb:21
from /usr/local/lib/ruby/1.8/net/http.rb:26:in `require'
from /usr/local/lib/ruby/1.8/net/http.rb:26
from ./testit:3:in `require'
from ./testit:3

And, I can't fins any file named 'socket*' under /usr/local/lib

Socket is a C extension; I would strongly suspect that it failed to
compile when you built ruby. Compiles of extensions will fail silently.

Try cd'ing into the source/ext/socket/ directory and "ruby extconf.rb;
make"; This will display any errors.
 
Z

Zane Dodson

Hi Matt,

On Wed, May 12, 2004 at 11:23:11AM +0900, Matt Lawrence wrote:
| <snip>
|
| I just tried that. Here's what it said:
|
| <snip>
|
| checking for socket()... no
|
| Ideas? Something missing from the gcc libraries? Help?

I think it will be necessary to link with libbsd.a to use the BSD
socket functions on AIX. It looks as though the configure script
did not check that library.

Refer to the AIX version 4.3 Communications Programming Concepts manual.
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/progcomc/skt_examps.htm#A299X9b27

Best regards,
 
Z

Zane Dodson

Hi Matt,

|
| > I think it will be necessary to link with libbsd.a to use the BSD
| > socket functions on AIX. It looks as though the configure script
| > did not check that library.
|
| I've been poking through the configure scripts and I really have no clue
| what to modify to make this work. Hints?

Try invoking configure this way (untested --- I do not have access
to an AIX box):

./configure LIBS=-lbsd

(It would also be a good idea to use `nm' to verify that `socket' is
indeed in `libbsd.a'.)

Best regards,
 
J

Jos Backus

I've been poking through the configure scripts and I really have no clue
what to modify to make this work. Hints?

It used to be sufficient (back in the AIX 3 days) to invoke configure like
this:

CC=bsdcc ./configure ...

but that may no longer work in AIX 4. Does your system have
/usr/lpp/bos/bsdport?

--
Jos Backus _/ _/_/_/ Sunnyvale, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'
 
J

Jos Backus

It doesn't seem to. The problem looks to be somewhere in the configure
script. I really wish I understood enough of how it works to stand a
chance of fixing it. This is the sort of side issue that Matz shouldn't
need to worry about.

Unfortunately I don't have access to an AIX box or I would investigate. That
plus I'm in the middle of moving...

--
Jos Backus _/ _/_/_/ Sunnyvale, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top