Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build on ubuntu 18.04 #15

Closed
thibaudk opened this issue May 15, 2018 · 11 comments
Closed

failed to build on ubuntu 18.04 #15

thibaudk opened this issue May 15, 2018 · 11 comments

Comments

@thibaudk
Copy link
Member

CMake shows that the found OpenSSL seems to be on the correct version:

-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2n")

yet Ninja fails to build LibRawlite with the following error:

../src/freeimage/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);

@avilleret
Copy link
Member

HI @thibaudk could you pastebin le full log somewhere please ?
libcrypto doesn't seem to be related to your error

thanks

@thibaudk
Copy link
Member Author

Hey @avilleret

here it is

[244/934] Building CXX object CMakeFiles/openFrameworks.dir/src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp.o
FAILED: CMakeFiles/openFrameworks.dir/src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp.o
/usr/bin/c++ -DFREEIMAGE_LIB -DGLEW_NO_GLU -DGLEW_STATIC -DOF_SOUNDSTREAM_RTAUDIO -DOF_SOUND_PLAYER_OPENAL -DOF_USING_GTK -DOF_USING_MPG123 -DOF_VIDEO_CAPTURE_GSTREAMER -DOF_VIDEO_PLAYER_GSTREAMER -DPOCO_STATIC -D__ANSI__ -D__LINUX_ALSA__ -DopenFrameworks_EXPORTS -I../src/openframeworks -I../src/openframeworks/3d -I../src/openframeworks/app -I../src/openframeworks/communication -I../src/openframeworks/events -I../src/openframeworks/gl -I../src/openframeworks/graphics -I../src/openframeworks/math -I../src/openframeworks/sound -I../src/openframeworks/types -I../src/openframeworks/utils -I../src/openframeworks/video -I../src/freeimage/Source -I../src/freeimage/Source/DeprecationManager -I../src/freeimage/Source/LibJPEG -I../src/freeimage/Source/LibOpenJPEG -I../src/freeimage/Source/LibPNG -I../src/freeimage/Source/LibRawLite -I../src/freeimage/Source/LibTIFF4 -I../src/freeimage/Source/LibWebP -I../src/freeimage/Source/OpenEXR -I../src/freeimage/Source/OpenEXR/Half -I../src/freeimage/Source/OpenEXR/Iex -I../src/freeimage/Source/OpenEXR/IexMath -I../src/freeimage/Source/OpenEXR/IlmImf -I../src/freeimage/Source/OpenEXR/IlmThread -I../src/freeimage/Source/OpenEXR/Imath -I../src/glew -I../src/glew/include -I../src/glfw -I../src/glfw/include -I../src/glfw/include/GLFW -I../src/kissfft -I../src/kissfft/tools -I../src/libtess2 -I../src/libtess2/Include -I../src/libtess2/Source -I../src/poco -I../src/poco/Crypto/include -I../src/poco/Foundation/include -I../src/poco/Net/include -I../src/poco/NetSSL_OpenSSL/include -I../src/poco/Util/include -I../src/poco/XML/include -I../src/poco/Zip/include -I../src/rtaudio -I../src/rtaudio/include -I../src/utf8cpp -I../src/utf8cpp/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/AL -I/usr/include/gstreamer-1.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I../src/poco/JSON/include -fdiagnostics-color -std=gnu++14 -O3 -DNDEBUG -Wno-narrowing -Wno-deprecated-declarations -Wno-psabi -fPIC -fPIC -g1 -w -fvisibility=hidden -MD -MT CMakeFiles/openFrameworks.dir/src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp.o -MF CMakeFiles/openFrameworks.dir/src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp.o.d -o CMakeFiles/openFrameworks.dir/src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp.o -c ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h: In member function ‘void LibRaw::process_Sony_0x9050(uchar*, unsigned int)’:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h: In member function ‘void LibRaw::parse_makernote_0xc634(int, int, unsigned int)’:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
../src/freeimage/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/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h: In member function ‘void LibRaw::parse_makernote(int, int)’:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
../src/freeimage/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/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h: In member function ‘void LibRaw::parse_exif(int)’:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h: In member function ‘int LibRaw::parse_tiff_ifd(int)’:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h: In member function ‘void LibRaw::parse_phase_one(int)’:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
In file included from /usr/include/c++/7/cmath:45:0,
from /usr/include/c++/7/math.h:36,
from ../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:24:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: candidate 1: _Float64 powf64(_Float64, _Float64)
__MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
^
../src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp:5546:14: note: candidate 2: float powf64(float, float)
static float powf64(float a, float b)
^~~~~~
[249/934] Building CXX object CMakeFiles/openFrameworks.dir/src/freeimage/Source/LibRawLite/internal/demosaic_packs.cpp.o
ninja: build stopped: subcommand failed.

