Bug 691123 - 8.71 language-switch build with CYGWIN broken
Summary: 8.71 language-switch build with CYGWIN broken
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Language Switch (show other bugs)
Version: 8.71
Hardware: PC Windows XP
: P4 normal
Assignee: Default assignee
URL:
Keywords:
: 691480 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-19 06:24 UTC by norbert.janssen
Modified: 2010-07-23 14:59 UTC (History)
1 user (show)

See Also:
Customer: 661
Word Size: ---


Attachments
patch (916 bytes, patch)
2010-02-20 18:56 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description norbert.janssen 2010-02-19 06:24:39 UTC
ghostpdl-8.70 ls-debug/ls-product build with CYGWIN (on a windows system)
succeeds, but the ghostpdl-8.71 (from
http://ghostscript.com/releases/ghostpdl-8.71.tar.bz2)  ls-debug/ls-product
build fails on zfapi.c (see result of build below):

cc -DDEBUG -ggdb -g3 -O0 -Wall -Wundef -Wstrict-prototypes -Wmissing-declaration
s -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-strict-aliasing -fno
-builtin -fno-common -DHAVE_STDINT_H -DHAVE_MKSTEMP -DHAVE_HYPOT -DGX_COLOR_INDE
X_TYPE="unsigned long" -DPSI_INCLUDED -DPCL_INCLUDED -DPSI_INCLUDED  -I../gs/psi
 -I./obj -I./obj -I../gs/base  -o ./obj/zfapi.o -c ../gs/psi/zfapi.c
In file included from /usr/include/sys/signal.h:104,
                 from /usr/include/signal.h:5,
                 from /usr/include/time.h:140,
                 from /usr/include/sys/stat.h:9,
                 from ../gs/base/stat_.h:27,
                 from ../gs/base/gxiodev.h:21,
                 from ../gs/base/stream.h:22,
                 from ../gs/psi/zfapi.c:49:
/usr/include/cygwin/signal.h:54: error: expected `)' before `->' token
/usr/include/cygwin/signal.h:54: error: expected `)' before `.' token
/usr/include/cygwin/signal.h:54: error: expected `)' before `.' token
/usr/include/cygwin/signal.h:55: error: expected `;' before `unsigned'
../gs/psi/zfapi.c: In function `FAPI_FF_get_word':
../gs/psi/zfapi.c:504: warning: unused variable `name'
../gs/psi/zfapi.c: In function `FAPI_FF_get_float':
../gs/psi/zfapi.c:628: warning: unused variable `subarray_index'
../gs/psi/zfapi.c: In function `sfnt_get_glyph_offset':
../gs/psi/zfapi.c:786: warning: unused variable `off'
../gs/psi/zfapi.c:785: warning: unused variable `i'
make[2]: *** [obj/zfapi.o] Error 1
make[2]: Leaving directory `/cygdrive/c/artifex/ghostpdl-8.71/language_switch'
make[1]: *** [pdl-debug] Error 2
make[1]: Leaving directory `/cygdrive/c/artifex/ghostpdl-8.71/language_switch'
make: *** [ls-debug] Error 2
Comment 1 Ralph Giles 2010-02-19 10:10:34 UTC
I've been able to confirm with cygwin 1.7.1, though what's confusing the header
wasn't immediately obvious.
Comment 2 Hin-Tak Leung 2010-02-19 14:33:17 UTC
Hmm, windows/cygwin doesn't support quite a few POSIX signals, and that
particular part of cygwin definitely doesn't inter-op with mingw (i.e.
no-cygwin) headers.

FWIW, the language switch build can be built with microsoft Windows SDK express
(the free version), if that helps.

That also looks like FAPI change from Ken - I thought that's optional?
Comment 3 Alex Cherepanov 2010-02-19 17:41:08 UTC
The build immediately fails with:
cc1: unrecognized option `-Wno-strict-aliasing'

fixing this, it fails with
../gs/base/stdint_.h:41:21: stdint.h: No such file or directory

next, the build fails with
ld: cannot find -ldl

and this was the last bug.
I cannot reproduce the errors in signal.h
Comment 4 norbert.janssen 2010-02-20 13:35:16 UTC
I stumbled on this when trying to cmake-ify the ghostpdl (i.e. replace the *.mak
with *.cmake so that it can be build with gcc/msvc/... (it fits better in our
normal build-environment). Just one set of makefiles to maintain, i.s.o. all
flavours now, and the bonus, cmake takes care of the dependencies.
Normally I build with msvc, but I wanted to try gcc also, and on Windows that
means CYGWIN for me.
Comment 5 Alex Cherepanov 2010-02-20 18:56:05 UTC
Created attachment 5975 [details]
patch

Include stat_.h before estack.h, which defines esp macro.
Prevent a spurious macro substitution in Cygwin version of signal.h.

Backward compatibility problems with an ancient version of Cygwin are,
probably, not worth fixing.
Comment 6 Alex Cherepanov 2010-02-20 19:20:42 UTC
The patch has been committed as a rev. 10777.
Regression testing shows no differences.
Comment 7 Alex Cherepanov 2010-07-23 14:59:30 UTC
*** Bug 691480 has been marked as a duplicate of this bug. ***