Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#47722 closed defect (fixed)

ghostscript: build failure on 10.6; triop.h:407: error: type qualifiers ignored on function return type

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard Cc: bitpup, gnw3, Schamschula (Marius Schamschula), paranoysya@…, knayawp@…, udbraumann, ryandesign (Ryan Carsten Schmidt)
Port: ghostscript

Description

make[2]: Entering directory `/opt/local/var/macports/build/_opt_mports_dports_print_ghostscript/ghostscript/work/ghostscript-9.16'
/usr/bin/gcc-4.2  -DHAVE_MKSTEMP  -DHAVE_FSEEKO  -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2  -DHAVE_BSWAP32  -DHAVE_STRERROR -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2  -isystem/opt/local/include  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch x86_64 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -I/opt/local/include    -I./soobj -I./base -I./soobj -I./devices  -I./devices/vector  -c -o soobj/pclgen.o -DGS_REVISION=916 -I./contrib/pcl3/eprn  ./contrib/pcl3/src/pclgen.c
/usr/bin/gcc-4.2  -DHAVE_MKSTEMP  -DHAVE_FSEEKO  -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2  -DHAVE_BSWAP32  -DHAVE_STRERROR -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2  -isystem/opt/local/include  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch x86_64 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -I/opt/local/include    -I./soobj -I./base -I./soobj -I./devices  -I./devices/vector  -c -o soobj/pclcomp.o -DGS_REVISION=916 -I./contrib/pcl3/eprn  ./contrib/pcl3/src/pclcomp.c
/usr/bin/gcc-4.2  -DHAVE_MKSTEMP  -DHAVE_FSEEKO  -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2  -DHAVE_BSWAP32  -DHAVE_STRERROR -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2  -isystem/opt/local/include  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch x86_64 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -I/opt/local/include    -I./soobj -I./base -I./soobj -I./devices  -I./devices/vector  -c -o soobj/pclsize.o -DGS_REVISION=916 -I./contrib/pcl3/eprn  ./contrib/pcl3/src/pclsize.c
/usr/bin/gcc-4.2  -DHAVE_MKSTEMP  -DHAVE_FSEEKO  -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2  -DHAVE_BSWAP32  -DHAVE_STRERROR -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2  -isystem/opt/local/include  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch x86_64 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -I/opt/local/include    -I./soobj -I./base -I./devices  -DWHICH_CMS="lcms2" -I./trio -o ./soobj/gssprintf_0.o -c ./base/gssprintf.c
In file included from ./contrib/pcl3/src/pclcomp.c:32:
./contrib/pcl3/src/pclgen.h:26: warning: ignoring #pragma ident 
./contrib/pcl3/src/pclcomp.c: In function ‘compress_tiff’:
./contrib/pcl3/src/pclcomp.c:165: warning: label ‘state2’ defined but not used
In file included from ./contrib/pcl3/src/pclsize.c:31:
./contrib/pcl3/src/pclsize.h:19: warning: ignoring #pragma ident 
In file included from ./contrib/pcl3/src/pclsize.h:23,
                 from ./contrib/pcl3/src/pclsize.c:31:
./contrib/pcl3/eprn/mediasize.h:18: warning: ignoring #pragma ident 
In file included from ./contrib/pcl3/src/pclsize.h:24,
                 from ./contrib/pcl3/src/pclsize.c:31:
./contrib/pcl3/src/pclgen.h:26: warning: ignoring #pragma ident 
./contrib/pcl3/src/pclsize.c: In function ‘pcl3_page_size’:
./contrib/pcl3/src/pclsize.c:129: warning: suggest parentheses around arithmetic in operand of |
./contrib/pcl3/src/pclcomp.c: In function ‘pcl_compress’:
./contrib/pcl3/src/pclcomp.c:707: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclcomp.c:707: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclcomp.c:707: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclcomp.c:707: warning: suggest parentheses around && within ||
In file included from ./contrib/pcl3/src/pclgen.c:72:
./contrib/pcl3/src/pclgen.h:26: warning: ignoring #pragma ident 
./contrib/pcl3/src/pclgen.c: In function ‘pcl3_init_file’:
./contrib/pcl3/src/pclgen.c:311: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclgen.c:338: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclgen.c:338: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclgen.c: In function ‘pcl3_begin_raster’:
./contrib/pcl3/src/pclgen.c:582: warning: suggest parentheses around && within ||
./contrib/pcl3/src/pclgen.c: In function ‘pcl3_set_oldquality’:
./contrib/pcl3/src/pclgen.c:1111: warning: suggest parentheses around && within ||
In file included from ./trio/trio.h:35,
                 from ./base/gssprintf.c:19:
./trio/triop.h:407: error: type qualifiers ignored on function return type
make[2]: *** [soobj/gssprintf_0.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_mports_dports_print_ghostscript/ghostscript/work/ghostscript-9.16'
make[1]: *** [so-subtarget] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_mports_dports_print_ghostscript/ghostscript/work/ghostscript-9.16'
make: *** [so] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_mports_dports_print_ghostscript/ghostscript/work/ghostscript-9.16'
Command failed:  cd "/opt/local/var/macports/build/_opt_mports_dports_print_ghostscript/ghostscript/work/ghostscript-9.16" && /usr/bin/make -j8 -w so 
Exit code: 2

See the buildbot log.

Attachments (1)

Portfile-ghostscript.diff (448 bytes) - added by Schamschula (Marius Schamschula) 9 years ago.
Update to compiler blacklist for Tiger/Leopard

Download all attachments as: .zip

Change History (19)

comment:1 Changed 9 years ago by bitpup

Cc: wheeltong@… added

Cc Me!

comment:2 Changed 9 years ago by gnw3

Cc: gnwiii@… added

Cc Me!

comment:3 Changed 9 years ago by Schamschula (Marius Schamschula)

Cc: mschamschula@… added

Cc Me!

comment:4 Changed 9 years ago by paranoysya@…

Cc: paranoysya@… added

Cc Me!

comment:5 Changed 9 years ago by knayawp@…

Last edited 9 years ago by knayawp@… (previous) (diff)

comment:6 Changed 9 years ago by dbevans (David B. Evans)

Fixes for SL build issues committed in r136307, r136308. Now builds correctly on buildbot.

comment:7 Changed 9 years ago by knayawp@…

Cc: knayawp@… added

Cc Me!

'm having the same issue on 10.7.5

Last edited 9 years ago by knayawp@… (previous) (diff)

comment:8 Changed 9 years ago by mojca (Mojca Miklavec)

Thank you very much. Someone now needs to rebuild the dependent ports if you didn't do it already by now.

Not that it's important but I'm just curious: why blacklist all gcc compilers? Isn't the problematic one just gcc < 4.2 (= old default compiler)? I would expect at least macports' gcc 4.7-4.9 to work.

comment:9 in reply to:  8 ; Changed 9 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Replying to mojca@…:

Thank you very much. Someone now needs to rebuild the dependent ports if you didn't do it already by now.

https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/35709

Not that it's important but I'm just curious: why blacklist all gcc compilers? Isn't the problematic one just gcc < 4.2 (= old default compiler)? I would expect at least macports' gcc 4.7-4.9 to work.

Yes, but in general, I try and avoid the pure gcc compilers when clang is available (for compatibility with other platforms). The selected compiler in this case is mp-clang-3.4 which I believe has a higher priority on the fallback list than the gcc-4.7+ in any case.

comment:10 in reply to:  9 ; Changed 9 years ago by udbraumann

Replying to devans@…:

Yes, but in general, I try and avoid the pure gcc compilers when clang is available (for compatibility with other platforms). The selected compiler in this case is mp-clang-3.4 which I believe has a higher priority on the fallback list than the gcc-4.7+ in any case.

As soon as you restrict compilers to clang-mp-3.* you must know that you lock out PPC users. E.g. clang-mp-3.4 can be built on 10.5.8 PPC, but still is not functional! So, please add a switch in order to allow gcc-mp-4.* (say, at least gcc-mp-4.5, I guess), in my case this invocation has worked:

$ sudo port upgrade ghostscript configure.compiler=macports-gcc-4.9

comment:11 Changed 9 years ago by udbraumann

Cc: braumann@… added

Cc Me!

comment:12 in reply to:  10 Changed 9 years ago by udbraumann

Replying to braumann@…:

As soon as you restrict compilers to clang-mp-3.* you must know that you lock out PPC users. E.g. clang-mp-3.4 can be built on 10.5.8 PPC, but still is not functional! So, please add a switch in order to allow gcc-mp-4.* (say, at least gcc-mp-4.5, I guess), in my case this invocation has worked:

$ sudo port upgrade ghostscript configure.compiler=macports-gcc-4.9

FWIW: While my comment above refers to the changeset "ghostscript: blacklist compilers that error on const function return type" r136307, for a different package but with the same maintainer I found a similar problem concerning "gnome-keyring: blacklist compilers that do not support C11 (redefinition of typedefs)" r136259. Again, while clang-mp-3.* is not functional on PPC systems so far, instead gcc-mp-4.9 does the job!

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:13 Changed 9 years ago by mojca (Mojca Miklavec)

Proving proper support for C++11 on 10.5 will probably remain problematic. Then again I agree that there should be no need to blacklist all gcc compilers; it would be nice to blacklist just the oldest ones.

(For the next time: you can type just 'r136307' to get a reference to the changeset, like r136307. To reference the tickets you just type in '#' followed by the ticket number.)

comment:14 in reply to:  13 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to mojca@…:

Proving proper support for C++11 on 10.5 will probably remain problematic.

According to r136259, it uses C11, not C++11, so that is not nearly as problematic.

comment:15 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Cc Me!

Changed 9 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-ghostscript.diff added

Update to compiler blacklist for Tiger/Leopard

comment:16 Changed 9 years ago by Schamschula (Marius Schamschula)

I modified the compiler blacklist to build under Leopard (10.5.8). This should also work with Tiger, see comment 12.

comment:17 Changed 9 years ago by mojca (Mojca Miklavec)

C11 is supported since gcc 4.7. There's no need to blacklist gcc-4.7 gcc-4.8

comment:18 Changed 9 years ago by jmroot (Joshua Root)

This is just the usual failure mode when you decide to use -Werror. r136513

Someone should ask upstream to provide a —disable-werror configure flag, or even better, make that the default and let their contributors configure with —enable-werror.

Note: See TracTickets for help on using tickets.