@avilleret
Copy link
Member

hum... this sounds like a broken dependencie on 18.04
I can't remember if openFrameworks rebuild freeimage form scratch or not, if yes, you should have the same issue when building of with official script on 18.04, could you give it a try ?

I think updating ofnode source to openframeworks 0.10 would be great and could solve this issue, but I doubt it is as simple as copy and paste source file...
I will try to look into that in the next few weeks, any help would be appreciated though :-)

@thibaudk
Copy link
Member Author

thibaudk commented May 16, 2018

Just try it with openframeworks official script 0.9.8 and 0.10,

appart from a couple missing libs, I had no problem building either.
retried ofnode after and exactly the same error appears. could this be an issue of C++ stndard?
I noticed the original openframework source is compile with c++14.

@thibaudk
Copy link
Member Author

A fresh reinstall of ubuntu 18.04 retains the exact same issue.
builds no problem with 17.10 tho. i'll revert back to it for the moment.

@thibaudk
Copy link
Member Author

Indeed, openframeworks official scripts installs the libfreeimage-dev instead of compiling it from scratch.

https://github.com/openframeworks/openFrameworks/blob/master/scripts/linux/ubuntu/install_dependencies.sh#L178

@thibaudk
Copy link
Member Author

thibaudk commented May 26, 2018

Installing libfreeimage-dev and Commenting out all references to /source/Freeimage in both CMakeLists.txt and OpenFameworks.cmake allows for a succesfull build.

The problem appears when linking an example.

of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetHeight »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_ConvertTo24Bits »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_ConvertTo32Bits »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_LoadFromMemory »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetColorType »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetFIFFromFilename »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetBPP »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_CloseMemory »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_Initialise »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_DeInitialise »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetImageType »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetWidth »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_ConvertToType »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetFileTypeFromMemory »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_ColorQuantize »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_AllocateT »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_IsTransparent »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_Save »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_AcquireMemory »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_SaveToMemory »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetFileType »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_Load »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_OpenMemory »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_ConvertToGreyscale »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_FlipVertical »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_GetPitch »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_Rescale »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_ConvertTo8Bits »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_Unload »
/home/scrime/Documents/repos/of/lib-linux/release-x86_64-64/libopenFrameworks.so : référence indéfinie vers « FreeImage_FIFSupportsReading »

It will need further tweaking

@MaxWorgan
Copy link

I just deleted the offending definition of powf64 in src/freeimage/Source/LibRawLite/internal/dcraw_common.cpp
🤷‍♂️

@thibaudk
Copy link
Member Author

thibaudk commented Jun 9, 2018

Can't believe I dindn't try that!
Thanks a lot @MaxWorgan it now works perfectly on Ubuntu Studio 18.04.

@avilleret would you like me to do a pr? We have also added a couple other libs for camera addons and usb control and updated the install script for Ubuntu. we can also imagine adding @bltzr 's ofxOscQuery addon to the default addons?

@thibaudk thibaudk closed this as completed Jun 9, 2018
@avilleret
Copy link
Member

yes PR are welcome ! I can give you direct access to the repo also

and note that there are patches here : https://github.com/ofnode/of/tree/master/dev/patches I think your changes can goes here in addition to the source file

concerning third-party addon, and particularly ofxOscQuery, it adds more dependency and I'm not sure it's a good idea :-)

@luisfl
Copy link

luisfl commented Dec 16, 2022

I still have the same problem in Fedora 36. LibRaw from Github does not compile, with the very same error:

internal/dcraw_common.cpp: In member function ‘void LibRaw::PentaxLensInfo(unsigned int, unsigned int)’:
internal/dcraw_common.cpp:6327:64: error: call of overloaded ‘powf64(int, int)’ is ambiguous
6327 | 10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);

I solved this by duplicating the function definition as powf64(int,int).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants