delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/04/07/09:53:24

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=BGP
oSetxebN07cSLz4WJfVOiMzN+k6MMWh2qYUBMqdxbrFTtA9VjiIP7tI93NW1KLiW
y7RfA0pQchof3Jgu7zuPmamlrqT1tqSprJ0LauXt+MJCul1NE+JnlpFLK2VkiFVM
i0r7T5GzW3ShGBkGsA3XG1fKfgpIwMWLEM6aBHgE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=d/sMH2JXD
v1LrsxHsq6p7n9bHyM=; b=BFuesK2+1M6VkLAcLDCNgN7qbdpoMxo+zHtLHjWfY
yz6HtXdvyFMYJFMRh1pIeQQ3vazti3RefJ3KdKeD+UTTUHRxiDx3krJw3CfAYdaR
q6/u6jqRkOrd5QOggqRbEQbDLHBleNzwx3QCb/7pxgciWra+/K02DeIu4tj+RcBl
yo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,TW_LN,UNPARSEABLE_RELAY autolearn=ham version=3.3.1
Message-ID: <51617A39.9000901@schueler.homeip.net>
Date: Sun, 07 Apr 2013 15:52:57 +0200
From: =?ISO-8859-15?Q?=22D=2E_Sch=FCler=22?= <admin AT schueler DOT homeip DOT net>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.3
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: perl 5.14 ncursesw: calling getbegyx() crashes

Hello Mailinglist!

i'm using cygwin together with perl 5.14 and the Curses::UI perl module.
It uses the ncursesw library bundled with cygwin.

Installing the Curses::UI worked well using cpan, but using the ncurses
functions like getyx() from the demo-script bundled with the curses
module crahes perl with the error-message:
Curses function 'getyx' is not defined in your Curses library at demo
line 59.

Looking into /usr/include/ncursesw/cursesw.h shows that this macro is
defined.

Even building the Curses module for perl by hand, reveals that there is
something wrong with the ncurses library:

~/Curses-1.28 $  export CURSES_LDFLAGS="-L/usr/lib/ncurses -lncurses"
~/Curses-1.28 $  export CURSES_CFLAGS="-I/usr/include/ncurses"
~/Curses-1.28 $ perl Makefile.PL
GEN    function:  not applicable
PANELS functions: not enabled
MENUS  functions: not enabled
FORMS  functions: not enabled

Writing Makefile for Curses
Writing MYMETA.yml

~/Curses-1.28 $ perl test.syms -v PANELS MENUS FORMS
Checking capabilities of the Ncurses libraries.
Set CURSES_VERBOSE environment variable to see the details of the tests.

Doing test compiles with the compile command 'gcc-4 -DSYM="_C_SYM_"
-I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g
-fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o _C_FILE_
_C_FILE_.c  -L/usr/local/lib -L/usr/lib/ncurses -lncurses'
gcc-4 -DSYM="waddch(stdscr,0)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
(rc = 0)
function 'waddch' found
gcc-4 -DSYM="wechochar(stdscr,0)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
(rc = 0)
function 'wechochar' found

...

gcc-4 -DSYM="getyx(stdscr,LINES,LINES)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
testsym.c: In function <91>main<92>:
testsym.c:4:3: error: lvalue required as left operand of assignment
testsym.c:4:3: error: lvalue required as left operand of assignment
(rc = 256)
function 'getyx' NOT found
gcc-4 -DSYM="getparyx(stdscr,LINES,LINES)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
testsym.c: In function <91>main<92>:
testsym.c:4:3: error: lvalue required as left operand of assignment
testsym.c:4:3: error: lvalue required as left operand of assignment
(rc = 256)
function 'getparyx' NOT found
gcc-4 -DSYM="getbegyx(stdscr,LINES,LINES)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
testsym.c: In function <91>main<92>:
testsym.c:4:3: error: lvalue required as left operand of assignment
testsym.c:4:3: error: lvalue required as left operand of assignment
(rc = 256)
function 'getbegyx' NOT found
gcc-4 -DSYM="getmaxyx(stdscr,LINES,LINES)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
testsym.c: In function <91>main<92>:
testsym.c:4:3: error: lvalue required as left operand of assignment
testsym.c:4:3: error: lvalue required as left operand of assignment
(rc = 256)
function 'getmaxyx' NOT found

...

gcc-4 -DSYM="getsyx(LINES,LINES)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testsym testsym.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
testsym.c: In function <91>main<92>:
testsym.c:4:3: error: lvalue required as left operand of assignment
testsym.c:4:3: error: lvalue required as left operand of assignment
testsym.c:4:3: error: lvalue required as left operand of assignment
(rc = 256)
function 'getsyx' NOT found
gcc-4 -DSYM="getsyx(LINES,LINES)" -I/usr/include/ncurses
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe
-fstack-protector -DUSEIMPORTLIB -o testint testint.c  -L/usr/local/lib
-L/usr/lib/ncurses -lncurses
testint.c: In function <91>main<92>:
testint.c:6:9: error: expected expression before <91>do<92>
(rc = 256)

...


I tested this on two different OS (Win7 and XP) with the latest version
of cygwins libncursesw.

Is the macro missing in the library itself? What could i do to make it
working?

Kind regards,

David Schueler

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019