I am running on Lubuntu 16.04, and have both libfreeimage3 and libfreeimage3-dev installed
[ 1%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/src/SMDS/SMDS_VolumeOfNodes.cpp.o
[ 1%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/src/SMDS/SMDS_VolumeTool.cpp.o
make[2]: *** No rule to make target '/usr/lib/libfreeimage.so', needed by 'lib/libSMDS.so'. Stop.
CMakeFiles/Makefile2:416: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
In Ubuntu, there are no links to /usr/lib:
abc@abc-virtual-machine:/mnt/hgfs/git/dev/freecad-bin$ ls /usr/lib/libfreeimage.so
ls: cannot access '/usr/lib/libfreeimage.so': No such file or directory
abc@abc-virtual-machine:/mnt/hgfs/git/dev/freecad-bin$ dpkg -L libfreeimage3
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libfreeimage-3.17.0.so
/usr/share
/usr/share/doc
/usr/share/doc/libfreeimage3
/usr/share/doc/libfreeimage3/copyright
/usr/share/doc/libfreeimage3/changelog.Debian.gz
/usr/lib/x86_64-linux-gnu/libfreeimage.so.3
abc@abc-virtual-machine:/mnt/hgfs/git/dev/freecad-bin$
According to:
https://wiki.ubuntu.com/MultiarchSpec
distributions are moving away from placing libraries directly in /usr/lib
Instead libraries are placed in their own architecture subdirectory:
/usr/lib/<arch>/
So CMakeLists.txt really needs to search for /usr/lib/<arch> by default
CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
No idea where the path /usr/lib is coming from for freeimage. This is a library OCE and nglib uses, FreeCAD doesn't directly link to it. As a workaround for now I think you should create a symlink inside /usr/lib.ls: cannot access '/usr/lib/libfreeimage.so': No such file or directory
Re: CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
Hi kcleung,kcleung wrote: So CMakeLists.txt really needs to search for /usr/lib/<arch> by default
you are probably seeing bug in liboce-visualisation-dev package in action.
https://bugs.launchpad.net/ubuntu/+sour ... ug/1556680
As @wmayer wrote a workaround is to create a symlink.
It is not a problem in FreeCAD's build system.
HTH!
Cheers,
Mateusz
Re: CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
It's been a problem with Debian since past January. viewtopic.php?t=13955#p111466wmayer wrote:No idea where the path /usr/lib is coming from for freeimage.
The latest Ubuntu version is always based on Debian unstable so it got the same bug.
libfreeimage now supports Multi-Arch. But inexplicably as shown in /usr/lib/x86_64-linux-gnu/oce-0.16/OCE04_VisualizationTargets-relwithdebinfo.cmake (from liboce-vizualisation-dev) it is the only library that OCE doesn't recognize as supporting Multi-Arch.
Another fix is to build OCE without freeimage support since FreeCAD does not link to it directly.
One thing I've been wondering Werner, does FreeCAD really need liboce-vizualisation-dev? Since it uses Coin I wouldn't think so...
Re: CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
Debian does not have this problem. 0.17.1 packages are good. The issue you link above was related to package transitions: oce 0.15 to 0.17 and libfreeimage in Debian.NormandC wrote:It's been a problem with Debian since past January. viewtopic.php?t=13955#p111466wmayer wrote:No idea where the path /usr/lib is coming from for freeimage.
The latest Ubuntu version is always based on Debian unstable so it got the same bug.
libfreeimage now supports Multi-Arch. But inexplicably as shown in /usr/lib/x86_64-linux-gnu/oce-0.16/OCE04_VisualizationTargets-relwithdebinfo.cmake (from liboce-vizualisation-dev) it is the only library that OCE doesn't recognize as supporting Multi-Arch.
I hope this clears things up.
Cheers,
Mateusz
Re: CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
Sorry to disagree, but it has not been fixed in Jessie-backports.f3nix wrote:Debian does not have this problem. 0.17.1 packages are good.
I checked the contents of liboce-visualization-dev_0.17.1-1~bpo8+1_amd64.deb.
https://packages.debian.org/jessie-back ... zation-dev
Here's the content of /usr/lib/x86_64-linux-gnu/oce-0.16/OCE04_VisualizationTargets-relwithdebinfo.cmake:
Code: Select all
# Import target "TKService" for configuration "RelWithDebInfo"
set_property(TARGET TKService APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(TKService PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "TKMath;TKernel;TKBRep;TKShHealing;TKGeomBase;TKGeomAlgo;TKG2d;TKG3d;TKTopAlgo;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/libfreeimage.so"
Re: CMake fails to search for /usr/lib/<arch> so fails to build Salome Mesh
NormandC wrote:Sorry to disagree, but it has not been fixed in Jessie-backports.f3nix wrote:Debian does not have this problem. 0.17.1 packages are good.
I checked the contents of liboce-visualization-dev_0.17.1-1~bpo8+1_amd64.deb.
https://packages.debian.org/jessie-back ... zation-dev
Here's the content of /usr/lib/x86_64-linux-gnu/oce-0.16/OCE04_VisualizationTargets-relwithdebinfo.cmake:Code: Select all
# Import target "TKService" for configuration "RelWithDebInfo" set_property(TARGET TKService APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) set_target_properties(TKService PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "TKMath;TKernel;TKBRep;TKShHealing;TKGeomBase;TKGeomAlgo;TKG2d;TKG3d;TKTopAlgo;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/libfreeimage.so"
https://packages.debian.org/jessie/amd6 ... 3/filelist
libfreeimage is under /usr/lib in Jessie.
https://anonscm.debian.org/cgit/debian- ... bian/rules sets:NormandC wrote: The testing and unstable packages are simply built without freeimage support and the link to /usr/lib/libfreeimage.so does not appear anymore.
Code: Select all
-DOCE_WITH_FREEIMAGE:BOOL=ON
Code: Select all
libfreeimage-dev
But the build log does not have "-DHAVE_FREEIMAGE" and the CMake configure step does not complain about not finding freeimage.
Is it a bug that fixes a bug?
Cheers,
Mateusz