LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-16-2018, 05:58 AM   #1
Sefid par
Member
 
Registered: Jul 2013
Location: Iran, Shiraz
Distribution: Ubuntu
Posts: 130

Rep: Reputation: 26
FreeImage Compile Problem in Current


While compiling FreeImage 3.17 from slackbuild, got the following error:

Code:
g++ -O2 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/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,
                 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++/8.2.0/memory:80,
                 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++/8.2.0/bits/unique_ptr.h:53:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from Source/LibRawLite/libraw/libraw.h:40,
                 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++/8.2.0/memory:80,
                 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++/8.2.0/bits/unique_ptr.h:53: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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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++/8.2.0/cmath:45,
                 from /usr/include/c++/8.2.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::phase_one_correct()’:
Source/LibRawLite/./internal/dcraw_common.cpp:1721:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [Makefile.gnu:64: Source/LibRawLite/./internal/dcraw_common.o] Error 1
make[1]: Leaving directory '/tmp/SBo/FreeImage'
make: *** [Makefile:21: default] Error 2
How Can I solve that?
 
Old 10-16-2018, 10:35 AM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Looks like you need the -Wnarrowing flag to prevent the errors. You can add it to the end of the CXXFLAGS variable.

But this change has already been made on ponce's unofficial SBo repo for -current. SBo is only designed to work against the latest stable release and a lot of packages won't build on -current without modifications. ponce has been maintaining an unofficial version of SBo that is designed to work with -current, and you really should be using that for any packages you want to compile.

Also, to keep things together, it is preferred to post any issues with software from his repo not compiling on -current in this sticky thread (after ensuring you read the first post).
 
  


Reply

Tags
compile error, slackware -current, slackware-live



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] loading a *.bmp w/ FreeImage piobair Programming 10 11-11-2014 02:59 PM
[SOLVED] smc with CEGUI + freeimage (CEGUI Scheme exception occurred) Mol_Bolom Slackware 1 08-21-2010 11:25 AM
[SOLVED] Can't compile linuxwacom on 64 -current em21701 Slackware 7 05-16-2010 08:03 PM
[SOLVED] Firefox fails to compile on -current Daedra Slackware 7 01-16-2010 09:08 PM
cannot compile programs in -current w/ 2.6.x zefo Slackware 7 04-29-2006 03:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration