* /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
@ 2018-05-13 17:06 waterlan
2018-05-13 17:07 ` Hans-Bernhard Bröker
2018-05-14 12:40 ` Ken Brown
0 siblings, 2 replies; 7+ messages in thread
From: waterlan @ 2018-05-13 17:06 UTC (permalink / raw)
To: cygwin
Hi,
I'm trying to create a new wcd package, but I get compile errors during
the cygport build of the wcd package.
gcc -ggdb -O2 -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
--param=ssp-buffer-size=4
-fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/build=/usr/src/debug/wcd-6.0.2-1
-fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/src/wcd-6.0.2=/usr/src/debug/wcd-6.0.2-1
-O2 -Wall -Wextra -Wno-unused-parameter -Wconversion -Ic3po
-DVERSION=\"6.0.2\" -DVERSION_DATE=\"2018-05-10\" -std=gnu99
-DWCD_UNICODE -DWCD_UNINORM -DENABLE_NLS
-DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"wcd\"
-I/usr/include/ncursesw -I/usr/include -DDEBUG=0 -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DUNIX -DWCD_USECURSES -D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED -c wcwidth.c -o wcwidth.o
In file included from /usr/include/ssp/wchar.h:5:0,
from /usr/include/wchar.h:336,
from wcwidth.c:62:
/usr/include/ssp/wchar.h:78:1: error: unknown type name 'FILE'
__ssp_decl(wchar_t *, fgetws, (wchar_t *__restrict __buf, int __wlen,
FILE *__restrict __fp))
^
The C flag that triggers this option is -Wp,-D_FORTIFY_SOURCE=2.
When I remove this flag the compilation goes OK.
regards,
--
Erwin Waterlander
http://waterlan.home.xs4all.nl/
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
2018-05-13 17:06 /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build) waterlan
@ 2018-05-13 17:07 ` Hans-Bernhard Bröker
2018-05-13 20:04 ` Achim Gratz
2018-05-14 12:40 ` Ken Brown
1 sibling, 1 reply; 7+ messages in thread
From: Hans-Bernhard Bröker @ 2018-05-13 17:07 UTC (permalink / raw)
To: cygwin
Am 13.05.2018 um 18:01 schrieb waterlan:
> The C flag that triggers this option is -Wp,-D_FORTIFY_SOURCE=2.
That does look rather weird. Why would one write that instead of just
-D_FORTIFY_SOURCE=2 ?
Anyway, the test can be simplified quite a lot to:
hbbro@NB4 ~/tmp
$ cat twchar.c
#include <wchar.h>
$ gcc -D_FORTIFY_SOURCE=1 -fstack-protector-strong -c twchar.c -O2
-D_XOPEN_SOURCE
In file included from /usr/include/ssp/wchar.h:5:0,
from /usr/include/wchar.h:336,
from twchar.c:1:
/usr/include/ssp/wchar.h:78:1: error: unknown type name 'FILE'
__ssp_decl(wchar_t *, fgetws, (wchar_t *__restrict __buf, int __wlen,
FILE *__restrict __fp))
^
/usr/include/ssp/wchar.h:78:1: error: unknown type name 'FILE'
__ssp_decl(wchar_t *, fgetws, (wchar_t *__restrict __buf, int __wlen,
FILE *__restrict __fp))
All four of the GCC options have to be there to trigger this
(_FORTIFY_SOURCE can be set to 2, for the same result). Basically the
SSP additions to <wchar.h> fail to compile, but only if the feature set
has been restricted from the default by -D_XOPEN_SOURCE. Ultimately
this happens because the latter disables the typedef of FILE in
/usr/include/wchar.h line 72 ff:
#if __POSIX_VISIBLE >= 200809 || _XSI_VISIBLE
/* As in stdio.h, <sys/reent.h> defines __FILE. */
#if !defined(__FILE_defined)
typedef __FILE FILE;
# define __FILE_defined
#endif
#endif
I don't know remotely enough about this SSP stuff to judge if that's
even supposed to work in -D_XOPEN_SOURCE mode. But as it is, it can't.
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
2018-05-13 17:07 ` Hans-Bernhard Bröker
@ 2018-05-13 20:04 ` Achim Gratz
0 siblings, 0 replies; 7+ messages in thread
From: Achim Gratz @ 2018-05-13 20:04 UTC (permalink / raw)
To: cygwin
Hans-Bernhard Bröker writes:
> That does look rather weird. Why would one write that instead of just
> -D_FORTIFY_SOURCE=2 ?
That's what cygport does and Yaakov said he'd copied it from Fedora.
But yes, that _is_ unexpected and it did break stuff elsewehere.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
2018-05-13 17:06 /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build) waterlan
2018-05-13 17:07 ` Hans-Bernhard Bröker
@ 2018-05-14 12:40 ` Ken Brown
2018-08-16 19:20 ` waterlan
1 sibling, 1 reply; 7+ messages in thread
From: Ken Brown @ 2018-05-14 12:40 UTC (permalink / raw)
To: cygwin
On 5/13/2018 12:01 PM, waterlan wrote:
> Hi,
>
> I'm trying to create a new wcd package, but I get compile errors during
> the cygport build of the wcd package.
>
> gcc -ggdb -O2 -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
> --param=ssp-buffer-size=4
> -fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/build=/usr/src/debug/wcd-6.0.2-1
> -fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/src/wcd-6.0.2=/usr/src/debug/wcd-6.0.2-1
> -O2 -Wall -Wextra -Wno-unused-parameter -Wconversion -Ic3po
> -DVERSION=\"6.0.2\" -DVERSION_DATE=\"2018-05-10\" -std=gnu99
> -DWCD_UNICODE -DWCD_UNINORM -DENABLE_NLS
> -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"wcd\"
> -I/usr/include/ncursesw -I/usr/include -DDEBUG=0 -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -DUNIX -DWCD_USECURSES -D_XOPEN_SOURCE
> -D_XOPEN_SOURCE_EXTENDED -c wcwidth.c -o wcwidth.o
>
> In file included from /usr/include/ssp/wchar.h:5:0,
> from /usr/include/wchar.h:336,
> from wcwidth.c:62:
> /usr/include/ssp/wchar.h:78:1: error: unknown type name 'FILE'
> __ssp_decl(wchar_t *, fgetws, (wchar_t *__restrict __buf, int __wlen,
> FILE *__restrict __fp))
This is a newlib issue that has been fixed:
https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=829820af6e5bccefe93485023e93821807fb99b8;hp=e494b560350cabef94126a4478096aae89ae35a0
Ken
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
2018-05-14 12:40 ` Ken Brown
@ 2018-08-16 19:20 ` waterlan
2018-08-16 19:25 ` Ken Brown
0 siblings, 1 reply; 7+ messages in thread
From: waterlan @ 2018-08-16 19:20 UTC (permalink / raw)
To: cygwin
Ken Brown schreef op 2018-05-14 14:35:
> On 5/13/2018 12:01 PM, waterlan wrote:
>> Hi,
>>
>> I'm trying to create a new wcd package, but I get compile errors
>> during
>> the cygport build of the wcd package.
>>
>> gcc -ggdb -O2 -pipe -Wall -Werror=format-security
>> -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
>> --param=ssp-buffer-size=4
>> -fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/build=/usr/src/debug/wcd-6.0.2-1
>> -fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/src/wcd-6.0.2=/usr/src/debug/wcd-6.0.2-1
>> -O2 -Wall -Wextra -Wno-unused-parameter -Wconversion -Ic3po
>> -DVERSION=\"6.0.2\" -DVERSION_DATE=\"2018-05-10\" -std=gnu99
>> -DWCD_UNICODE -DWCD_UNINORM -DENABLE_NLS
>> -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"wcd\"
>> -I/usr/include/ncursesw -I/usr/include -DDEBUG=0 -D_LARGEFILE_SOURCE
>> -D_FILE_OFFSET_BITS=64 -DUNIX -DWCD_USECURSES -D_XOPEN_SOURCE
>> -D_XOPEN_SOURCE_EXTENDED -c wcwidth.c -o wcwidth.o
>>
>> In file included from /usr/include/ssp/wchar.h:5:0,
>> from /usr/include/wchar.h:336,
>> from wcwidth.c:62:
>> /usr/include/ssp/wchar.h:78:1: error: unknown type name 'FILE'
>> __ssp_decl(wchar_t *, fgetws, (wchar_t *__restrict __buf, int
>> __wlen,
>> FILE *__restrict __fp))
>
> This is a newlib issue that has been fixed:
>
> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=829820af6e5bccefe93485023e93821807fb99b8;hp=e494b560350cabef94126a4478096aae89ae35a0
>
> Ken
When will this newlib fix arrive in Cygwin?
regards,
--
Erwin Waterlander
http://waterlan.home.xs4all.nl/
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
2018-08-16 19:20 ` waterlan
@ 2018-08-16 19:25 ` Ken Brown
2018-08-16 23:34 ` waterlan
0 siblings, 1 reply; 7+ messages in thread
From: Ken Brown @ 2018-08-16 19:25 UTC (permalink / raw)
To: cygwin
On 8/16/2018 2:11 PM, waterlan wrote:
> Ken Brown schreef op 2018-05-14 14:35:
>> On 5/13/2018 12:01 PM, waterlan wrote:
>>> Hi,
>>>
>>> I'm trying to create a new wcd package, but I get compile errors during
>>> the cygport build of the wcd package.
>>>
>>> gcc -ggdb -O2 -pipe -Wall -Werror=format-security
>>> -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
>>> --param=ssp-buffer-size=4
>>> -fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/build=/usr/src/debug/wcd-6.0.2-1
>>>
>>> -fdebug-prefix-map=/cygdrive/c/Users/waterlan/src/cygwin/wcd/wcd-6.0.2-1.x86_64/src/wcd-6.0.2=/usr/src/debug/wcd-6.0.2-1
>>>
>>> -O2 -Wall -Wextra -Wno-unused-parameter -Wconversion   -Ic3po
>>> -DVERSION=\"6.0.2\" -DVERSION_DATE=\"2018-05-10\"Â -std=gnu99
>>> -DWCD_UNICODE -DWCD_UNINORM -DENABLE_NLS
>>> -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"wcd\"
>>> -I/usr/include/ncursesw -I/usr/include -DDEBUG=0 -D_LARGEFILE_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -DUNIX -DWCD_USECURSESÂ -D_XOPEN_SOURCE
>>> -D_XOPEN_SOURCE_EXTENDEDÂ -c wcwidth.c -o wcwidth.o
>>>
>>> In file included from /usr/include/ssp/wchar.h:5:0,
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â from /usr/include/wchar.h:336,
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â from wcwidth.c:62:
>>> /usr/include/ssp/wchar.h:78:1: error: unknown type name 'FILE'
>>> Â __ssp_decl(wchar_t *, fgetws, (wchar_t *__restrict __buf, int __wlen,
>>> FILE *__restrict __fp))
>>
>> This is a newlib issue that has been fixed:
>>
>> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=829820af6e5bccefe93485023e93821807fb99b8;hp=e494b560350cabef94126a4478096aae89ae35a0
>>
>>
>> Ken
>
> When will this newlib fix arrive in Cygwin?
It's in cygwin-2.11.0, which is already available as a test release.
Ken
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build)
2018-08-16 19:25 ` Ken Brown
@ 2018-08-16 23:34 ` waterlan
0 siblings, 0 replies; 7+ messages in thread
From: waterlan @ 2018-08-16 23:34 UTC (permalink / raw)
To: cygwin
Ken Brown schreef op 2018-08-16 20:20:
> On 8/16/2018 2:11 PM, waterlan wrote:
>> Ken Brown schreef op 2018-05-14 14:35:
>>>
>>> This is a newlib issue that has been fixed:
>>>
>>> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=829820af6e5bccefe93485023e93821807fb99b8;hp=e494b560350cabef94126a4478096aae89ae35a0
>>> Ken
>>
>> When will this newlib fix arrive in Cygwin?
>
> It's in cygwin-2.11.0, which is already available as a test release.
>
OK. Thanks.
--
Erwin Waterlander
http://waterlan.home.xs4all.nl/
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-08-16 19:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-13 17:06 /usr/include/ssp/wchar.h:78:1: error: unknown type name ‘FILE’ (during cygport package build) waterlan
2018-05-13 17:07 ` Hans-Bernhard Bröker
2018-05-13 20:04 ` Achim Gratz
2018-05-14 12:40 ` Ken Brown
2018-08-16 19:20 ` waterlan
2018-08-16 19:25 ` Ken Brown
2018-08-16 23:34 ` waterlan
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).