public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Can't compile Screen: Undefined reference to __imp__ospeed
@ 2009-01-26  9:57 Justin L.
  2009-01-26 22:33 ` Andrew Schulman
  0 siblings, 1 reply; 13+ messages in thread
From: Justin L. @ 2009-01-26  9:57 UTC (permalink / raw)
  To: cygwin

Hi, all.

I'm trying to compile GNU Screen under Cygwin.  Right now, I'm failing to
compile an unmodified package, but my goal is to compile with 256 color support.

I downloaded the package via the Cygwin installer and ran

  cygport screen-4.0.3-1.cygport almostall

At compile, I get the following error:

display.o:display.c:(.text+0x76d): undefined reference to `__imp__ospeed'
display.o:display.c:(.text+0xa68): undefined reference to `__imp__ospeed'
display.o:display.c:(.text+0xb36): undefined reference to `__imp__ospeed'

It's not clear to me if these errors are from compiling display.c or from
linking display.o.  They come after the command to link, but they look more like
compile errors than link errors to me.  In any case, searching for
"__imp__ospeed" doesn't turn up anything enlightening to me.

I'm inclined to believe that I'm missing some library, but I'm not sure which
that would be.  Cygwin setup tells me I have termcap (20050421-1), crypt
(1.1-1), binutils (20080624-2), and coreutils (6.10-2).  I'm running GCC 3.4.4
and cygport 0.4.3.

Does anyone know what might be going on here?  I'd love to get this thing
working, if I can.

-Justin


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-26  9:57 Can't compile Screen: Undefined reference to __imp__ospeed Justin L.
@ 2009-01-26 22:33 ` Andrew Schulman
  2009-01-27  3:19   ` Justin L.
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Schulman @ 2009-01-26 22:33 UTC (permalink / raw)
  To: cygwin

Hi Justin.

> I'm trying to compile GNU Screen under Cygwin.  Right now, I'm failing to
> compile an unmodified package, but my goal is to compile with 256 color support.

Hm, I hadn't looked at that option before.  If it compiles cleanly and is of
interest then I can certainly package a new release with it.

> display.o:display.c:(.text+0x76d): undefined reference to `__imp__ospeed'

I don't have this problem when I compile screen.  ospeed is defined in
termcap.h, which comes in termcap and libncurses-devel.  I'm guessing that you
need libncurses-devel.

Let us know if that works and if the 256-color support works.
Andrew.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-26 22:33 ` Andrew Schulman
@ 2009-01-27  3:19   ` Justin L.
  2009-01-28  2:08     ` Andrew Schulman
  0 siblings, 1 reply; 13+ messages in thread
From: Justin L. @ 2009-01-27  3:19 UTC (permalink / raw)
  To: cygwin

>  I'm guessing that you need libncurses-devel.

Yep.  That's what I was missing.

> If it compiles cleanly and is of
> interest then I can certainly package a new release with it.

Unfortunately, I can't get it to compile cleanly when I add --enable-colors256
to the cygconf line.  The output from the install step is below.

Maybe this is why Cygwin doesn't have 256-color Screen by default.  :)

-Justin

>>> Installing screen-4.0.3-1
/usr/src/screen-4.0.3-1/src/screen-4.0.3/etc/mkinstalldirs
/usr/src/screen-4.0.3-1/inst/usr/bin /usr/src/screen-4.0.3-1/inst`sed < config.h
-n -e '/define SCREENENCODINGS/s/^.*"\([^"]*\)"/\1/p'`
/usr/bin/install -c screen /usr/src/screen-4.0.3-1/inst/usr/bin/screen
/usr/bin/install: cannot create regular file
`/usr/src/screen-4.0.3-1/inst/usr/bin/screen.exe': No such file or directory
make: *** [install_bin] Error 1
make: *** Waiting for unfinished jobs....
mkdir /usr/src/screen-4.0.3-1/inst/usr/bin
mkdir /usr/src/screen-4.0.3-1/inst/usr/share/screen
mkdir /usr/src/screen-4.0.3-1/inst/usr/share/screen/utf8encodings
cd doc ; make installdirs
make[1]: Entering directory `/usr/src/screen-4.0.3-1/build/doc'
/usr/src/screen-4.0.3-1/src/screen-4.0.3/doc/../etc/mkinstalldirs
/usr/src/screen-4.0.3-1/inst/usr/share/man/man1
/usr/src/screen-4.0.3-1/inst/usr/share/info
mkdir /usr/src/screen-4.0.3-1/inst/usr/share/man
mkdir /usr/src/screen-4.0.3-1/inst/usr/share/man/man1
mkdir /usr/src/screen-4.0.3-1/inst/usr/share/info
make[1]: Leaving directory `/usr/src/screen-4.0.3-1/build/doc'
*** ERROR: make install DESTDIR failed
>>> Packaging screen-4.0.3-1


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-27  3:19   ` Justin L.
@ 2009-01-28  2:08     ` Andrew Schulman
  2009-01-28 10:19       ` Justin L.
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Schulman @ 2009-01-28  2:08 UTC (permalink / raw)
  To: cygwin

