Failed to build git/master

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jean-Luc
Posts: 4
Joined: Sat Jan 23, 2016 8:34 am

Failed to build git/master

Post by jean-Luc »

Hi,

I use to build regularily git/master.
But since a couple of days, it failed.

cmake seems to be happy (as usual): see the log attached.

But the make command fails with the following:

Scanning dependencies of target Driver
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_SMDS_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_SMESHDS_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_Document.cpp.o
make[2]: *** No rule to make target '/usr/lib/libfreeimage.so', needed by 'lib/libDriver.so'. Stop.
CMakeFiles/Makefile2:304: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I run debian sid (with some parts frome experimental).

Thanks for helping me to sort this out.

Regards

Jean-Luc
Attachments
freecad-git-cmakelog.txt
(10.76 KiB) Downloaded 41 times
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Failed to build git/master

Post by yorik »

jean-Luc wrote:make[2]: *** No rule to make target '/usr/lib/libfreeimage.so', needed by 'lib/libDriver.so'. Stop.
This file is missing on your system (I know, the error message is not very obvious... It took me time to figure out). I think the package that contains it must be libfreeimage-dev (files in /usr/lib are usually in the -dev packages)
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Failed to build git/master

Post by yorik »

Aha, just bumping into the same bug now. That file is no more in /usr/lib but has been moved to /usr/lib/x86_64-linux-gnu. Apparently there is a hard-coded path somewhere, but this is not a direct dependency of freecad, not sure which package causes this.

You can solve this provisorily with this:

Code: Select all

sudo ln -s /usr/lib/x86_64-linux-gnu/libfreeimage.so /usr/lib
jean-Luc
Posts: 4
Joined: Sat Jan 23, 2016 8:34 am

Re: Failed to build git/master

Post by jean-Luc »

I use debian.
And they put architecture dependent libs in that sub dir.
I've ssen an update of libfreeimage on january 18th.

libfreeimage-dev:amd64 3.15.4-6 -> 3.17.0+ds1-1
libfreeimage3:amd64 3.15.4-6 -> 3.17.0+ds1-1

So I suppose it is the root of the problem.

But cmake should be able – when correctly instructed - to manage this kind of situation.

Thanks and regards

Jean-Luc
Claude Safon
Posts: 7
Joined: Sun Nov 16, 2014 3:37 pm

Re: Failed to build git/master

Post by Claude Safon »

