delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/01/07/01:17:56

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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=wO+xKU3OgQBK1mzd
Ge3WZZnJNnGRhDRnOl7nRBIDEOMB5XzFI6lWpmG/tF8Of8faq38Gns9LOy9NSAWh
hFRBdPj9UJto1ptfq2T4ms47WeErj+jrOXQY+oX11OpVgHfTMylOK4iauhVKrhww
RDPZpgdCfqB2YRxiJgWknTRTZLs=
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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=qYZ+Lq55bqQR26PkXZLPo6
kjdAE=; b=NL0VYltSfNVpY3Msir8Ng538xx+pQVYRWyvJTbjDDxBVmC7HDxgNTq
dF73B4MGWxvlYaZH6qscYkgppsAFqcLHuwhsLXlx2cmWLrD+N4zPm9cUfomhYG2w
pnyDN3mvTHXn0sglH3qAj/ncifYdvc+j+F50RM0tGxr9qSC9qtuwE=
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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-8.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=readers, sk:bonhard, bonharduklinuxnet, *d
X-HELO: smtp-out-no.shaw.ca
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: grap, anybody?
To: cygwin AT cygwin DOT com
References: <380-22020116213943452 AT M2W153 DOT mail2web DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Openpgp: preference=signencrypt
Message-ID: <4db6f5b2-6982-a75b-7a50-a760c37c9940@SystematicSw.ab.ca>
Date: Mon, 6 Jan 2020 23:18:04 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <380-22020116213943452@M2W153.mail2web.com>
X-IsSubscribed: yes

On 2020-01-06 14:39, bonhard AT uklinux DOT net wrote:
> I have a version of grap, being
> grap 1.42 compiled under CYGWIN_NT-6.1 1.5.25(0.156/4/2)
> compiled (guessing) more than a decade ago. It still works, which is a good
> thing, because if I try to compile the current version
> https://www.lunabase.org/~faber/Vault/software/grap/grap-1.45.tar.gz
> with the current Cygwin provision CYGWIN_NT-10.0-WOW 3.1.2(0.340/5/3) the
> process fails at make, after a successful ./configure.
> However, the executable I have does NOT work under the 64-bit version of
> Cygwin.
> Q1 Can anybody provide a fix to compile grap 1.45 for Cygwin32?
> Q2 Ditto Cygwin64 (or _any_ version of grap that works for Cygwin64)?
> Q3 Failing any hints or pointers for compilation (preferred) can anybody
> please provide a pointer to a grap executable that works for Cygwin64?

Using basic grap.cygport variable definitions, issues are:

$ cygport grap.cygport download all
...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
bison -y -d grap.yy && rm -f y.tab.c
bison: grap.yy: cannot open: No such file or directory
make: *** [Makefile:995: y.tab.h] Error 1
*** ERROR: make failed

fudged by:

$ cd grap-1.45-1.x86_64/build/
$ llgo grap.yy
lrwxrwxrwx 1 40 Jan 14  2019 grap.yy -> grap-1.45-1.x86_64/src/grap-1.45/grap.yy
$ ln -fs ../src/grap-1.45/grap.yy .
'./grap.yy' -> '../src/grap-1.45/grap.yy'
$ llgo grap.yy
lrwxrwxrwx 1 24 Jan  6 20:55 grap.yy -> ../src/grap-1.45/grap.yy
$ cd ../../

then:

$ cygport grap.cygport compile
...
make[1]: *** No rule to make target 'grap*.defines', needed by 'all-am'.  Stop.
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/grap_draw.Tpo .deps/grap_draw.Po
mv -f .deps/grap_parse.Tpo .deps/grap_parse.Po
mv -f .deps/grap_pic.Tpo .deps/grap_pic.Po
mv -f .deps/grap_tokenizer.Tpo .deps/grap_tokenizer.Po
make[1]: Leaving directory '.../grap-1.45-1.x86_64/build'
make: *** [Makefile:381: all] Error 2
*** ERROR: make failed

because:

$ cd grap-1.45-1.x86_64/src/grap-1.45/
$ fgrep 'dist_defines_DATA = ' Makefile.{am,in}
Makefile.am:dist_defines_DATA = grap*.defines
Makefile.in:dist_defines_DATA = grap*.defines

fudged by:

