public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: curses problem trying to build ruby
@ 2000-12-13 13:39 John Wiersba
  2000-12-13 13:46 ` Charles Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiersba @ 2000-12-13 13:39 UTC (permalink / raw)
  To: 'Charles Wilson'; +Cc: 'cygwin'

Charles,

Perfect!  That was the problem.  I solved it by reinstalling everything from
scratch.  The make of ruby is going much better.  Thanks for your help!! 

I'm having a problem further on now.  I've sent email to the author, but I
thought I'd ask you on the off chance that you've actually built ruby.

   make[1]: Leaving directory `/jrw/ftp/ruby/junk/ruby-1.6.1/ext/Win32API'
   make[1]: Entering directory `/jrw/ftp/ruby/junk/ruby-1.6.1'
   windres --include-dir . --include-dir . --include-dir ./win32 ruby.rc 
      ruby.res.o

   gcc -g -O2   main.o ruby.exp ruby.res.o librubys.a -lcrypt   -o ruby.exe
   gcc: ruby.exp: No such file or directory
   make[1]: *** [ruby.exe] Error 1
   make[1]: Leaving directory `/jrw/ftp/ruby/junk/ruby-1.6.1'

There's no ruby.exp (and I couldn't see how one is supposed to be made -- I
tried "make ruby.exp").

-- John Wiersba

> -----Original Message-----
> From: Charles Wilson [ mailto:cwilson@ece.gatech.edu ]
> Sent: Wednesday, December 13, 2000 12:42 PM
> To: John Wiersba
> Cc: cygwin@sources.redhat.com
> Subject: Re: curses problem trying to build ruby
> 
> 
> John Wiersba wrote:
> > 
> > Charles,
> > 
> > I simplified the problem a little, to get rid of dllwrap:
> > 
> >    $ cd ruby-1.6.1/ext/curses
> >    $ gcc curses.o -L../.. -lcygwin-ruby16 -lncurses
> >    curses.o: In function `free_window':
> >    /.../ruby-1.6.1/ext/curses/curses.c:65: undefined 
> reference to `stdscr'
> >    ...
> > 
> > It looks like stdscr is not defined in libncurses.  But,
> > 
> >    $ cd /usr/lib
> >    $ ls -l *cur*
> >    lrw-r--r-- 1 jrw JRW     23 Dec 12 18:36 libcurses.a -> 
> libncurses.a
> >    lrw-r--r-- 1 jrw JRW     27 Dec 12 18:36 libcurses.dll.a ->
> > libncurses.dll.a
> >    -rw-r--r-- 1 jrw JRW 277240 Nov 25 00:44 libncurses++.a
> >    -rw-r--r-- 1 jrw JRW 392186 Nov 25 00:08 libncurses.a
> >    -rw-r--r-- 1 jrw JRW 263752 Nov 25 00:44 libncurses.dll.a
> >    -rw-r--r-- 1 jrw JRW   4820 Nov 11 01:32 libsecur32.a
> >    $ nm libncurses.a | grep stdscr
> >             U _stdscr
> >    ...
> >             U _stdscr
> >    00000000 D _stdscr
> >             U _stdscr
> > 
> > seems to show that it is.
> 
> But you're not linking to libncurses.a.  You are linking to
> libncurses.dll.a, the dll import lib.  To avoid this, you have to
> specify -static.  But that's not the real puzzler.  
> 
> /usr/include/ncurses.h defines stdscr thus:
>    extern NCURSES_EXPORT_VAR(WINDOW *)   stdscr;
> which expands to 
>    extern __declspec(dllimport) WINDOW * stdscr;
> 
> Short version: curses.o should have the following undefined symbol
>               U _imp__stdscr
> not
>               U _stdscr
> 
> And by linking to libncurses.dll.a (the default), the linker will find
> __imp__stdscr.
> 
> However, it appears that you are including a *different* 
> ncurses.h from
> somewhere, because your curses.o is not seeing the 
> __declspec(dllimport)
> decoration.  Do you have an old ncurses installed in '/usr/local' ?
> 
> If so (and if it's the old cygutils version) remove it using
> http://cygutils.netpedia.net/V1.1/usr-local/Obsolete.html  -- but READ
> the directions first: you only want to remove 
> /usr/local/---ncurses, not
> /usr/local/---everything. (If you have other programs that have been
> compile using the /usr/local/---ncurses, you'll need to set
> TERMINFO=/usr/share/terminfo to prevent them from looking in
> /usr/local/share/terminfo for their terminfo database).
> 
>  --Chuck
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curses problem trying to build ruby
  2000-12-13 13:39 curses problem trying to build ruby John Wiersba
@ 2000-12-13 13:46 ` Charles Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Wilson @ 2000-12-13 13:46 UTC (permalink / raw)
  To: John Wiersba; +Cc: 'cygwin'

John Wiersba wrote:
> 
> Charles,
> 
> Perfect!  That was the problem.  I solved it by reinstalling everything from
> scratch.  The make of ruby is going much better.  Thanks for your help!!

Glad it's working. (more or less)

> I'm having a problem further on now.  I've sent email to the author, but I
> thought I'd ask you on the off chance that you've actually built ruby.
> 
>    make[1]: Leaving directory `/jrw/ftp/ruby/junk/ruby-1.6.1/ext/Win32API'
>    make[1]: Entering directory `/jrw/ftp/ruby/junk/ruby-1.6.1'
>    windres --include-dir . --include-dir . --include-dir ./win32 ruby.rc
>       ruby.res.o
> 
>    gcc -g -O2   main.o ruby.exp ruby.res.o librubys.a -lcrypt   -o ruby.exe
>    gcc: ruby.exp: No such file or directory
>    make[1]: *** [ruby.exe] Error 1
>    make[1]: Leaving directory `/jrw/ftp/ruby/junk/ruby-1.6.1'
> 
> There's no ruby.exp (and I couldn't see how one is supposed to be made -- I
> tried "make ruby.exp").

