public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* building libpng-1.6.29 fails with error in signal.h
@ 2017-07-04 18:59 Denis Excoffier
  2017-07-04 20:47 ` Marco Atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Excoffier @ 2017-07-04 18:59 UTC (permalink / raw)
  To: The Cygwin Mailing List

Hello,

I tried to compile libpng-1.6.29 and failed at first. I obtain:

/tmp/lcl/uxl/make/bin/make  all-am
make[1]: Entering directory '/cygdrive/D/Users/dexcoff1/dexcoff1/cyglcl/tmp/libpng/libpng-1.6.29'
depbase=`echo png.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT png.lo -MD -MP -MF $depbase.Tpo -c -o png.lo png.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -MT png.lo -MD -MP -MF .deps/png.Tpo -c png.c  -DDLL_EXPORT -DPIC -o .libs/png.o
In file included from /usr/include/sys/signal.h:22:0,
                 from /usr/include/signal.h:6,
                 from /usr/include/machine/setjmp.h:372,
                 from /usr/include/setjmp.h:10,
                 from pngconf.h:50,
                 from png.h:366,
                 from pngpriv.h:375,
                 from png.c:14:
/usr/include/cygwin/signal.h:328:34: error: unknown type name 'siginfo_t'
     void  (*sa_sigaction) ( int, siginfo_t *, void * );
                                  ^
make[1]: *** [Makefile:1174: png.lo] Error 1
make[1]: Leaving directory '/cygdrive/D/Users/dexcoff1/dexcoff1/cyglcl/tmp/libpng/libpng-1.6.29'
make: *** [Makefile:791: all] Error 2


Further investigation shows that /usr/include/cygwin/signal.h has been
modified recently (June) and that if i move "struct sigaction" out of the
scope, the problem goes away and libpng is works now:

*** /usr/include/cygwin/signal.h.vanilla        Mon Jul  3 14:07:58 2017
--- /usr/include/cygwin/signal.h        Tue Jul  4 15:53:28 2017
***************
*** 318,324 ****
  
  typedef void (*_sig_func_ptr)(int);
  
! #if __POSIX_VISIBLE
  
  struct sigaction
  {
--- 318,324 ----
  
  typedef void (*_sig_func_ptr)(int);
  
! #if __POSIX_VISIBLE >= 999999
  
  struct sigaction
  {


I really don't know which (signal.h or libpng) is okay (or none). Will someone investigate this?

Regards,

Denis Excoffier.


--
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] 3+ messages in thread

* Re: building libpng-1.6.29 fails with error in signal.h
  2017-07-04 18:59 building libpng-1.6.29 fails with error in signal.h Denis Excoffier
@ 2017-07-04 20:47 ` Marco Atzeri
  2017-07-04 23:16   ` Yaakov Selkowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2017-07-04 20:47 UTC (permalink / raw)
  To: cygwin


On 04/07/2017 20:59, Denis Excoffier wrote:
> Hello,
>
> I tried to compile libpng-1.6.29 and failed at first. I obtain:
>
> /tmp/lcl/uxl/make/bin/make  all-am
> make[1]: Entering directory '/cygdrive/D/Users/dexcoff1/dexcoff1/cyglcl/tmp/libpng/libpng-1.6.29'
> depbase=`echo png.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT png.lo -MD -MP -MF $depbase.Tpo -c -o png.lo png.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -MT png.lo -MD -MP -MF .deps/png.Tpo -c png.c  -DDLL_EXPORT -DPIC -o .libs/png.o
> In file included from /usr/include/sys/signal.h:22:0,
>                  from /usr/include/signal.h:6,
>                  from /usr/include/machine/setjmp.h:372,
>                  from /usr/include/setjmp.h:10,
>                  from pngconf.h:50,
>                  from png.h:366,
>                  from pngpriv.h:375,
>                  from png.c:14:
> /usr/include/cygwin/signal.h:328:34: error: unknown type name 'siginfo_t'
>      void  (*sa_sigaction) ( int, siginfo_t *, void * );
>                                   ^
> make[1]: *** [Makefile:1174: png.lo] Error 1
> make[1]: Leaving directory '/cygdrive/D/Users/dexcoff1/dexcoff1/cyglcl/tmp/libpng/libpng-1.6.29'
> make: *** [Makefile:791: all] Error 2
>


>
> I really don't know which (signal.h or libpng) is okay (or none). Will someone investigate this?
>
> Regards,
>
> Denis Excoffier.
>

tested on 1.6.30

   ./configure CFLAGS="-D_GNU_SOURCE"
   make

works.

Reading
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html

I have the impression that the current cygwin header behaviour
is correct as siginfo_t is an extension POSIX.1-2008.

In theory "_GNU_SOURCE" should be defined by default, but I see

$ grep SOURCE *.h
pngpriv.h:#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */

$ grep SOURCE *.c
pngtest.c:#define _POSIX_SOURCE 1

that could have reduced the scope.

Regards
Marco






--
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] 3+ messages in thread

* Re: building libpng-1.6.29 fails with error in signal.h
  2017-07-04 20:47 ` Marco Atzeri
@ 2017-07-04 23:16   ` Yaakov Selkowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Yaakov Selkowitz @ 2017-07-04 23:16 UTC (permalink / raw)
  To: cygwin

On 2017-07-04 15:46, Marco Atzeri wrote:
> On 04/07/2017 20:59, Denis Excoffier wrote:
>> I tried to compile libpng-1.6.29 and failed at first. I obtain:
>>
>> /usr/include/cygwin/signal.h:328:34: error: unknown type name 'siginfo_t'
>>      void  (*sa_sigaction) ( int, siginfo_t *, void * );
>>                                   ^
>> I really don't know which (signal.h or libpng) is okay (or none). Will 
>> someone investigate this?
> > Reading
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html
> 
> I have the impression that the current cygwin header behaviour
> is correct as siginfo_t is an extension POSIX.1-2008.

True, but I missed that struct sigaction (which is correctly guarded as 
POSIX.1-1990) uses siginfo_t.  This part needs to be guarded as 
POSIX.1b-1993 without breaking the struct, as is done in glibc.

> In theory "_GNU_SOURCE" should be defined by default

No, I'll fix this in the header shortly, along with updating libpng.

-- 
Yaakov

--
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] 3+ messages in thread

end of thread, other threads:[~2017-07-04 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04 18:59 building libpng-1.6.29 fails with error in signal.h Denis Excoffier
2017-07-04 20:47 ` Marco Atzeri
2017-07-04 23:16   ` Yaakov Selkowitz

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