ruby-1.6.8-preview4 compile fails in ncurses 
Author Message
 ruby-1.6.8-preview4 compile fails in ncurses

Compiling ruby-1.6.8-preview fails with lots of undefined references
when trying to build curses.  I have never had his problem with
previous versions: 1.6.6 and 1.6.7 built straight out of the box.  I
think I have upgraded glibc-* packages since I last tried to build
ruby, so may be that is the reason?

Details:
AMD K6 233MHz
Linux 2.2.23
Red Hat 6.2
glibc-2.1.3-28 (rpm)
gcc 2.95.3
./configure \
        --enable-shared

Here's the log:

compiling Win32API
compiling curses
make[1]: Entering directory `/usr/local/src/Build/Tools/ruby-1.6.8-preview4/ext/curses'
gcc -shared  -Wl,--no-undefined -L/usr/local/src/Build/Tools/ruby-1.6.8-preview4 -L/usr/local/lib  -o curses.so curses.o -L. -lruby -lncurses -lc




































collect2: ld returned 1 exit status
make[1]: *** [curses.so] Error 1
make[1]: Leaving directory `/usr/local/src/Build/Tools/ruby-1.6.8-preview4/ext/curses'

Cheers,

Jeremy Henty



Mon, 06 Jun 2005 19:47:54 GMT  
 ruby-1.6.8-preview4 compile fails in ncurses

Quote:

> Compiling ruby-1.6.8-preview fails with lots of undefined references
> when trying to build curses.  I have never had his problem with
> previous versions: 1.6.6 and 1.6.7 built straight out of the box.  I
> think I have upgraded glibc-* packages since I last tried to build
> ruby, so may be that is the reason?

Update: no it is not the reason.  I went back to the ruby-1.6.7
source, ran 'make distclean', then rebuilt.  No problem.  Did the same
in ruby-1.6.8-preview.  Same problem as before.

I notice that the ruby-1.6.8-preview build made the ruby executable
OK, but fell over compiling the first file of the first extension.
Which *suggests* that maybe the actual build for extensions is broken
rather than curses itself.  I will investigate further.

Jeremy Henty



Mon, 06 Jun 2005 21:42:31 GMT  
 ruby-1.6.8-preview4 compile fails in ncurses
Hi,

At Thu, 19 Dec 2002 20:55:45 +0900,

Quote:

> Compiling ruby-1.6.8-preview fails with lots of undefined references
> when trying to build curses.  I have never had his problem with
> previous versions: 1.6.6 and 1.6.7 built straight out of the box.  I
> think I have upgraded glibc-* packages since I last tried to build
> ruby, so may be that is the reason?

> Details:
> AMD K6 233MHz
> Linux 2.2.23
> Red Hat 6.2
> glibc-2.1.3-28 (rpm)
> gcc 2.95.3
> ../configure \
>    --enable-shared

On my box, it worked fine.  Whitch version is your ld?
  $ ld -v
  GNU ld version 2.11.92.0.10 20011021

Does this patch fix it?

Index: extmk.rb.in
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/Attic/extmk.rb.in,v
retrieving revision 1.34.2.37
diff -u -2 -p -r1.34.2.37 extmk.rb.in
--- extmk.rb.in 11 Dec 2002 15:13:37 -0000      1.34.2.37



-    $DLDFLAGS << " -Wl,--no-undefined"
+    $DLDFLAGS << " -Wl,--no-undefined -Wl,--allow-shlib-undefined"
   end




     $LIBPATH.unshift $topdir

 "
   mfile.printf "LOCAL_LIBS = %s %s\n", $LOCAL_LIBS, $local_flags
-  mfile.printf "LIBS = %s\n", $libs
+  mfile.printf "LIBS = %s%s\n", optlibs, $libs
   mfile.printf "OBJS = "
   if !$objs then

--
Nobu Nakada



Mon, 06 Jun 2005 22:33:41 GMT  
 ruby-1.6.8-preview4 compile fails in ncurses
Nobu,

Thank you for replying so quickly,

In article

Quote:

>  ... Whitch version is your ld?
>   $ ld -v
>   GNU ld version 2.11.92.0.10 20011021

GNU ld version 2.9.5 (with BFD 2.9.5.0.22)

I fixed things myself by commenting out ext/extmk.rb.in , line 381.

381:    $DLDFLAGS << " -Wl,--no-undefined"

Now ruby builds, tests and installs OK.  Unfortunately your patch
gives me:

gcc -shared  -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/local/src/Build/Tools/ruby-1.6.8-preview4 -L/usr/local/lib  -o curses.so curses.o -L. -lruby -ldl -lcrypt -lm  -lncurses -lc
/usr/bin/ld: unrecognized option `--allow-shlib-undefined'

Maybe Red Hat 6.3 is too old?  :-(

HTH,

Jeremy Henty



Mon, 06 Jun 2005 23:19:22 GMT  
 ruby-1.6.8-preview4 compile fails in ncurses
Hi,

At Fri, 20 Dec 2002 00:36:26 +0900,

Quote:

> I fixed things myself by commenting out ext/extmk.rb.in , line 381.

> 381:    $DLDFLAGS << " -Wl,--no-undefined"

> Now ruby builds, tests and installs OK.  Unfortunately your patch
> gives me:

> gcc -shared  -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/local/src/Build/Tools/ruby-1.6.8-preview4 -L/usr/local/lib  -o curses.so curses.o -L. -lruby -ldl -lcrypt -lm  -lncurses -lc
> /usr/bin/ld: unrecognized option `--allow-shlib-undefined'

What does reverting line 381 change?

Quote:
> Maybe Red Hat 6.3 is too old?  :-(

Maybe.

--
Nobu Nakada



Tue, 07 Jun 2005 00:17:22 GMT  
 ruby-1.6.8-preview4 compile fails in ncurses
In article

Quote:

> Hi,

> At Fri, 20 Dec 2002 00:36:26 +0900,

>> I fixed things myself by commenting out ext/extmk.rb.in , line 381.

>> 381:    $DLDFLAGS << " -Wl,--no-undefined"

>> Now ruby builds, tests and installs OK.  Unfortunately your patch
>> gives me:

>> gcc -shared  -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/local/src/Build/Tools/ruby-1.6.8-preview4 -L/usr/local/lib  -o curses.so curses.o -L. -lruby -ldl -lcrypt -lm  -lncurses -lc
>> /usr/bin/ld: unrecognized option `--allow-shlib-undefined'

> What does reverting line 381 change?

Same problem as before.  

Quote:
>> Maybe Red Hat 6.3 is too old?  :-(

> Maybe.

I have downloaded the latest binutils.  I guess that should fix it.

Regards,

Jeremy



Tue, 07 Jun 2005 22:28:16 GMT  
 ruby-1.6.8-preview4 compile fails in ncurses

Quote:

>>> I fixed things myself by commenting out ext/extmk.rb.in , line 381.

>>> 381:    $DLDFLAGS << " -Wl,--no-undefined"

>>> Now ruby builds, tests and installs OK.  Unfortunately your patch
>>> gives me:

>>> gcc -shared  -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/local/src/Build/Tools/ruby-1.6.8-preview4 -L/usr/local/lib  -o curses.so curses.o -L. -lruby -ldl -lcrypt -lm  -lncurses -lc
>>> /usr/bin/ld: unrecognized option `--allow-shlib-undefined'
> I have downloaded the latest binutils.  I guess that should fix it.

Update: it did.  Thanks to Nobu for all his suggestions.

Regards,

Jeremy Henty



Wed, 08 Jun 2005 00:50:44 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. ruby-1.6.8-preview4 changed module_eval?

2. Compiling Ruby 1.8.0 with MinGW fails

3. help with ncurses - if anyone can give me a simple ncurses program

4. ncurses-ruby on cygwin

5. ncurses-ruby 0.7

6. ncurses-ruby 0.6

7. ncurses and ruby

8. Is there any Ruby app using ncurses?

9. ncurses in ruby

10. ruby and ncurses

11. ruby-1.8.0 (cvs) build failed on HP-UX 11.11

12. ruby fails to install on a Cray SV1

 

 
Powered by phpBB® Forum Software