> >>> Installing screen-4.0.3-1
> /usr/src/screen-4.0.3-1/src/screen-4.0.3/etc/mkinstalldirs
> /usr/src/screen-4.0.3-1/inst/usr/bin /usr/src/screen-4.0.3-1/inst`sed < config.h
> -n -e '/define SCREENENCODINGS/s/^.*"\([^"]*\)"/\1/p'`
> /usr/bin/install -c screen /usr/src/screen-4.0.3-1/inst/usr/bin/screen
> /usr/bin/install: cannot create regular file
> `/usr/src/screen-4.0.3-1/inst/usr/bin/screen.exe': No such file or directory

I'm not sure why this step fails.  It seems that either screen.exe or its
installation directory, /usr/src/screen-4.0.3-1/inst/usr/bin, haven't been
created as they should have been.

I just ran this without any trouble, with --enable-colors256.  However, I'm not
quite sure how to test that option.  Can you please give my packages a try?  If
they work for you, and especially the 256-color support, let me know and I'll
release them to the repository.

# for Cygwin 1.5:
 http://home.comcast.net/~andrex2/cygwin-1.5/screen/screen-4.0.3-3.tar.bz2
 http://home.comcast.net/~andrex2/cygwin-1.5/screen/screen-4.0.3-3-src.tar.bz2

# for Cygwin 1.7:
 http://home.comcast.net/~andrex2/cygwin-1.7/screen/screen-4.0.3-4.tar.bz2
 http://home.comcast.net/~andrex2/cygwin-1.7/screen/screen-4.0.3-4-src.tar.bz2

Once you've downloaded the binary package, kill all of your screen sessions, run
e.g.

  tar -C/ -xf screen-4.0.3-3.tar.bz2

and then restart screen as usual to test.

It would also be helpful if you would give a brief description for the release
announcement, of what that option does and how to use it.

Andrew.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-28  2:08     ` Andrew Schulman
@ 2009-01-28 10:19       ` Justin L.
  2009-01-29 17:07         ` Andrew Schulman
  0 siblings, 1 reply; 13+ messages in thread
From: Justin L. @ 2009-01-28 10:19 UTC (permalink / raw)
  To: cygwin

Thanks for looking at this, Andrew.

I might have messed something up, but after extracting your build, I still don't
get 256 colors within a Screen terminal.   

I'm using a Perl script, available at
http://www.frexx.de/xterm-256-notes/data/256colors2.pl, to test whether my
terminal is giving me 256 colors.  It works when I run it from a vanilla bash
prompt, but not from within Screen, even after I installed your build.

Just to prove to myself that I actually did extract your (Cygwin 1.5) screen.exe
properly, I checked the hash:

   e240a3ddc95d6ccaf08cfaa00fe3ab02 */usr/bin/screen.exe

whereas the screen.exe I got online has the following hash:

   005bde6eb8eca29f1fdf73efbd5a83a5 */screen.exe

So...they are different.  Maybe something *else* is wrong with my configuration.

Thanks again for your help, Andrew.