For me, "libfreeimage.so" is right in "/usr/lib" (and not in my "/usr/lib/i386-linux-gnu/")
But I have a similar problem with OCCT (I am newby on this forum and don't know if Ihave to create a new thread):

cmake is also happy (it seems!):
Found OCC include and library (and the version 7.0.0 from StandardVersion.hxx after correcting a bug (??) -that was a thing cmake will be able to do also- but it is an other subject)
Make does the first for compilations, ... but not the link of the first target (I think it's a general problem, ... I don't see):
(I have some warning, you can see, but I don't understand a relation with)
All the requested TK* libraries are in the specified directory (/home/cs/occt/occt-d573adc-build/lin32/gcc/lib) with three forms:
libTK*.so, libTK*.so.7, libTK*.so.7.0.0

cs@cs-Aspire-5520:~/free-cad-code$ cmake -DFREECAD_USE_EXTERNAL_PIVY=1 -DOCC_DIR=/home/cs/occt/occt-d573adc-build -DOCC_INCLUDE_DIR=/home/cs/occt/occt-d573adc-build/inc -DOCC_LIBRARY=/home/cs/occt/occt-d573adc-build/lin32/gcc/lib -DCOIN3D_LIBRARY=/usr/lib/i386-linux-gnu -DCOIN3D_INCLUDE_DIR=/home/cs/coin/coin-build/include/Inventor
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- filesystem
-- program_options
-- regex
-- signals
-- system
-- thread
-- Found Xerces-C: /usr/lib/i386-linux-gnu/libxerces-c.so
-- PyCXX found:
-- Headers: /home/cs/free-cad-code/src
-- Sources: /home/cs/free-cad-code/src/CXX
-- Found OCC: /home/cs/occt/occt-d573adc-build/inc (found version "7.0.0")
-- -- Found OCE/OpenCASCADE version: 7.0.0
-- -- OCE/OpenCASCADE include directory: /home/cs/occt/occt-d573adc-build/inc
-- -- OCE/OpenCASCADE shared libraries directory: /home/cs/occt/occt-d573adc-build/lin32/gcc
-- libshiboken built for Release
-- Found PySide Tools: /usr/bin/pyside-uic, /usr/bin/pyside-rcc
-- -- matplotlib-1.4.2 has been found.
-- Platform is 32-bit
-- Build type:
git
/home/cs/free-cad-code/src/Build/Version.h written
-- Note: Doxygen docs will look better with graphviz's dot installed.
-- Coin3D doc is not installed
-- Configuring done
WARNING: Target "FreeCADGuiPy" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "FreeCADMain" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "PointsGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "CompleteGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "QtUnitGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "ImageGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "MeshGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "PartGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "PartDesignGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "RaytracingGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DrawingGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SketcherGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "RobotGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "ReverseEngineeringGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "MeshPartGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "WebGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "StartGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "ImportGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "InspectionGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "FemGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SpreadsheetGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "PathGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "FreeCADGui" requests linking to directory "/usr/lib/i386-linux-gnu". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/cs/free-cad-code
cs@cs-Aspire-5520:~/free-cad-code$ make
Scanning dependencies of target Driver
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_SMDS_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_Document.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_SMESHDS_Mesh.cpp.o
Linking CXX shared library ../../../lib/libDriver.so
/usr/bin/ld: ne peut trouver -lTKFillet
/usr/bin/ld: ne peut trouver -lTKMesh
/usr/bin/ld: ne peut trouver -lTKernel
...
/usr/bin/ld: ne peut trouver -lTKMeshVS
collect2: error: ld returned 1 exit status
src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/build.make:160: recipe for target 'lib/libDriver.so' failed
make[2]: *** [lib/libDriver.so] Error 1
CMakeFiles/Makefile2:289: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all] Error 2
Makefile:106: recipe for target 'all' failed
make: *** [all] Error 2
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: Failed to build git/master

Post by f3nix »

Hi,
jean-Luc wrote:Hi,

I use to build regularily git/master.
But since a couple of days, it failed.

cmake seems to be happy (as usual): see the log attached.

But the make command fails with the following:

Scanning dependencies of target Driver
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_SMDS_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_SMESHDS_Mesh.cpp.o
[ 0%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/src/Driver/Driver_Document.cpp.o
make[2]: *** No rule to make target '/usr/lib/libfreeimage.so', needed by 'lib/libDriver.so'. Stop.
CMakeFiles/Makefile2:304: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I run debian sid (with some parts frome experimental).

Thanks for helping me to sort this out.

Regards

Jean-Luc
yorik wrote:Aha, just bumping into the same bug now. That file is no more in /usr/lib but has been moved to /usr/lib/x86_64-linux-gnu. Apparently there is a hard-coded path somewhere, but this is not a direct dependency of freecad, not sure which package causes this.

You can solve this provisorily with this:

Code: Select all

sudo ln -s /usr/lib/x86_64-linux-gnu/libfreeimage.so /usr/lib
To solve this build problem you have to rebuild OCE. It depends on libfreeimage.

HTH.

Cheers,
Mateusz
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Failed to build git/master

Post by jmaustpc »

f3nix wrote:To solve this build problem you have to rebuild OCE. It depends on libfreeimage.

HTH.

Cheers,
Mateusz
hello all

To be accurate OCE does not necessarily depend on freeimage, by default it does not, when compiling from OCE source, the package may depend because it has been compile with that option enabled (I always enable it when I compile OCE...I can't renumber exactly why :) ) but be default OCE does not select the cmake option to compile with FreeImage, here is a picture of Cmake-Gui with its first configure run through that uses all default values. As you can see Freeimage is not ticked.

Jim
cmakegui_ocedefaults.jpeg
cmakegui_ocedefaults.jpeg (91.28 KiB) Viewed 2107 times
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: Failed to build git/master

Post by f3nix »

Hi Jim! :)
jmaustpc wrote:
f3nix wrote:To solve this build problem you have to rebuild OCE. It depends on libfreeimage.

HTH.

Cheers,
Mateusz
hello all

To be accurate OCE does not necessarily depend on freeimage, by default it does not, when compiling from OCE source, the package may depend because it has been compile with that option enabled (I always enable it when I compile OCE...I can't renumber exactly why :) ) but be default OCE does not select the cmake option to compile with FreeImage, here is a picture of Cmake-Gui with its first configure run through that uses all default values. As you can see Freeimage is not ticked.

Jim
You are right! :) But in this particular build failure OCE _has been_ built with FreeImage support.

That's why I wrote:
To solve _this_ build problem you have to rebuild OCE. It _depends_ on libfreeimage.

Cheers,
Mateusz
Post Reply