From: Csaba Raduly <rcsaba@gmail.com>
To: Keith Christian <keith1christian@gmail.com>
Cc: cygwin list <cygwin@cygwin.com>
Subject: Re: Compiling gnu diction on Cygwin
Date: Wed, 6 Apr 2022 14:04:50 +0200 [thread overview]
Message-ID: <CAEhDDbAZ04bPnsxbfehtU-2cxopp1kTpZ8J6Wfi2sfuHyjK7AQ@mail.gmail.com> (raw)
In-Reply-To: <CAFWoy7ESdsGMzn7cxcnG1TCy1tJq1CQ7v6hfcmt80-1RdkUMLQ@mail.gmail.com>
On Tue, 5 Apr 2022 at 15:27, Keith Christian wrote:
>
> Hi Cygwin fans,
>
> Version info:
> Windows 10:10.0.19043 N/A Build 19043
> Cygwin: CYGWIN_NT-10.0 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
>
> I successfully compiled diction and style from this tar file, but with errors:
> https://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz
>
> Diction and style both work, but I am looking for suggestions for how
> to clean up the compile errors in lines 48 - 60 below:
>
> 1 ./configure; make; make install
(snip)
Works just fine for me:
$ uname -a
CYGWIN_NT-10.0 AMDAHL 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
(configure ouptput elided)
(edit makefile to add missing -Wall -Wpedantic -Wextra)
$ make
gcc -c -I. -DSHAREDIR=\"/usr/local/share\"
-DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -pipe -Wall -Wpedantic
-Wextra -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith
-Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs
-Wundef -pedantic -fno-common ../diction.c
../getopt.h:59:14: warning: ‘optarg’ redeclared without dllimport
attribute: previous dllimport ignored [-Wattributes]
../diction.c:190:31: warning: array subscript has type ‘char’
[-Wchar-subscripts]
190 | if (s>sent && isalpha(*(s-1))) continue;
| ^~~~~~
gcc -c -I. -DSHAREDIR=\"/usr/local/share\"
-DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -pipe -Wall -Wpedantic
-Wextra -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith
-Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs
-Wundef -pedantic -fno-common ../getopt.c
../getopt.c:147:1: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
147 | extern char *getenv ();
| ^~~~~~
../getopt.c: In function ‘_getopt_internal_r’:
../getopt.c:444:23: warning: cast discards ‘const’ qualifier from
pointer target type [-Wcast-qual]
444 | exchange ((char **) argv, d);
| ^
../style.c:1191:18: warning: unknown conversion type character ‘(’ in
format [-Wformat=]
1191 | printf(_(" nominalizations %1.f% (%d)\n"),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../style.c:40:19: note: in definition of macro ‘_’
40 | #define _(String) String
| ^~~~~~
../style.c:1191:49: note: format string is defined here
1191 | printf(_(" nominalizations %1.f% (%d)\n"),
| ^
gcc -o style -g style.o sentence.o misc.o \
getopt.o getopt1.o -lm
Both diction.exe and style.exe are created successfully.
Csaba
--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
next prev parent reply other threads:[~2022-04-06 12:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 13:27 Keith Christian
2022-04-05 17:35 ` Brian Inglis
2022-04-06 12:04 ` Csaba Raduly [this message]
2022-04-06 14:59 ` Keith Christian
2022-04-06 18:31 ` Brian Inglis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEhDDbAZ04bPnsxbfehtU-2cxopp1kTpZ8J6Wfi2sfuHyjK7AQ@mail.gmail.com \
--to=rcsaba@gmail.com \
--cc=cygwin@cygwin.com \
--cc=keith1christian@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).