No, I haven't built ruby.  But my guess is that "ruby.exp" is an exports
(or basefile) list that is supposed to be generated when 'make ruby'
builds the core Ruby.dll.  Check the 'dllwrap' command in your makefile.

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curses problem trying to build ruby
       [not found] <03F4742D8225D21191EF00805FE62B9904B3F681@aa-msg-01.medstat.com>
@ 2000-12-13  9:39 ` Charles Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Wilson @ 2000-12-13  9:39 UTC (permalink / raw)
  To: John Wiersba; +Cc: cygwin

John Wiersba wrote:
> 
> Charles,
> 
> I simplified the problem a little, to get rid of dllwrap:
> 
>    $ cd ruby-1.6.1/ext/curses
>    $ gcc curses.o -L../.. -lcygwin-ruby16 -lncurses
>    curses.o: In function `free_window':
>    /.../ruby-1.6.1/ext/curses/curses.c:65: undefined reference to `stdscr'
>    ...
> 
> It looks like stdscr is not defined in libncurses.  But,
> 
>    $ cd /usr/lib
>    $ ls -l *cur*
>    lrw-r--r-- 1 jrw JRW     23 Dec 12 18:36 libcurses.a -> libncurses.a
>    lrw-r--r-- 1 jrw JRW     27 Dec 12 18:36 libcurses.dll.a ->
> libncurses.dll.a
>    -rw-r--r-- 1 jrw JRW 277240 Nov 25 00:44 libncurses++.a
>    -rw-r--r-- 1 jrw JRW 392186 Nov 25 00:08 libncurses.a
>    -rw-r--r-- 1 jrw JRW 263752 Nov 25 00:44 libncurses.dll.a
>    -rw-r--r-- 1 jrw JRW   4820 Nov 11 01:32 libsecur32.a
>    $ nm libncurses.a | grep stdscr
>             U _stdscr
>    ...
>             U _stdscr
>    00000000 D _stdscr
>             U _stdscr
> 
> seems to show that it is.

But you're not linking to libncurses.a.  You are linking to
libncurses.dll.a, the dll import lib.  To avoid this, you have to
specify -static.  But that's not the real puzzler.  

/usr/include/ncurses.h defines stdscr thus:
   extern NCURSES_EXPORT_VAR(WINDOW *)   stdscr;
which expands to 
   extern __declspec(dllimport) WINDOW * stdscr;

Short version: curses.o should have the following undefined symbol
              U _imp__stdscr
not
              U _stdscr

And by linking to libncurses.dll.a (the default), the linker will find
__imp__stdscr.

However, it appears that you are including a *different* ncurses.h from
somewhere, because your curses.o is not seeing the __declspec(dllimport)
decoration.  Do you have an old ncurses installed in '/usr/local' ?

If so (and if it's the old cygutils version) remove it using
http://cygutils.netpedia.net/V1.1/usr-local/Obsolete.html  -- but READ
the directions first: you only want to remove /usr/local/---ncurses, not
/usr/local/---everything. (If you have other programs that have been
compile using the /usr/local/---ncurses, you'll need to set
TERMINFO=/usr/share/terminfo to prevent them from looking in
/usr/local/share/terminfo for their terminfo database).

 --Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curses problem trying to build ruby
  2000-12-12 16:54 John Wiersba
@ 2000-12-12 23:42 ` Charles Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Wilson @ 2000-12-12 23:42 UTC (permalink / raw)
  To: John Wiersba; +Cc: 'cygwin'

