[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling on cygwin fails
From: |
Thomas Dickey |
Subject: |
Re: Compiling on cygwin fails |
Date: |
Thu, 20 Jun 2024 03:31:57 -0400 |
On Thu, Jun 20, 2024 at 07:25:04AM +0200, vcoxvco@gmail.com wrote:
> On 6/19/24 11:50 PM, Thomas Dickey wrote:
> > On Wed, Jun 19, 2024 at 09:20:13PM +0200, vcoxvco wrote:
> > > Hi,
> > >
> > > on cygwin (3.5.3) and current ncurses (ncurses-6.5-20240615) I get a
> > > compile
> > > error when compiling make_keys.c (after ./configure && make)
> > > (I didn't try older combinations of cygwin/ncurses)
> > >
> > > gcc -o make_keys.exe -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I.
> >
> > hmm - I may have caused that in a recent change where I was separating
> > the build-flags from the target-flags in cross-compiling. That seemed
> > to work fine - but I've not been on cygwin for a month or so.
>
> With that in mind, I did some more testing:
> ncurses-6.5-20240511 compiles.
> ncurses-6.5-20240518 does not.
right. This was a change to a macro which I made to fix a different
configuration in March, which I postponed for ncurses until after the
stable release. So I'll have to revisit this...
> >
> > > -I../include -I./../include -O2 --param max-inline-insns-single=1200
> > > ./tinfo/make_keys.c
> > > In file included from ./tinfo/make_keys.c:45:
> > > ../ncurses/names.c:354:5: error: variable ‘boolnames’ definition is
> > > marked dllimport
> > > 354 | DCL(boolnames) = {
> > > | ^~~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > > ../ncurses/names.c:403:5: error: variable ‘boolfnames’ definition is
> > > marked dllimport
> > >
> > >
> > > Tracking that down I found that these lines in ncurses_dll.h cause the
> > > problem:
> > >
> > > #if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
> > > # if defined(NCURSES_STATIC) /* "static" here only implies
> > > "not-a-DLL" */
> > > # define NCURSES_EXPORT_GENERAL_IMPORT
> > > # define NCURSES_EXPORT_GENERAL_EXPORT
> > > # else
> > > # define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
> > > # define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
> > > # endif
> > >
> > > When forcing __declspec, e.g.
> > >
> > > #if defined(xx__CYGWIN__) || (defined(xx_WIN32) || defined(xx_WIN64))
> > >
> > > in ncurses_dll.h and ncurses_dll.h.in, respectively, everything works
> > > fine.
> > >
> > >
> > > Is this a general problem or do I have to investigate further in my
> > > environment?
> > >
> > > Regards
> > > Vassili
> > >
> > >
> > > --
> > > V. Courzakis
> > > email: vcoxvco@googlemail.com
> > >
> > >
> > > --- 8< ---
> > > ./configure
> > >
> > > [...]
> > > gawk -f ./tinfo/MKcodes.awk bigstrings=1 ../include/Caps
> > > ../include/Caps-ncurses >codes.c
> > > gcc -o make_hash.exe -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I.
> > > -I../include -I./../include -O2 --param max-inline-insns-single=1200
> > > ./tinfo/make_hash.c
> > > In file included from ./tinfo/make_hash.c:60:
> > > ../ncurses/tinfo/doalloc.c:46:1: warning: ‘_nc_doalloc’ redeclared without
> > > dllimport attribute: previous dllimport ignored [-Wattributes]
> > > 46 | _nc_doalloc(void *oldp, size_t amount)
> > > | ^~~~~~~~~~~
> > > /bin/sh -e ./tinfo/MKcaptab.sh gawk 1 ./tinfo/MKcaptab.awk ../include/Caps
> > > ../include/Caps-ncurses > comp_captab.c
> > > /bin/sh -e ./tinfo/MKuserdefs.sh gawk 1 ../include/Caps
> > > ../include/Caps-ncurses > comp_userdefs.c
> > > /bin/sh -e ./tty/MKexpanded.sh "gcc -E" -DHAVE_CONFIG_H -DBUILDING_NCURSES
> > > -I../ncurses -I. -I../include -D_GNU_SOURCE -D_DEFAULT_SOURCE -DNDEBUG >
> > > expanded.c
> > > /bin/sh -e ./tinfo/MKfallback.sh /usr/share/terminfo ../misc/terminfo.src
> > > "tic" "infocmp" >fallback.c
> > > FGREP="grep -F" /bin/sh -e ./base/MKlib_gen.sh "gcc -E -DHAVE_CONFIG_H
> > > -DBUILDING_NCURSES -I../ncurses -I. -I../include -D_GNU_SOURCE
> > > -D_DEFAULT_SOURCE -DNDEBUG" "gawk" generated <../include/curses.h
> > > >lib_gen.c
> > > .. adding -P option to work around gcc 11
> > > AWK=gawk USE_SIGWINCH=1 /bin/sh ./tinfo/MKkeys_list.sh ../include/Caps
> > > ../include/Caps-ncurses | LC_ALL=C sort >keys.list
> > > gawk -f ./base/MKkeyname.awk use_sigwinch=1 bigstrings=1 keys.list >
> > > lib_keyname.c
> > > FGREP="grep -F" /bin/sh -e ./base/MKlib_gen.sh "gcc -E -DHAVE_CONFIG_H
> > > -DBUILDING_NCURSES -I../ncurses -I. -I../include -D_GNU_SOURCE
> > > -D_DEFAULT_SOURCE -DNDEBUG" "gawk" implemented <../include/curses.h
> > > > link_test.c
> > > .. adding -P option to work around gcc 11
> > > gawk -f ./tinfo/MKnames.awk bigstrings=1 ../include/Caps
> > > ../include/Caps-ncurses >names.c
> > > echo | gawk -f ./base/MKunctrl.awk bigstrings=1 >unctrl.c
> > > gcc -o make_keys.exe -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I.
> > > -I../include -I./../include -O2 --param max-inline-insns-single=1200
> > > ./tinfo/make_keys.c
> > > In file included from ./tinfo/make_keys.c:45:
> > > ../ncurses/names.c:354:5: error: variable ‘boolnames’ definition is
> > > marked dllimport
> > > 354 | DCL(boolnames) = {
> > > | ^~~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > > ../ncurses/names.c:403:5: error: variable ‘boolfnames’ definition is
> > > marked dllimport
> > > 403 | DCL(boolfnames) = {
> > > | ^~~~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > > ../ncurses/names.c:452:5: error: variable ‘numnames’ definition is marked
> > > dllimport
> > > 452 | DCL(numnames) = {
> > > | ^~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > > ../ncurses/names.c:496:5: error: variable ‘numfnames’ definition is
> > > marked dllimport
> > > 496 | DCL(numfnames) = {
> > > | ^~~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > > ../ncurses/names.c:540:5: error: variable ‘strnames’ definition is marked
> > > dllimport
> > > 540 | DCL(strnames) = {
> > > | ^~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > > ../ncurses/names.c:959:5: error: variable ‘strfnames’ definition is
> > > marked dllimport
> > > 959 | DCL(strfnames) = {
> > > | ^~~~~~~~~
> > > ../ncurses/names.c:352:40: note: in definition of macro ‘DCL’
> > > 352 | #define DCL(it) NCURSES_EXPORT_VAR(IT) it[]
> > > | ^~
> > >
> > >
> >
>
> --
> V. Courzakis
> email: vcoxvco@googlemail.com
>
>
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature