trying to build 3.14.0 on linux but I'm running into errors. First I got the
following:
Source/FreeImageToolkit/Background.cpp:138: error: 'UINT_MAX' was not declared
in this scope
Seems limits.h isn't included correctly? I added #include <limits.h> to the
file which sorted that error out, but it lead to another...
Source/OpenEXR/Imath/ImathMatrix.h:1813: error: 'memset' was not declared in
this scope
It seems I'm doing something wrong running into all these errors... any ideas
what it might be? I'm a bit of a linux n00b. I'm using gcc 4.4.3 on ubuntu
10.04 x64.
For the record, compiling on windows went smooth.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By including <climits> in Background.cpp and <cstring> in IlmathMatrix.h I've
successfully compiled it. Hopefully the OpenEXR folks can fix it upstream...
Anyway, thanks for the quick response and for a sweet library :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is strange that this problem wasn't reported earlier !
I've looked at the gcc 4.3 release notes and I think that changes added by
this version will affect many Open Source libraries.
Can you provide the complete list of errors reported by your compiler ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After adding the two includes as mentioned above it compiled fine (just your
average bunch of warnings), so it seems it's only those two files which were
affected.
Like I said, I'm a linux n00b, so I felt I was heading up the wrong track when
I got an error after fixing the first one...
For completeness here are the two errors:
g++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibMNG -ISource/LibPNG -ISource/LibTIFF -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -fPIC -c Source/FreeImageToolkit/Background.cpp -o Source/FreeImageToolkit/Background.o
Source/FreeImageToolkit/Background.cpp: In function ‘int GetPaletteIndex(FIBITMAP*, const RGBQUAD*, int, FREE_IMAGE_COLOR_TYPE*)’:
Source/FreeImageToolkit/Background.cpp:140: error: ‘UINT_MAX’ was not declared in this scope
make[1]: *** [Source/FreeImageToolkit/Background.o] Error 1
make[1]: Leaving directory `/home/lordcrc/FreeImage'
make: *** [default] Error 2
g++ -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibMNG -ISource/LibPNG -ISource/LibTIFF -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -fPIC -c Source/OpenEXR/./IlmImf/ImfChromaticities.cpp -o Source/OpenEXR/./IlmImf/ImfChromaticities.o
In file included from Source/OpenEXR/IlmImf/ImfChromaticities.h:47,
from Source/OpenEXR/./IlmImf/ImfChromaticities.cpp:43:
Source/OpenEXR/Imath/ImathMatrix.h: In constructor ‘Imath::Matrix44<T>::Matrix44() [with T = float]’:
Source/OpenEXR/./IlmImf/ImfChromaticities.cpp:110: instantiated from here
Source/OpenEXR/Imath/ImathMatrix.h:1815: error: ‘memset’ was not declared in this scope
make[1]: *** [Source/OpenEXR/./IlmImf/ImfChromaticities.o] Error 1
make[1]: Leaving directory `/home/lordcrc/FreeImage'
make: *** [default] Error 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can confirm the need to "including <climits> in Background.cpp" for windows
mingw (some late release was it...).
Have not tested the whole 3.14, just dw selected files form CVS, but most
certainly the other include will also pop out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"We added the fixes so you should be ok to build from the head of the cvs
tree. We hope to roll out 1.7.1 in the coming weeks with these, and other,
fixes in there."
Otherwise 3.14.1 compiles without problems.
(Windows mingw gcc 4.4, not using Makefile.mingw, VS import instead)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
trying to build 3.14.0 on linux but I'm running into errors. First I got the
following:
Source/FreeImageToolkit/Background.cpp:138: error: 'UINT_MAX' was not declared
in this scope
Seems limits.h isn't included correctly? I added #include <limits.h> to the
file which sorted that error out, but it lead to another...
Source/OpenEXR/Imath/ImathMatrix.h:1813: error: 'memset' was not declared in
this scope
It seems I'm doing something wrong running into all these errors... any ideas
what it might be? I'm a bit of a linux n00b. I'm using gcc 4.4.3 on ubuntu
10.04 x64.
For the record, compiling on windows went smooth.
I've tested the compilation with gcc 4.1.2 under a Debian 4.0 x32 : all is OK
for me.
Sorry but I don't know what could be the problem ...
Seems the problem is that GCC 4.3 is much stricter on proper include use. For
the OpenEXR error see http://www.mail-archive.com/openexr-
devel@nongnu.org/msg00812.html
I suspect this is the issue with the Background.cpp as well.
By including <climits> in Background.cpp and <cstring> in IlmathMatrix.h I've
successfully compiled it. Hopefully the OpenEXR folks can fix it upstream...
Anyway, thanks for the quick response and for a sweet library :)
I want to report that this problem is real! I had it too. On Debian GNU/Linux
5.0.5 and gcc (Debian 4.3.2-1.1) 4.3.2.
This is strange that this problem wasn't reported earlier !
I've looked at the gcc 4.3 release notes and I think that changes added by
this version will affect many Open Source libraries.
Can you provide the complete list of errors reported by your compiler ?
After adding the two includes as mentioned above it compiled fine (just your
average bunch of warnings), so it seems it's only those two files which were
affected.
Like I said, I'm a linux n00b, so I felt I was heading up the wrong track when
I got an error after fixing the first one...
For completeness here are the two errors:
I can confirm the need to "including <climits> in Background.cpp" for windows
mingw (some late release was it...).
Have not tested the whole 3.14, just dw selected files form CVS, but most
certainly the other include will also pop out.
Contacted OpenEXR, about the issue, they said:
"We added the fixes so you should be ok to build from the head of the cvs
tree. We hope to roll out 1.7.1 in the coming weeks with these, and other,
fixes in there."
Otherwise 3.14.1 compiles without problems.
(Windows mingw gcc 4.4, not using Makefile.mingw, VS import instead)
Thanks for the update!