John Wiersba wrote:
> 
> Hi!  I'm trying to build ruby out of the box and I get this series of errors
> (see below) related to curses.  The configure step *does* recognize that I'm
> running cygwin.  I'm up-to-date on my cygwin setup, running on WinNT4.
> Anyone recognize these symptoms?

Yeah -- looks like a bug in the makefile.  Since ruby is trying to build
an extension dll that provides the ncurses-ruby interface, that dll must
be fully resolved (no unresolved external references).  This file,
ruby/ext/curses/curses.c, clearly depends on ncurses -- but the dllwrap
command doesn't include a link reference to libncurses.  Try adding
'-lncurses' to the dllwrap command line.

> dllwrap --target=cygwin --as=as --dlltool-name=dlltool --driver-name=gcc
> --expor
> t-all -s --def=curses.def -L/jrw/ftp/ruby/junk/ruby-1.6.1  -o curses.so
> curses.o
>  -L. -lcygwin-ruby16 -lncurses
> curses.o: In function `free_window':
> /jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:65: undefined reference to
> `stdscr'

[snip]

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* curses problem trying to build ruby
@ 2000-12-12 16:54 John Wiersba
  2000-12-12 23:42 ` Charles Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiersba @ 2000-12-12 16:54 UTC (permalink / raw)
  To: 'cygwin'

Hi!  I'm trying to build ruby out of the box and I get this series of errors
(see below) related to curses.  The configure step *does* recognize that I'm
running cygwin.  I'm up-to-date on my cygwin setup, running on WinNT4.
Anyone recognize these symptoms?

Thanks,
John Wiersba

compiling curses
make[1]: Entering directory `/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses'
gcc -DUSEIMPORTLIB -g -O2  -I/jrw/ftp/ruby/junk/ruby-1.6.1
-I/jrw/ftp/ruby/junk/ ruby-1.6.1 -I/usr/local/include -DHAVE_NCURSES_H
-DHAVE_ISENDWIN -DHAVE_UNGETCH
-DHAVE_BEEP -DHAVE_DOUPDATE -DHAVE_FLASH -DHAVE_DELETELN -DHAVE_WDELETELN
-c cu
rses.c
dllwrap --target=cygwin --as=as --dlltool-name=dlltool --driver-name=gcc
--expor
t-all -s --def=curses.def -L/jrw/ftp/ruby/junk/ruby-1.6.1  -o curses.so
curses.o
 -L. -lcygwin-ruby16 -lncurses
curses.o: In function `free_window':
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:65: undefined reference to
`st
dscr'
curses.o: In function `curses_init_screen':
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:95: undefined reference to
`st
dscr'
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:99: undefined reference to
`st
dscr'
curses.o: In function `curses_finalize':
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:125: undefined reference
to `s
tdscr'
curses.o: In function `curses_clear':
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:152: undefined reference
to `s
tdscr'
curses.o:/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:161: more
undefined r
eferences to `stdscr' follow
curses.o: In function `curses_lines':
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:399: undefined reference
to `L
INES'
curses.o: In function `curses_cols':
/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses/curses.c:405: undefined reference
to `C
OLS'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make[1]: *** [curses.so] Error 1
make[1]: Leaving directory `/jrw/ftp/ruby/junk/ruby-1.6.1/ext/curses'


cygcheck -s:

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Dec 12 19:51:08 2000

WinNT Ver 4.0 build 1381 Service Pack 6

Path:	/usr/bin
	/usr/local/bin
	/jrw/jrw/mdst/sh
	/jrw/binu
	/jrw/binw
	/opt/java/jdk/bin
	/opt/java/jre/1.2/bin
	.

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `/bin'
CYGWIN = `  notitle tty nostrip_title binmode glob'
USER = `jrw'
MAKE_MODE = `unix'
HOME = `/jrw'

Use `-r' to scan registry

a:  fd  FAT        1Mb  60% CP    UN           
c:  hd  FAT     2044Mb  55% CP    UN           WINDOWS NT
d:  hd  NTFS   17046Mb  22% CP CS UN PA FC     Data
e:  cd           N/A    N/A                    
f:  net NWFS     900Mb  56% CP          FC     SYS
h:  net NWFS   29281Mb  58% CP          FC     MEDSTAT
j:  net NTFS   22001Mb  76% CP CS UN PA FC     
m:  net NWFS   29281Mb  58% CP          FC     MEDSTAT
n:  net NWFS   39065Mb  84% CP          FC     MEDSTATN
o:  net NWFS   208364Mb  14% CP          FC     MEDSTAT
r:  net NTFS    2055Mb  10% CP CS UN PA FC     
s:  net NWFS   208364Mb  15% CP          FC     MEDSTATS
t:  net NWFS   39065Mb  84% CP          FC     MEDSTATN
x:  net NWFS     900Mb  56% CP          FC     SYS
y:  net NWFS     900Mb  56% CP          FC     SYS

d:\cygwin\bin  /usr/bin  system  binmode
d:\cygwin\lib  /usr/lib  system  binmode
d:\cygwin  /        system  binmode
a:    /a/a     user    binmode

Found: .\bash.exe
Found: d:\cygwin\bin\bash.exe
Found: .\cat.exe
Found: d:\cygwin\bin\cat.exe
Found: .\cpp.exe
Found: d:\cygwin\bin\cpp.exe
Found: .\find.exe
Found: d:\cygwin\bin\find.exe
Found: .\gcc.exe
Found: d:\cygwin\bin\gcc.exe
Found: .\gdb.exe
Found: d:\cygwin\bin\gdb.exe
Found: .\ld.exe
Found: d:\cygwin\bin\ld.exe
Found: .\ls.exe
Found: d:\cygwin\bin\ls.exe
Found: .\make.exe
Found: d:\cygwin\bin\make.exe
Found: .\sh.exe
Found: d:\cygwin\bin\sh.exe

   56k 2000/12/03 .\cygbz21.0.dll
   83k 2000/11/25 .\cygform5.dll
   18k 2000/10/23 .\cyggdbm.dll
   17k 2000/11/30 .\cyghistory4.dll
   14k 2000/10/23 .\cygintl.dll
   81k 2000/12/05 .\cygitcl30.dll
   35k 2000/12/05 .\cygitk30.dll
   45k 2000/10/22 .\cygjbig1.dll
  119k 2000/10/23 .\cygjpeg6b.dll
   53k 2000/11/25 .\cygmenu5.dll
  300k 2000/11/25 .\cygncurses5.dll
   35k 2000/11/25 .\cygpanel5.dll
  162k 2000/10/23 .\cygpng2.dll
  108k 2000/11/30 .\cygreadline4.dll
  390k 2000/12/05 .\cygtcl80.dll
    5k 2000/12/05 .\cygtclpip80.dll
   10k 2000/12/05 .\cygtclreg80.dll
  243k 2000/10/23 .\cygtiff3.dll
  623k 2000/12/05 .\cygtk80.dll
   41k 2000/11/20 .\cygXpm-noX4.dll
   45k 2000/11/20 .\cygXpm-X4.dll
   49k 2000/10/23 .\cygz.dll
  609k 2000/11/22 .\cygwin1.dll
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 6
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 30
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Tue Nov 21 21:00:16 EST 2000
        shared id: cygwin1S3

   56k 2000/12/03 .\cygbz21.0.dll
   83k 2000/11/25 .\cygform5.dll
   18k 2000/10/23 .\cyggdbm.dll
   17k 2000/11/30 .\cyghistory4.dll
   14k 2000/10/23 .\cygintl.dll
   81k 2000/12/05 .\cygitcl30.dll
   35k 2000/12/05 .\cygitk30.dll
   45k 2000/10/22 .\cygjbig1.dll
  119k 2000/10/23 .\cygjpeg6b.dll
   53k 2000/11/25 .\cygmenu5.dll
  300k 2000/11/25 .\cygncurses5.dll
   35k 2000/11/25 .\cygpanel5.dll
  162k 2000/10/23 .\cygpng2.dll
  108k 2000/11/30 .\cygreadline4.dll
  390k 2000/12/05 .\cygtcl80.dll
    5k 2000/12/05 .\cygtclpip80.dll
   10k 2000/12/05 .\cygtclreg80.dll
  243k 2000/10/23 .\cygtiff3.dll
  623k 2000/12/05 .\cygtk80.dll
   41k 2000/11/20 .\cygXpm-noX4.dll
   45k 2000/11/20 .\cygXpm-X4.dll
   49k 2000/10/23 .\cygz.dll
  609k 2000/11/22 .\cygwin1.dll
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 6
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 30
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Tue Nov 21 21:00:16 EST 2000
        shared id: cygwin1S3

   56k 2000/12/03 d:\cygwin\bin\cygbz21.0.dll
   83k 2000/11/25 d:\cygwin\bin\cygform5.dll
   18k 2000/10/23 d:\cygwin\bin\cyggdbm.dll
   17k 2000/11/30 d:\cygwin\bin\cyghistory4.dll
   14k 2000/10/23 d:\cygwin\bin\cygintl.dll
   81k 2000/12/05 d:\cygwin\bin\cygitcl30.dll
   35k 2000/12/05 d:\cygwin\bin\cygitk30.dll
   45k 2000/10/22 d:\cygwin\bin\cygjbig1.dll
  119k 2000/10/23 d:\cygwin\bin\cygjpeg6b.dll
   53k 2000/11/25 d:\cygwin\bin\cygmenu5.dll
  300k 2000/11/25 d:\cygwin\bin\cygncurses5.dll
   35k 2000/11/25 d:\cygwin\bin\cygpanel5.dll
  162k 2000/10/23 d:\cygwin\bin\cygpng2.dll
  108k 2000/11/30 d:\cygwin\bin\cygreadline4.dll
  390k 2000/12/05 d:\cygwin\bin\cygtcl80.dll
    5k 2000/12/05 d:\cygwin\bin\cygtclpip80.dll
   10k 2000/12/05 d:\cygwin\bin\cygtclreg80.dll
  243k 2000/10/23 d:\cygwin\bin\cygtiff3.dll
  623k 2000/12/05 d:\cygwin\bin\cygtk80.dll
   41k 2000/11/20 d:\cygwin\bin\cygXpm-noX4.dll
   45k 2000/11/20 d:\cygwin\bin\cygXpm-X4.dll
   49k 2000/10/23 d:\cygwin\bin\cygz.dll
  609k 2000/11/22 d:\cygwin\bin\cygwin1.dll
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 6
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 30
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Tue Nov 21 21:00:16 EST 2000
        shared id: cygwin1S3

Use -h to see help about each section

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-12-13 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-13 13:39 curses problem trying to build ruby John Wiersba
2000-12-13 13:46 ` Charles Wilson
     [not found] <03F4742D8225D21191EF00805FE62B9904B3F681@aa-msg-01.medstat.com>
2000-12-13  9:39 ` Charles Wilson
  -- strict thread matches above, loose matches on Subject: below --
2000-12-12 16:54 John Wiersba
2000-12-12 23:42 ` Charles Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).