-Justin


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-28 10:19       ` Justin L.
@ 2009-01-29 17:07         ` Andrew Schulman
  2009-01-29 20:28           ` Justin L.
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Schulman @ 2009-01-29 17:07 UTC (permalink / raw)
  To: cygwin

> I'm using a Perl script, available at
> http://www.frexx.de/xterm-256-notes/data/256colors2.pl, to test whether my
> terminal is giving me 256 colors.

Thanks, this is helpful.

>  It works when I run it from a vanilla bash
> prompt, but not from within Screen, even after I installed your build.

OK.  Same here.  I get a variety of different results with different
combinations of Cygwin version (1.5, 1.7), terminal type (DOS, xterm) and
with/without screen.  Without modification, the only combination that gives 256
colors for me is Cygwin 1.5, xterm, without screen.  All others give 8 colors,
and the colormap is garbled in the DOS terminals (big surprise).

However, in /usr/share/terminfo/s, there is a variety of screen* files,
including several named screen-256color*.  So it turns out that for me, running

TERM=screen-256color screen

gives 256 colors, at least in Cygwin 1.5.  Can you confirm this?

In Cygwin 1.7, I still only get 8 colors.  I'll report that separately as a bug.

Andrew.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-29 17:07         ` Andrew Schulman
@ 2009-01-29 20:28           ` Justin L.
  2009-01-29 22:54             ` Andrew Schulman
  0 siblings, 1 reply; 13+ messages in thread
From: Justin L. @ 2009-01-29 20:28 UTC (permalink / raw)
  To: cygwin

Andrew Schulman <schulman.andrew@...> writes:

> TERM=screen-256color screen
> 
> gives 256 colors, at least in Cygwin 1.5.  Can you confirm this?

Yes.  Beautiful, Andrew.

You said you needed text for the release announcement.  I'm not sure what it's
supposed to look like, but you can use this, if it works: 

screen-256color: GNU Screen compiled with the --enable-colors256 flag; without
this flag, terminals launched from within Screen can only show 16 colors. 
Depending on your terminal, you may need to launch Screen as
'TERM=screen-256color screen' in order for 256 colors to work.

Thanks again, Andrew.

-Justin


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-29 20:28           ` Justin L.
@ 2009-01-29 22:54             ` Andrew Schulman
  2009-01-30  9:34               ` Justin L.
  2009-02-19 16:09               ` Presto Ten
  0 siblings, 2 replies; 13+ messages in thread
From: Andrew Schulman @ 2009-01-29 22:54 UTC (permalink / raw)
  To: cygwin

> screen-256color: GNU Screen compiled with the --enable-colors256 flag; without
> this flag, terminals launched from within Screen can only show 16 colors. 
> Depending on your terminal, you may need to launch Screen as
> 'TERM=screen-256color screen' in order for 256 colors to work.

OK, thanks.  I'll put a new release out soon with 256 colors enabled, at least
for Cygwin 1.5.

I'm curious:  where do you use this?  I've been using 8 or 16 colors I guess,
for all of this time and never noticed it.  I don't colorize my ls output, for
example, as I know many people do.  If there's a common application for this, it
would help to point it out to users.

A.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-29 22:54             ` Andrew Schulman
@ 2009-01-30  9:34               ` Justin L.
  2009-01-30 13:02                 ` Andrew Schulman
  2009-02-19 16:09               ` Presto Ten
  1 sibling, 1 reply; 13+ messages in thread
From: Justin L. @ 2009-01-30  9:34 UTC (permalink / raw)
  To: cygwin

Andrew Schulman <schulman.andrew@...> writes:

> I'm curious:  where do you use this?