$ cd grap-1.45-1.x86_64/build/
$ ln -s ../src/grap-1.45/*.defines .
'./grap.defines' -> '../src/grap-1.45/grap.defines'
'./grap.tex.defines' -> '../src/grap-1.45/grap.tex.defines'

retry:

$ cygport grap.cygport compile
...
make[1]: *** No rule to make target 'examples/*.d', needed by 'all-am'.  Stop.
make[1]: *** Waiting for unfinished jobs....
.../grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll: In function ‘int yylex()’:
.../grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll:201:52: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]
                            for ( unsigned i = 0; i < yyleng; i++ )
                                                  ~~^~~~~~~~
grap.yy: In function ‘int yyparse()’:
grap.yy:582:12: error: ‘strptime’ was not declared in this scope
        if (strptime($5->c_str(), $3->c_str(), &tm) != 0) {
            ^~~~~~~~
grap.yy:582:12: note: suggested alternative: ‘strftime’
        if (strptime($5->c_str(), $3->c_str(), &tm) != 0) {
            ^~~~~~~~
            strftime
.../grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll:725:12: error: ‘strdup’ was not
declared in this scope
  char *c = strdup(yytext);
            ^~~~~~
.../grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll:725:12: note: suggested
alternative: ‘strcmp’
  char *c = strdup(yytext);
            ^~~~~~
            strcmp
grap_lex.cc: In function ‘void yy_init_buffer(YY_BUFFER_STATE, FILE*)’:
grap_lex.cc:3723:48: error: ‘fileno’ was not declared in this scope

                                                ^
grap_lex.cc:3723:48: note: suggested alternative: ‘file’

                                                ^
                                                file
make[1]: *** [Makefile:497: grap.o] Error 1
make[1]: *** [Makefile:497: grap_lex.o] Error 1
make[1]: Leaving directory '.../grap-1.45-1.x86_64/build'
make: *** [Makefile:381: all] Error 2
*** ERROR: make failed

patched with:

--- grap-1.45-1.x86_64/origsrc/grap-1.45/grap.yy        2014-08-24
16:58:06.000000000 -0600
+++ grap-1.45-1.x86_64/src/grap-1.45/grap.yy    2020-01-06 22:38:47.338711700 -0700
@@ -10,6 +10,7 @@
 #include <iostream>
 #include <stack>
 #include <math.h>
+#include <time.h>
 #ifdef STDC_HEADERS
 #include <limits.h>
 #else

--- grap-1.45-1.x86_64/origsrc/grap-1.45/grap_lex.ll    2014-08-24
16:55:34.000000000 -0600
+++ grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll        2020-01-06
22:42:17.566551300 -0700
@@ -20,6 +20,8 @@ extern "C" {
 #include <sys/param.h>
 #include <set>
 #include <map>
+#include <stdio.h>
+#include <string.h>
 #include "grap.h"
 #include "grap_data.h"
 #include "grap_draw.h"

gives:

$ cygport grap.cygport compile
...
make[1]: *** No rule to make target 'examples/*.d', needed by 'all-am'.  Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '.../grap-1.45-1.x86_64/build'
make: *** [Makefile:381: all] Error 2
*** ERROR: make failed

bypass with:

$ cd grap-1.45-1.x86_64/build/
$ ln -s ../src/grap-1.45/examples .
'./examples' -> '../src/grap-1.45/examples'
$ cd ../../

result:

$ cygport grap.cygport compile
...
.../grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll:727:12: error: ‘strdup’ was not
declared in this scope
  char *c = strdup(yytext);
            ^~~~~~
.../grap-1.45-1.x86_64/src/grap-1.45/grap_lex.ll:727:12: note: suggested
alternative: ‘strcmp’
  char *c = strdup(yytext);
            ^~~~~~
            strcmp
grap_lex.cc: In function ‘void yy_init_buffer(YY_BUFFER_STATE, FILE*)’:
grap_lex.cc:3725:48: error: ‘fileno’ was not declared in this scope

                                                ^
grap_lex.cc:3725:48: note: suggested alternative: ‘file’

                                                ^
                                                file
make[1]: *** [Makefile:497: grap_lex.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/grap_parse.Tpo .deps/grap_parse.Po
mv -f .deps/grap_tokenizer.Tpo .deps/grap_tokenizer.Po
make[1]: Leaving directory '.../grap-1.45-1.x86_64/build'
make: *** [Makefile:381: all] Error 2
*** ERROR: make failed

and this now won't go away even after deleting the generated files and touching
the sources.

Anyone else have suggestions?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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