[#138] Thread Problems — Reimer Behrends <behrends@...>

I have been looking at the thread implementation of Ruby for the past

21 messages 1998/12/23
[#164] Re: Thread Problems — matz@... (Yukihiro Matsumoto) 1999/01/05

Hi.

[#167] Makefiles and -lcurses — Klaus.Schilling@... 1999/01/05

Julian Fondren writes:

[#168] Re: Makefiles and -lcurses — Julian Fondren <julian@...> 1999/01/05

OpenBSD has ncurses and it's own ocurses, and I prefer the latter.

[ruby-talk:00152] Re: inability to load extension modules in 1.2, c ore dump

From: Julian Fondren <julian@...>
Date: 1998-12-27 22:28:16 UTC
List: ruby-talk #152
> Please perform a "ldd miniruby", "ldd ruby" and "ldd socket.so" in the
> corresponding directories. Furthermore it probably would helpful to see
> the whole output of the configure script and of the make run. Then what
> was the complete output as you have tried to start ruby?

ldd /usr/local/bin/ruby:

/usr/local/bin/ruby:
	-lm.0 => /usr/lib/libm.so.0.1 (0x400cf000)
	-lc.21 => /usr/lib/libc.so.21.0 (0x400e3000)
	-ltk80.1 => /usr/local/lib/libtk80.so.1.3 (0x40185000)
	-lX11.6 => /usr/X11R6/lib/libX11.so.6.1 (0x4021b000)
	-lcurses.5 => /usr/lib/libcurses.so.5.0 (0x402ac000)
	-ltermcap.5 => /usr/lib/libtermcap.so.5.0 (0x402e6000)

complete output of ruby is:

ruby:0: [BUG] Segmentation fault
zsh: abort (core dumped)  ruby

this is the --with-static-linked-ext (which is what I used in 1.1d9)
version. The other only segfaults when I try to load _any_ extension lib,
so I assume that this problem has something to do with extensions.. At
first I thought it might be readline (this from the 1.3 compile, which was
unhappy with the readline downloaded from GOTO Kentaro's ruby page) but
1.2 doesn't have readline in ext/ defaultly. The configure and make are
pretty long, so I've attached those. The last line of the ruby compile,

ld: symbol __GLOBAL_OFFSET_TABLE_ remains undefined

seems suspicious, and the two warnings before it were not present in
1.1d9.

> 
> It may be that "socket.so" tries to load another shared lib (.so file)
> which cannot be loaded due to absence or wrong version. Ruby only tries
> to load socket.so, and if that fails it will claim 
> "No such file to load -- %s".
> 
> With the ldd commands above you will see, what libs should be loaded by
> socket.so, miniruby and ruby. Then you can check, whether all that libs
> exist or not.

perhaps, but all the libs exist.

> 
> Good luck!

thanks

> 
> Ciao,
> Cle.
> 
> 
> 

cya,

Attachments (2)

make (5.31 KB, text/plain)
gcc -g -O2 -I. -I. -I/usr/local/include  -c array.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c array.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c bignum.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c class.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c compar.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c dir.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c dln.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c enum.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c error.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c eval.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c file.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c fnmatch.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c gc.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c glob.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c hash.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c inits.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c io.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c marshal.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c math.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c numeric.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c object.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c pack.c
bison -y -d parse.y
gcc -g -O2 -I. -I. -I/usr/local/include  -c -o parse.o y.tab.c
rm -f y.tab.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c process.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c random.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c range.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c re.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c regex.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c ruby.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c signal.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c sprintf.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c st.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c string.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c struct.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c time.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c util.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c variable.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c version.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c main.c
gcc -g -O2 -I. -I. -I/usr/local/include  -c dmyext.c
gcc -g -O2 -I. -I. -I/usr/local/include main.o array.o  bignum.o  class.o  compar.o  dir.o  dln.o  enum.o  error.o  eval.o  file.o  fnmatch.o  gc.o  glob.o  hash.o  inits.o  io.o  marshal.o  math.o  numeric.o  object.o  pack.o  parse.o  process.o  random.o  range.o  re.o  regex.o  ruby.o  signal.o  sprintf.o  st.o  string.o  struct.o  time.o  util.o  variable.o  version.o   dmyext.o -lm   -o miniruby
compiling Win32API
compiling tk
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -c tkutil.c
ar cru tkutil.a tkutil.o
compiling tcltklib
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2 -I/usr/local/include/tcl8.0 -I/usr/local/include/tk8.0 -I/usr/X11R6/include -DHAVE_TCL_H -DHAVE_TK_H  -c tcltklib.c
ar cru tcltklib.a tcltklib.o
compiling socket
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -DHAVE_SYS_UN_H -DHAVE_SOCKET -DHAVE_GETHOSTNAME  -c socket.c
ar cru socket.a socket.o
compiling md5
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -c md5init.c
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -c md5c.c
ar cru md5.a md5init.o md5c.o
compiling kconv
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -c kconv.c
ar cru kconv.a kconv.o
compiling fcntl
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -c fcntl.c
ar cru fcntl.a fcntl.o
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -DHAVE_GETLOGIN -DHAVE_GETPWENT -DHAVE_GETGRENT -DPW_GECOS -DPW_CHANGE -DPW_CLASS -DPW_EXPIRE  -c etc.c
ar cru etc.a etc.o
compiling dbm
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -DHAVE_DBM_OPEN -DHAVE_DBM_CLEARERR  -c dbm.c
ar cru dbm.a dbm.o
compiling curses
gcc -I/usr/local/tmp/ruby-1.2 -I/usr/local/tmp/ruby-1.2 -I/usr/local/include -g -O2  -DHAVE_NCURSES_H -DHAVE_ISENDWIN -DHAVE_UNGETCH -DHAVE_BEEP -DHAVE_DOUPDATE -DHAVE_FLASH  -c curses.c
ar cru curses.a curses.o
gcc -g -O2 -c extinit.c
ar rcu libruby.a array.o  bignum.o  class.o  compar.o  dir.o  dln.o  enum.o  error.o  eval.o  file.o  fnmatch.o  gc.o  glob.o  hash.o  inits.o  io.o  marshal.o  math.o  numeric.o  object.o  pack.o  parse.o  process.o  random.o  range.o  re.o  regex.o  ruby.o  signal.o  sprintf.o  st.o  string.o  struct.o  time.o  util.o  variable.o  version.o   dmyext.o
gcc -g -O2 -I. -I. -I/usr/local/include main.o ext/extinit.o ext/tcltklib/tcltklib.a ext/socket/socket.a ext/md5/md5.a ext/kconv/kconv.a ext/fcntl/fcntl.a ext/etc/etc.a ext/dbm/dbm.a ext/curses/curses.a  libruby.a -lm  -lc -lc -L/usr/X11R6/lib -L/usr/local/lib -ltk80 -ltcl -lX11 -lm -lc -L/usr/local/lib -lc -lc -lc -lc -lc -L/usr/local/lib -lc -L/usr/local/lib -lcurses -ltermcap -lc -o ruby
process.c:905: warning: this program uses setreuid(), which is deprecated.
process.c:940: warning: this program uses setregid(), which is deprecated.
util.c:137: warning: mktmp() possibly used unsafely; consider using mkstemp()
tclUnixPipe.o: warning: tmpnam() possibly used unsafely; consider using mkstemp()
ld: symbol __GLOBAL_OFFSET_TABLE_ remains undefined
conf (12.4 KB, text/plain)
loading cache ./config.cache
checking host system type... i386-unknown-openbsd2.4
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking whether gcc needs -traditional... (cached) no
checking for bison... (cached) bison -y
checking for ranlib... (cached) ranlib
checking for ar... (cached) ar
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether make sets ${MAKE}... (cached) yes
checking for minix/config.h... (cached) no
checking size of int... (cached) 4
checking size of long... (cached) 4
checking size of void*... (cached) 4
checking for prototypes... (cached) yes
checking for variable length prototypes and stdarg.h... (cached) yes
checking for gcc attribute noreturn... (cached) yes
checking for crypt in -lcrypt... (cached) no
checking for dlopen in -ldl... (cached) no
checking for shl_load in -ldld... (cached) no
checking for setlocale in -lxpg4... (cached) no
checking for dirent.h that defines DIR... (cached) yes
checking for opendir in -ldir... (cached) no
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for limits.h... (cached) yes
checking for sys/file.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for pwd.h... (cached) yes
checking for sys/select.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/times.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for sys/wait.h... (cached) yes
checking for syscall.h... (cached) no
checking for a.out.h... (cached) yes
checking for string.h... (cached) yes
checking for utime.h... (cached) yes
checking for memory.h... (cached) yes
checking for direct.h... (cached) no
checking for uid_t in sys/types.h... (cached) yes
checking for size_t... (cached) yes
checking for st_blksize in struct stat... (cached) yes
checking for st_blocks in struct stat... (cached) yes
checking for st_rdev in struct stat... (cached) yes
checking type of array argument to getgroups... (cached) gid_t
checking return type of signal handlers... (cached) void
checking for working alloca.h... (cached) no
checking for alloca... (cached) yes
checking for pid_t... (cached) yes
checking for vfork.h... (cached) no
checking for working vfork... (cached) yes
checking for 8-bit clean memcmp... (cached) yes
checking for dup2... (cached) yes
checking for setenv... (cached) yes
checking for memmove... (cached) yes
checking for mkdir... (cached) yes
checking for strcasecmp... (cached) yes
checking for strerror... (cached) yes
checking for strftime... (cached) yes
checking for strchr... (cached) yes
checking for strstr... (cached) yes
checking for strtoul... (cached) yes
checking for strdup... (cached) yes
checking for crypt... (cached) yes
checking for flock... (cached) yes
checking for vsnprintf... (cached) yes
checking for fmod... (cached) yes
checking for killpg... (cached) yes
checking for drand48... (cached) yes
checking for random... (cached) yes
checking for wait4... (cached) yes
checking for waitpid... (cached) yes
checking for syscall... (cached) yes
checking for getcwd... (cached) yes
checking for truncate... (cached) yes
checking for chsize... (cached) no
checking for times... (cached) yes
checking for utimes... (cached) yes
checking for fcntl... (cached) yes
checking for lockf... (cached) yes
checking for setitimer... (cached) yes
checking for setruid... (cached) yes
checking for seteuid... (cached) yes
checking for setreuid... (cached) yes
checking for setrgid... (cached) yes
checking for setegid... (cached) yes
checking for setregid... (cached) yes
checking for setpgrp2... (cached) no
checking for getpgid... (cached) yes
checking for getgroups... (cached) yes
checking for getpriority... (cached) yes
checking for dlopen... (cached) yes
checking for sigprocmask... (cached) yes
checking for sigaction... (cached) yes
checking for _setjmp... (cached) yes
checking for setpgrp... (cached) yes
checking for setsid... (cached) yes
checking whether getpgrp() has arg... (cached) no
checking whether setpgrp() has args... (cached) yes
checking whether byte ordering is bigendian... (cached) no
checking whether char is unsigned... (cached) no
checking whether right shift preserve sign bit... (cached) yes
checking count field in FILE structures... (cached) _r
checking whether OS depend dynamic link works... yes
creating config.h
creating ./config.status
creating Makefile
creating ext/extmk.rb
creating cache ./config.cache
checking host system type... i386-unknown-openbsd2.4
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking for bison... bison -y
checking for ranlib... ranlib
checking for ar... ar
checking for a BSD compatible install... /usr/bin/install -c
checking whether make sets ${MAKE}... yes
checking for minix/config.h... no
checking size of int... 4
checking size of long... 4
checking size of void*... 4
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for gcc attribute noreturn... yes
checking for crypt in -lcrypt... no
checking for dlopen in -ldl... no
checking for shl_load in -ldld... no
checking for setlocale in -lxpg4... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for ANSI C header files... yes
checking for stdlib.h... yes
checking for unistd.h... yes
checking for limits.h... yes
checking for sys/file.h... yes
checking for sys/ioctl.h... yes
checking for pwd.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for sys/param.h... yes
checking for sys/wait.h... yes
checking for syscall.h... no
checking for a.out.h... yes
checking for string.h... yes
checking for utime.h... yes
checking for memory.h... yes
checking for direct.h... no
checking for uid_t in sys/types.h... yes
checking for size_t... yes
checking for st_blksize in struct stat... yes
checking for st_blocks in struct stat... yes
checking for st_rdev in struct stat... yes
checking type of array argument to getgroups... gid_t
checking return type of signal handlers... void
checking for working alloca.h... no
checking for alloca... yes
checking for pid_t... yes
checking for vfork.h... no
checking for working vfork... yes
checking for 8-bit clean memcmp... yes
checking for dup2... yes
checking for setenv... yes
checking for memmove... yes
checking for mkdir... yes
checking for strcasecmp... yes
checking for strerror... yes
checking for strftime... yes
checking for strchr... yes
checking for strstr... yes
checking for strtoul... yes
checking for strdup... yes
checking for crypt... yes
checking for flock... yes
checking for vsnprintf... yes
checking for fmod... yes
checking for killpg... yes
checking for drand48... yes
checking for random... yes
checking for wait4... yes
checking for waitpid... yes
checking for syscall... yes
checking for getcwd... yes
checking for truncate... yes
checking for chsize... no
checking for times... yes
checking for utimes... yes
checking for fcntl... yes
checking for lockf... yes
checking for setitimer... yes
checking for setruid... yes
checking for seteuid... yes
checking for setreuid... yes
checking for setrgid... yes
checking for setegid... yes
checking for setregid... yes
checking for setpgrp2... no
checking for getpgid... yes
checking for getgroups... yes
checking for getpriority... yes
checking for dlopen... yes
checking for sigprocmask... yes
checking for sigaction... yes
checking for _setjmp... yes
checking for setpgrp... yes
checking for setsid... yes
checking whether getpgrp() has arg... no
checking whether setpgrp() has args... yes
checking whether byte ordering is bigendian... no
checking whether char is unsigned... no
checking whether right shift preserve sign bit... yes
checking count field in FILE structures... _r
checking whether OS depend dynamic link works... yes
creating config.h
updating cache ./config.cache
creating ./config.status
creating Makefile
creating ext/extmk.rb
creating cache ./config.cache
checking host system type... i386-unknown-openbsd2.4
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking for bison... bison -y
checking for ranlib... ranlib
checking for ar... ar
checking for a BSD compatible install... /usr/bin/install -c
checking whether make sets ${MAKE}... yes
checking for minix/config.h... no
checking size of int... 4
checking size of long... 4
checking size of void*... 4
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for gcc attribute noreturn... yes
checking for crypt in -lcrypt... no
checking for dlopen in -ldl... no
checking for shl_load in -ldld... no
checking for setlocale in -lxpg4... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for ANSI C header files... yes
checking for stdlib.h... yes
checking for unistd.h... yes
checking for limits.h... yes
checking for sys/file.h... yes
checking for sys/ioctl.h... yes
checking for pwd.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for sys/param.h... yes
checking for sys/wait.h... yes
checking for syscall.h... no
checking for a.out.h... yes
checking for string.h... yes
checking for utime.h... yes
checking for memory.h... yes
checking for direct.h... no
checking for uid_t in sys/types.h... yes
checking for size_t... yes
checking for st_blksize in struct stat... yes
checking for st_blocks in struct stat... yes
checking for st_rdev in struct stat... yes
checking type of array argument to getgroups... gid_t
checking return type of signal handlers... void
checking for working alloca.h... no
checking for alloca... yes
checking for pid_t... yes
checking for vfork.h... no
checking for working vfork... yes
checking for 8-bit clean memcmp... yes
checking for dup2... yes
checking for setenv... yes
checking for memmove... yes
checking for mkdir... yes
checking for strcasecmp... yes
checking for strerror... yes
checking for strftime... yes
checking for strchr... yes
checking for strstr... yes
checking for strtoul... yes
checking for strdup... yes
checking for crypt... yes
checking for flock... yes
checking for vsnprintf... yes
checking for fmod... yes
checking for killpg... yes
checking for drand48... yes
checking for random... yes
checking for wait4... yes
checking for waitpid... yes
checking for syscall... yes
checking for getcwd... yes
checking for truncate... yes
checking for chsize... no
checking for times... yes
checking for utimes... yes
checking for fcntl... yes
checking for lockf... yes
checking for setitimer... yes
checking for setruid... yes
checking for seteuid... yes
checking for setreuid... yes
checking for setrgid... yes
checking for setegid... yes
checking for setregid... yes
checking for setpgrp2... no
checking for getpgid... yes
checking for getgroups... yes
checking for getpriority... yes
checking for dlopen... yes
checking for sigprocmask... yes
checking for sigaction... yes
checking for _setjmp... yes
checking for setpgrp... yes
checking for setsid... yes
checking whether getpgrp() has arg... no
checking whether setpgrp() has args... yes
checking whether byte ordering is bigendian... no
checking whether char is unsigned... no
checking whether right shift preserve sign bit... yes
checking count field in FILE structures... _r
checking whether OS depend dynamic link works... yes
creating config.h
updating cache ./config.cache
creating ./config.status
creating Makefile
creating ext/extmk.rb

In This Thread