Discussion:
Building mico2.3.13
EBERSOLD André
2008-09-23 11:45:36 UTC
Permalink
I tried to compile mico 2.3.13 on FC9 with gcc 4.3.0

just run configure and than make.

I got an error in fast_array.cc
Someone knows where the definition UINT_MAX comes from ?

Kind regards Andre E.


c++ -I../include -O2 -Wall -Wwrite-strings -fno-strict-aliasing
-D_REENTRANT -D_GNU_SOURCE -DPIC -fPIC -c fast_array.cc -o
fast_array.pic.o
fast_array.cc:51: error: 'UINT_MAX' was not declared in this scope
make[1]: *** [fast_array.pic.o] Error 1
make[1]: Leaving directory `/home/...../.../mico/orb'
make: *** [system] Error 1
bash-3.2$ grep -r UINT_MAX *
orb/fast_array.cc:const unsigned int MICO::__void_array::__EMPTY = UINT_MAX;
bash-3.2$ pwd
/home/aebersol/Builds/mico
bash-3.2$ c++ --version
c++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
--
Andre EBERSOLD - ADIVAL
Senior Software Engineer
tel : 03 90 20 76 60
maito:***@adival.com

Alcatel Business System, Illkirch
tel: 03 90 67 62 19
maito:***@alcatel-lucent.fr
Karel Gardas
2008-09-23 12:49:06 UTC
Permalink
Post by EBERSOLD André
I tried to compile mico 2.3.13 on FC9 with gcc 4.3.0
just run configure and than make.
I got an error in fast_array.cc
Someone knows where the definition UINT_MAX comes from ?
It comes from either your C++ compiler header files or from the OS
header files. It depends. On Solaris I do have it defined in
/usr/include/iso/limits_iso.h and also GCC 4.2.3 comes with its own
definition in
/usr/local/gcc-4.2.3/lib/gcc/i386-pc-solaris2.11/4.2.3/include/limits.h

Anyway, GCC team has clean up quite a lot of header files for 4.3.x
release so I guess what was included unnecessarily in previous GCC
releases is not included now hence the compilation failure.

Cheers,
Karel
Post by EBERSOLD André
Kind regards Andre E.
c++ -I../include -O2 -Wall -Wwrite-strings -fno-strict-aliasing
-D_REENTRANT -D_GNU_SOURCE -DPIC -fPIC -c fast_array.cc -o
fast_array.pic.o
fast_array.cc:51: error: 'UINT_MAX' was not declared in this scope
make[1]: *** [fast_array.pic.o] Error 1
make[1]: Leaving directory `/home/...../.../mico/orb'
make: *** [system] Error 1
bash-3.2$ grep -r UINT_MAX *
orb/fast_array.cc:const unsigned int MICO::__void_array::__EMPTY = UINT_MAX;
bash-3.2$ pwd
/home/aebersol/Builds/mico
bash-3.2$ c++ --version
c++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Bart Vanherck
2008-10-31 09:32:36 UTC
Permalink
Post by Karel Gardas
Post by EBERSOLD André
I tried to compile mico 2.3.13 on FC9 with gcc 4.3.0
just run configure and than make.
I got an error in fast_array.cc
Someone knows where the definition UINT_MAX comes from ?
This error is also present in a recent Ubuntu release, which contains a
g++ compiler > 4.3.0
Post by Karel Gardas
It comes from either your C++ compiler header files or from the OS
header files. It depends. On Solaris I do have it defined in
/usr/include/iso/limits_iso.h and also GCC 4.2.3 comes with its own
definition in
/usr/local/gcc-4.2.3/lib/gcc/i386-pc-solaris2.11/4.2.3/include/limits.h
Anyway, GCC team has clean up quite a lot of header files for 4.3.x
release so I guess what was included unnecessarily in previous GCC
releases is not included now hence the compilation failure.
Cheers,
Karel
Is just including the limits.h file in fast_array.cc enough? It compiles
when I do that, but is that a valid solution ?
Post by Karel Gardas
Post by EBERSOLD André
Kind regards Andre E.
c++ -I../include -O2 -Wall -Wwrite-strings -fno-strict-aliasing
-D_REENTRANT -D_GNU_SOURCE -DPIC -fPIC -c fast_array.cc -o
fast_array.pic.o
fast_array.cc:51: error: 'UINT_MAX' was not declared in this scope
make[1]: *** [fast_array.pic.o] Error 1
make[1]: Leaving directory `/home/...../.../mico/orb'
make: *** [system] Error 1
bash-3.2$ grep -r UINT_MAX *
orb/fast_array.cc:const unsigned int MICO::__void_array::__EMPTY = UINT_MAX;
bash-3.2$ pwd
/home/aebersol/Builds/mico
bash-3.2$ c++ --version
c++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Here is a patch what I did to solve this:

---
orb/fast_array.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/orb/fast_array.cc b/orb/fast_array.cc
index d2c1272..0e621a7 100644
--- a/orb/fast_array.cc
+++ b/orb/fast_array.cc
@@ -37,6 +37,7 @@

#include <CORBA-SMALL.h>
#include <mico/impl.h>
+#include <limits.h>

#endif // FAST_PCH
--
1.5.6.3
Loading...