Version 3170 fails build on LibRawLite using glibc-2.27 with the following;
mmon/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/LibRawLite/./internal/dcraw_common.cpp -o Source/LibRawLite/./internal/dcraw_common.o
In file included from Source/LibRawLite/libraw/libraw.h:40:0,
from Source/LibRawLite/./internal/dcraw_common.cpp:29:
Source/LibRawLite/libraw/libraw_datastream.h:96:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<std::streambuf> f; / will close() automatically through dtor /
^~~~~~~~
In file included from /usr/include/c++/7.3.0/memory:80:0,
from Source/LibRawLite/libraw/libraw_datastream.h:38,
from Source/LibRawLite/libraw/libraw.h:40,
from Source/LibRawLite/./internal/dcraw_common.cpp:29:
/usr/include/c++/7.3.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
In file included from Source/LibRawLite/libraw/libraw.h:40:0,
from Source/LibRawLite/./internal/dcraw_common.cpp:29:
Source/LibRawLite/libraw/libraw_datastream.h:97:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<std::streambuf> saved_f; / when f is a subfile, saved_f is the master file /
^~~~~~~~
In file included from /usr/include/c++/7.3.0/memory:80:0,
from Source/LibRawLite/libraw/libraw_datastream.h:38,
from Source/LibRawLite/libraw/libraw.h:40,
from Source/LibRawLite/./internal/dcraw_common.cpp:29:
/usr/include/c++/7.3.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'void LibRaw::vng_interpolate()':
Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
}, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
^
Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of '136' from 'int' to 'signed char' inside { } [-Wnarrowing]
Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of '136' from 'int' to 'signed char' inside { } [-Wnarrowing]
Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of '136' from 'int' to 'signed char' inside { } [-Wnarrowing]
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'void LibRaw::process_Sony_0x9050(uchar, unsigned int)':
Source/LibRawLite/./internal/dcraw_common.cpp:6382:88: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[0]] / 8.0 - 1.06f) / 2.0f)10.0f) / 10.0f;
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp:6386:88: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
my_roundf(powf64(2.0f, ((float)SonySubstitution[buf[1]] / 8.0 - 1.06f) / 2.0f)10.0f) / 10.0f;
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'void LibRaw::parse_makernote_0xc634(int, int, unsigned int)':
Source/LibRawLite/./internal/dcraw_common.cpp:6808:71: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp:6940:97: error: call of overloaded 'powf64(int, int)' is ambiguous
10(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'void LibRaw::parse_makernote(int, int)':
Source/LibRawLite/./internal/dcraw_common.cpp:7620:71: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
imgdata.lens.makernotes.CurAp = powf64(2.0f, getreal(type)/2);
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp:7812:97: error: call of overloaded 'powf64(int, int)' is ambiguous
10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp:8092:63: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
iso_speed = int(100.0 * powf64(2.0f,float(cc)/12.0-5.0));
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'void LibRaw::parse_exif(int)':
Source/LibRawLite/./internal/dcraw_common.cpp:8551:68: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'int LibRaw::parse_tiff_ifd(int)':
Source/LibRawLite/./internal/dcraw_common.cpp:9174:66: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
imgdata.lens.EXIF_MaxAp = powf64(2.0f, (getreal(type) / 2.0f));
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp: In member function 'void LibRaw::parse_phase_one(int)':
Source/LibRawLite/./internal/dcraw_common.cpp:10163:77: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
else imgdata.lens.makernotes.CurAp = powf64(2.0f, (getreal(type)/2.0f));
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp:10179:85: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
imgdata.lens.makernotes.MaxAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
Source/LibRawLite/./internal/dcraw_common.cpp:10186:85: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
imgdata.lens.makernotes.MinAp4CurFocal = powf64(2.0f, (getreal(type) / 2.0f));
^
In file included from /usr/include/c++/7.3.0/cmath:45:0,
from /usr/include/c++/7.3.0/math.h:36,
from Source/LibRawLite/./internal/dcraw_common.cpp:24:
/usr/include/bits/mathcalls.h:140:1: note: candidate 1: Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (_Mdouble __x, Mdouble __y));
^
Source/LibRawLite/./internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
make[1]: *** [Makefile.gnu:64: Source/LibRawLite/./internal/dcraw_common.o] Error 1
make[1]: Leaving directory '/usr/src/FreeImage'
make: *** [Makefile:21: default] Error 2</typename></std::streambuf></class></typename></std::streambuf></class>
The attached patch fixes the build for me.
Hi,
FreeImage now uses LibRaw 0.19, so check that your problem is resolved using this new version.
see
https://sourceforge.net/p/freeimage/svn/HEAD/tree/FreeImage/
Hervé
Fixed in release 3.18.0