From: Nigel Gilbert Date: 2002-01-03T18:33:46+09:00 Subject: [ruby-talk:30116] Re: Problem compiling Ruby on Solaris On Wednesday, January 2, 2002, at 03:43 AM, Takaaki Tateishi wrote: > > At Tue, 1 Jan 2002 23:10:57 +0900, > Nigel Gilbert wrote: >> compiling curses >> ... >> /usr/ccs/lib/libcurses.a(wgetstr.o) >> ... >> ld: fatal: relocations remain against allocatable but non-writable >> sections >> collect2: ld returned 1 exit status > > How about adding have_library("termlib") after > have_library("curses","initscr") in extconf.rb? > -- > Takaaki Tateishi Thank you for this advice, but it changes, but does not cure the problem. I modified ./ext/curses/extconf.rb. Since there are three mentions of 'have_library("curses","initscr")' in this file, I appended 'and have_library("termlib")' after each of them (I assume I should use 'and'?). the file is now: {josef:36} cat extconf.rb require 'mkmf' dir_config('curses') dir_config('ncurses') dir_config('termcap') make=false have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM if have_header("ncurses.h") and have_library("ncurses", "initscr") and have_library("termlib") make=true elsif have_header("ncurses/curses.h") and have_library("ncurses", "initscr") and have_library("termlib") make=true elsif have_header("curses_colr/curses.h") and have_library("cur_colr", "initscr") make=true else have_library("termcap", "tgetent") if have_header("curses.h") and have_library("curses", "initscr") and have_library("termlib") make=true end end if make for f in %w(isendwin ungetch beep doupdate flash deleteln wdeleteln) have_func(f) end create_makefile("curses") end I then re-ran make, and got: {josef:34} make compiling Win32API compiling curses make[1]: Entering directory `/opt/nigel/ruby-1.6.6/ext/curses' gcc -fPIC -g -O2 -I/opt/nigel/ruby-1.6.6 -I/opt/nigel/ruby-1.6.6 -I/usr/local/include -DHAVE_CURSES_H -DHAVE_ISENDWIN -DHAVE_UNGETCH -DHAVE_BEEP -DHAVE_DOUPDATE -DHAVE_FLASH -DHAVE_DELETELN -DHAVE_WDELETELN -c curses.c gcc -Wl,-G -shared -L/opt/nigel/ruby-1.6.6 -o curses.so curses.o -ltermlib -lcurses -ltermcap -lc Text relocation remains referenced against symbol offset in file kill 0x28 /usr/ccs/lib/libtermlib.a(tstp.o) beep 0x2a0 /usr/ccs/lib/libtermlib.a(wgetstr.o) beep 0x1b4 /usr/ccs/lib/libtermlib.a(wgetstr.o) The problem references have now changed to mention libtermlib (used to be libcurses). What now? Thanks again for your help! Nigel __________________________________________________________________________ Professor Nigel Gilbert, FREng, AcSS, Pro Vice-Chancellor and Professor of Sociology, University of Surrey, Guildford GU2 7XH, UK. +44 (0)1483 689173