some local issues with ruby 1.8.0 preview 4 and 5

G

Gavin Jin

I have been building preview 4 to add new functions to libpcap-ruby for
a couple of weeks
without any problem, but I can't build preview 5 and the error is


[dhcp-64-101-108-187:ruby/1.8Preview5/ruby-1.8.0] gjin% make
compiling bigdecimal
./ext/extmk.rb:104: warning: Insecure world writable dir
/Users/gjin/code, mode 040777
make[1]: Nothing to be done for `all'.
compiling curses
./ext/extmk.rb:104: warning: Insecure world writable dir
/Users/gjin/code, mode 040777
make[1]: Nothing to be done for `all'.
compiling dbm
./ext/extmk.rb:104: warning: Insecure world writable dir
/Users/gjin/code, mode 040777
cc -dynamic -bundle -undefined suppress -flat_namespace
-L"/Volumes/software/development/ruby/1.8Preview5/ruby-1.8.0"
-L"/usr/local/lib" -o dbm.bundle dbm.o -ldb -ldl -lobjc
ld: can't locate file for: -ldb
make[1]: *** [dbm.bundle] Error 1
make: *** [all] Error 1


This happens even with /sw/lib, where gdbm is installed, is in the
library path.
I then tried to add symbolic links to /usr/local/lib :
[dhcp-64-101-108-187:/usr/local/lib] gjin% sudo ln -s
/Volumes/OpenApps/sw/lib/libgdbm.la libgdbm.la
Password:
[dhcp-64-101-108-187:/usr/local/lib] gjin% sudo ln -s
/Volumes/OpenApps/sw/lib/libgdbm.a libgdbm.a
[dhcp-64-101-108-187:/usr/local/lib] gjin% sudo ln -s
/Volumes/OpenApps/sw/lib/libgdbm.2.0.0.dylib libgdbm.dylib
[dhcp-64-101-108-187:/usr/local/lib] gjin%

but it didn't help.




The problem I have with preview 4 is

Dir.open(ARGV[1])

is getting error when the directory passed with ARGV[1] doesn't exist:

/Users/gjin/code/util/ruby/IP/myTest.rb:8:in `open': No such file or
directory - /Volumes/users/gjin/cisco/passthru/decoded/qqq
(Errno::ENOENT)
from /Users/gjin/code/util/ruby/IP/myTest.rb:8

Dir.open is supposed to create a new directory if it doesn't exist.

Strange thing is the same script work on another machine that runs the
same 1.8 preview 4.
I guess I am missing something with this machine.
Both machines are powerMac G4 dual 1.25 running OS X 10.2.6.
 
N

nobu.nokada

Hi,

At Thu, 31 Jul 2003 08:04:50 +0900,
Gavin said:
compiling dbm
./ext/extmk.rb:104: warning: Insecure world writable dir
/Users/gjin/code, mode 040777
cc -dynamic -bundle -undefined suppress -flat_namespace
-L"/Volumes/software/development/ruby/1.8Preview5/ruby-1.8.0"
-L"/usr/local/lib" -o dbm.bundle dbm.o -ldb -ldl -lobjc
ld: can't locate file for: -ldb
make[1]: *** [dbm.bundle] Error 1
make: *** [all] Error 1

ld searches libdb.la (or .dylib?).
This happens even with /sw/lib, where gdbm is installed, is in the
library path.
I then tried to add symbolic links to /usr/local/lib :
[dhcp-64-101-108-187:/usr/local/lib] gjin% sudo ln -s
/Volumes/OpenApps/sw/lib/libgdbm.la libgdbm.la
Password:
[dhcp-64-101-108-187:/usr/local/lib] gjin% sudo ln -s
/Volumes/OpenApps/sw/lib/libgdbm.a libgdbm.a
[dhcp-64-101-108-187:/usr/local/lib] gjin% sudo ln -s
/Volumes/OpenApps/sw/lib/libgdbm.2.0.0.dylib libgdbm.dylib
[dhcp-64-101-108-187:/usr/local/lib] gjin%

instead of gdbm.

Try to "configure" with --with-opt-dir=/Volumes/OpenApps/sw
option.
Dir.open(ARGV[1])

is getting error when the directory passed with ARGV[1] doesn't exist:

/Users/gjin/code/util/ruby/IP/myTest.rb:8:in `open': No such file or
directory - /Volumes/users/gjin/cisco/passthru/decoded/qqq
(Errno::ENOENT)
from /Users/gjin/code/util/ruby/IP/myTest.rb:8

Definitely normal.
Dir.open is supposed to create a new directory if it doesn't exist.

No. Dir.open just accesses the existing directory. Use
Dir.mkdir to create a new directory.
 

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,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top