Well, I'll admit to some degree that it's yak shaving
(http://projects.csail.mit.edu/gsb/old-archive/gsb-archive/gsb2000-02-11.html),
but the use case for me is running Screen locally and having multiple terminals
open remotely, with a few terminals running Vim on various machines.  The yellow
color vim uses when running on 16 colors is kind of hard to read, especially on
a white background (which I use).  There are some good 256-color themes out
there (desert256, inkpot), and I wanted to use them.

-Justin


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-30  9:34               ` Justin L.
@ 2009-01-30 13:02                 ` Andrew Schulman
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Schulman @ 2009-01-30 13:02 UTC (permalink / raw)
  To: cygwin

> The yellow
> color vim uses when running on 16 colors is kind of hard to read, especially on
> a white background (which I use).  There are some good 256-color themes out
> there (desert256, inkpot), and I wanted to use them.

Good enough, thanks.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-01-29 22:54             ` Andrew Schulman
  2009-01-30  9:34               ` Justin L.
@ 2009-02-19 16:09               ` Presto Ten
  2009-02-19 16:27                 ` Andrew Schulman
  1 sibling, 1 reply; 13+ messages in thread
From: Presto Ten @ 2009-02-19 16:09 UTC (permalink / raw)
  To: cygwin



Andrew Schulman-3 wrote:
> 
>> screen-256color: GNU Screen compiled with the --enable-colors256 flag;
>> without
>> this flag, terminals launched from within Screen can only show 16 colors. 
>> Depending on your terminal, you may need to launch Screen as
>> 'TERM=screen-256color screen' in order for 256 colors to work.
> 
> OK, thanks.  I'll put a new release out soon with 256 colors enabled, at
> least
> for Cygwin 1.5.
> 
> I'm curious:  where do you use this?  I've been using 8 or 16 colors I
> guess,
> for all of this time and never noticed it.  I don't colorize my ls output,
> for
> example, as I know many people do.  If there's a common application for
> this, it
> would help to point it out to users.
> 

Great that this will be included in an official Cygwin screen package! The
256 colors mode is invaluable for people using Emacs in terminal mode: Emacs
supports 256 colors, and code becomes a lot easier on the eye.

By the way, I downloaded
http://home.comcast.net/~andrex2/cygwin-1.5/screen/screen-4.0.3-3.tar.bz2
and tried it on Cygwin 1.5 with PuTTY (256 colors enabled): started screen
plus Emacs, and it shows all 256 colors with M-x list-colors-display!
Beautiful.

Note that for Emacs to recognize screen-256color, you need to add the
following into "term/screen-256color.el" in the load path (for Emacs 22):

(defun terminal-init-screen ()
  "Terminal initialization function for screen."
  ;; Use the xterm color initialization code.
  (load "term/xterm")
  (xterm-register-default-colors)
  (tty-set-up-initial-frame-faces))

-p
-- 
View this message in context: http://www.nabble.com/Can%27t-compile-Screen%3A-Undefined-reference-to-__imp__ospeed-tp21660755p22103799.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-02-19 16:09               ` Presto Ten
@ 2009-02-19 16:27                 ` Andrew Schulman
  2009-02-19 17:55                   ` Matt Wozniski
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Schulman @ 2009-02-19 16:27 UTC (permalink / raw)
  To: cygwin

> Note that for Emacs to recognize screen-256color, you need to add the
> following into "term/screen-256color.el" in the load path (for Emacs 22):
> 
> (defun terminal-init-screen ()
>   "Terminal initialization function for screen."
>   ;; Use the xterm color initialization code.
>   (load "term/xterm")
>   (xterm-register-default-colors)
>   (tty-set-up-initial-frame-faces))

Thanks, this is good to know.  I'll include it in the screen.README.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: Can't compile Screen: Undefined reference to __imp__ospeed
  2009-02-19 16:27                 ` Andrew Schulman
@ 2009-02-19 17:55                   ` Matt Wozniski
  0 siblings, 0 replies; 13+ messages in thread
From: Matt Wozniski @ 2009-02-19 17:55 UTC (permalink / raw)
  To: cygwin

On 2/19/09, Andrew Schulman wrote:
> > Note that for Emacs to recognize screen-256color, you need to add the
>  > following into "term/screen-256color.el" in the load path (for Emacs 22):
>  >
>  > (defun terminal-init-screen ()
>  >   "Terminal initialization function for screen."
>  >   ;; Use the xterm color initialization code.
>  >   (load "term/xterm")
>  >   (xterm-register-default-colors)
>  >   (tty-set-up-initial-frame-faces))
>
>
> Thanks, this is good to know.  I'll include it in the screen.README.

Having xterm set TERM=xterm-256color and screen set
TERM=screen-256color makes vim's high color support work fine with no
extra configuration required.

~Matt

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2009-02-19 17:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-26  9:57 Can't compile Screen: Undefined reference to __imp__ospeed Justin L.
2009-01-26 22:33 ` Andrew Schulman
2009-01-27  3:19   ` Justin L.
2009-01-28  2:08     ` Andrew Schulman
2009-01-28 10:19       ` Justin L.
2009-01-29 17:07         ` Andrew Schulman
2009-01-29 20:28           ` Justin L.
2009-01-29 22:54             ` Andrew Schulman
2009-01-30  9:34               ` Justin L.
2009-01-30 13:02                 ` Andrew Schulman
2009-02-19 16:09               ` Presto Ten
2009-02-19 16:27                 ` Andrew Schulman
2009-02-19 17:55                   ` Matt Wozniski

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).