[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stdbool issue on Solaris 8 with SunStudio 11
From: |
Ludovic Courtès |
Subject: |
stdbool issue on Solaris 8 with SunStudio 11 |
Date: |
Fri, 27 Nov 2009 00:54:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hello,
Libunistring 0.9.1 fails to build on Solaris with Sun cc and Sun make:
--8<---------------cut here---------------start------------->8---
rm -f unistring/stdbool.h-t unistring/stdbool.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
echo '#if !defined _GL_STDBOOL_H'; \
if test -f /usr/include/stdbool.h; then \
echo '#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) ||
defined _AIX'; \
else \
echo '#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))'; \
fi; \
echo '#include <stdbool.h>'; \
echo '#else'; \
cat ../../lib/stdbool.mini.h; \
echo '#endif'; \
echo '#endif'; \
} > unistring/stdbool.h-t
cat: cannot open ../../lib/stdbool.mini.h
*** Error code 2
make: Fatal error: Command failed for target `unistring/stdbool.h'
--8<---------------cut here---------------end--------------->8---
Interestingly, GNU make silently ignores the ‘cat’ error, which allow us
to go further but without much success, of course:
--8<---------------cut here---------------start------------->8---
cc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I../../lib -I.. -I. -I../../lib -I..
-I../.. -DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c
../../lib/unicase/cased.c
"../../lib/unicase/cased.h", line 283: warning: initializer does not fit or is
out of range: 0xff7fffff
"../../lib/unicase/cased.h", line 283: warning: initializer does not fit or is
out of range: 0xff7fffff
"../../lib/unicase/cased.h", line 284: warning: initializer does not fit or is
out of range: 0xffffffff
"../../lib/unicase/cased.h", line 284: warning: initializer does not fit or is
out of range: 0xffffffff
"../../lib/unicase/cased.h", line 284: warning: initializer does not fit or is
out of range: 0xffffffff
[...]
cc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I../../lib -I.. -I. -I../../lib -I..
-I../.. -DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c
../../lib/unicase/empty-prefix-context.c
"../../lib/unicase.h", line 376: syntax error before or at: bool
"../../lib/unicase.h", line 376: warning: undefined or missing type for: bool
--8<---------------cut here---------------end--------------->8---
>From ‘config.log’:
--8<---------------cut here---------------start------------->8---
$ ggrep -A2 stdbool config.log
configure:18627: checking for stdbool.h that conforms to C99
configure:18720: cc -c -g conftest.c >&5
"conftest.c", line 62: cannot find include file: <stdbool.h>
"conftest.c", line 82: syntax error before or at:
"conftest.c", line 84: undefined symbol: true
--
| #include <stdbool.h>
| #ifndef bool
| "error: bool is not defined"
--
| our stdbool.h substitute should suffice. We also test
| this with GCC, where it should work, to detect more
| quickly whether someone messes up the test in the
--
ac_cv_header_stdbool_h=no
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=no
--
STDBOOL_H='stdbool.h'
STDINT_H='stdint.h'
STRIP='strip'
--8<---------------cut here---------------end--------------->8---
Tool versions:
--8<---------------cut here---------------start------------->8---
$ uname -a
SunOS build8s 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise-T5220
$ cc -V
cc: Sun C 5.8 Patch 121015-07 2009/04/22
usage: cc [ options] files. Use 'cc -flags' for details
--8<---------------cut here---------------end--------------->8---
Thanks,
Ludo’.
- stdbool issue on Solaris 8 with SunStudio 11,
Ludovic Courtès <=