Summary: | sys-libs/ncurses-5.9-r2: fails to build due to strict standard checking on illumos/solaris | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Igor <pashev.igor> |
Component: | Other | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Solaris | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | config.log |
Description
Igor
2012-08-14 08:54:16 UTC
Created attachment 321286 [details]
config.log
As for fix in c++/Makefile: ebuild should test whether c++/Makefile exists, and then try to fix it. that sounds reasonable, but wouldn't if use cxx ; then sed .... fi be more sensical then? (In reply to comment #3) > that sounds reasonable, but wouldn't > > if use cxx ; then > sed .... > fi > > be more sensical then? Yes, I thinks so. It is safe to completely remove -D_XOPEN_SOURCE from configure for *-solaris* that needs checking, gcc-4.6 required me to add that nasty bit (In reply to comment #6) > that needs checking, gcc-4.6 required me to add that nasty bit I've checked this with GCC 4.6.3 (both CC and CXX). AFAIK, Python does similar thing: defines __EXTENSIONS__ instead of any _XOPEN_SOURCE ok, I have to backtrack here. We remove -D_XOPEN_SOURCE=500 on solaris, beacuse it breaks the c++ (due to _XOPEN_SOURCE=600 being standard with c++). I seem to recall, I could not remove it from configure or something. Do you see a way? (In reply to comment #8) > ok, I have to backtrack here. > > We remove -D_XOPEN_SOURCE=500 on solaris, beacuse it breaks the c++ (due to > _XOPEN_SOURCE=600 being standard with c++). > > I seem to recall, I could not remove it from configure or something. Do you > see a way? I do this: if [[ ${CHOST} == *-solaris* ]] ; then sed -i -e '/-D__EXTENSIONS__/ s/-D_XOPEN_SOURCE=\$cf_XOPEN_SOURCE//' configure || die fi It's just a fast hack. NCurses should be patched to be more careful. BTW, in illumos/solaris headers each test for _XOPEN_SOURCE is accompanied with "|| defined(__EXTENSIONS__)" fixed in ncurses-5.9-r02.1, I hope it doesn't break. it does ... on OpenIndiana 151a5 make: Entering directory `/home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/widec/c++' i386-pc-solaris2.11-g++ -I../c++ -I../include -I/home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++ -DHAVE_CONFIG_H -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -D_FILE_OFFSET_BITS=64 -DXTSTRINGDEFINES -DNDEBUG -I. -I../include -I/home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++/../include -I/home/gentoo/usr/include/ncursesw -O2 -pipe -W -Wall -Wabi -fabi-version=0 -Woverloaded-virtual -Wsign-promo -Wsynth -Wold-style-cast -Wcast-align -Wcast-qual -Wpointer-arith -Wshadow -Wundef -Wwrite-strings -Weffc++ -Wno-unused -fPIC -c /home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++/cursesf.cc -o ../obj_s/cursesf.o In file included from /usr/include/iso/stdlib_iso.h:48:0, from /usr/include/stdlib.h:32, from /home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++/internal.h:53, from /home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++/cursesf.cc:34: /home/gentoo/usr/lib/gcc/i386-pc-solaris2.11/4.6.3/include-fixed/sys/feature_tests.h:362:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" In file included from /home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++/cursesf.h:39:0, from /home/gentoo/var/tmp/portage/sys-libs/ncurses-5.9-r02.1/work/ncurses-5.9/c++/cursesf.cc:35: This is a fresh 32-bits bootstrap on OpenIndiana where the emerge -e system stage goes wrong :( and it fails exactly the same way on an existing OpenIndiana Prefix, 64-bits, using GCC 4.7.1. -D_XOPEN_SOURCE_EXTENDED kills sys/feature_tests.h, because that means the system would be prehistoric level (pre _XOPEN_SOURCE=500) X/Open CAE Specification, Issue 4, Version 2. Fixed forgood, now, I hope. |