trouble building from source

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

trouble building from source

Post by freman »

Hi,

I'm using Fedora 29. I wanted to try assembly3 and had build problems, so I thought a good start would be build master. I had exactly the same problem so just as well I did not bug folks at ass3.

I have googled and found I'm not alone. There seems to be a mountain to climb before finding the right incantations to get FreeCAD to build. I'm sure someone here can put me straight.

The basic problem appears to be boost-python. My latest attempt at specifying helper env-vars did not seem to change the original problem from a straight cMake but this is what I used.

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=/usr -DBOOST_LIBRARYDIR=/usr/lib64 -DBOOST_INCLUDEDIR=/usr/include/  .
-- Compiler: GNU, version: 8.2.1
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   signals
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found Xerces-C: /usr/lib64/libxerces-c.so
So it is finding boost in general and most of the boosty bits. Then it reports that it could not find Boost ( which is wrong , it did ). It also claims "No Boost libraries were found." , another lie.

Code: Select all

-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- Could NOT find Boost
-- Could NOT find Boost
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:2044 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.66.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:

          boost_python

  No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
Call Stack (most recent call first):
  src/Mod/Path/libarea/CMakeLists.txt:26 (find_package)


-- area module (for Path Workbench) will be installed to: /usr/local/lib
-- Coin3D doc is not installed
=======================================
Now run 'make' to build FreeCAD
=======================================

-- Configuring incomplete, errors occurred!
See also "/svn/FreeCAD-LinkStage3/CMakeFiles/CMakeOutput.log".
See also "/svn/FreeCAD-LinkStage3/CMakeFiles/CMakeError.log".
bash-4.4#make
make: *** No targets specified and no makefile found.  Stop.
boost_python is present in the expected path:

Code: Select all

ls -ail /usr/lib64/libboost_python.so.1.66.0
496968 -rwxr-xr-x. 1 root root 314576 Jul 18 17:33 /usr/lib64/libboost_python.so.1.66.0
What do I need to do for cMake to find it ??

Many thanks.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: trouble building from source

Post by NormandC »

Can't help with compiling, but if all you wanted to do was try out Assembly3, why didn't you download the AppImage?

Besides, this has nothing to do with development, you should have posted in Install / Compile rather than the Developers corner forum.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: trouble building from source

Post by PrzemoF »

You compile in the tree? Try to do:

Code: Select all

mkdir build
cd build
cmake ../
Also if all you need for now is an up to date FreeCAD for fedora 29 you can get it here: [1]. You can find builds logs there as well. If you're interested in supporting fedora builds I can get you invited to the group [2]/. Also we have fedora spec file that you can use to build FreeCAD locally. All you need to do is change:

Code: Select all

Release:        {{{ git_commits_no }}}
to

Code: Select all

Release:        number_here
unless you want to play with rpkg. And with that change you can build FreeCAD with:

Code: Select all

rpmbuild -bb SPECS/freecad.spec
You need to have rpm build tree setup for that.
Also there is a build script [4] (bottom of page) - it needs to be updated, so I'm not sure if it works right now. [update to fedora 27/28/29 is work in progress]

[1] https://copr.fedorainfracloud.org/coprs ... d/nightly/
[2] https://copr.fedorainfracloud.org/group ... cad/coprs/
[3] https://github.com/FreeCAD/FreeCAD/blob ... eecad.spec
[4] https://www.freecadweb.org/wiki/CompileOnUnix
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: trouble building from source

Post by freman »

Thanks for all that info.

I have followed the out of tree method with a clean unzip which I pulled from github after your last mod. to address the issue I signalled.

I get exactly the same error.

Code: Select all

ldd `which FreeCAD`
	linux-vdso.so.1 (0x00007ffe6a3c4000)
	libmpi_cxx.so.20 => not found
	libmpi.so.20 => not found
	libFreeCADGui.so => /usr/local/lib/libFreeCADGui.so (0x00007f2f9485c000)
	libFreeCADApp.so => /usr/local/lib/libFreeCADApp.so (0x00007f2f94511000)

......
openmpi is present , why is it not being found?

thx.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: trouble building from source

Post by PrzemoF »

Looks like copr builds on fedora 29 have similar problem:

Code: Select all

-- Checking for one of the modules 'ompi-cxx'
BUILDSTDERR: CMake Warning at CMakeLists.txt:735 (message):
BUILDSTDERR:   mpi.h was not found.  Check for error above.
copr/ fedora 28 shows it in a different way:

Code: Select all

-- Checking for one of the modules 'ompi-cxx'
CMake Warning at CMakeLists.txt:735 (message):
  mpi.h was not found.  Check for error above.
Do you see something like that in cmake output? You can also use cmake-gui and search for mpi (shows missing on my fedora 28).

I'm setting up virtual fedora 29 right now to test it. Latest rpms for fedora 29 are here if you want to test them: https://copr-be.cloud.fedoraproject.org ... 2-freecad/
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: trouble building from source

Post by PrzemoF »

Interesting.. my virtual fedora 29 shows the same thing as copr fedora 28:

Code: Select all

-- Checking for one of the modules 'ompi-cxx'
CMake Warning at CMakeLists.txt:735 (message):
  mpi.h was not found.  Check for error above.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: trouble building from source

Post by PrzemoF »

Installing openmpi and openmpi-devel seems to fix the problem. Can you verify with:

Code: Select all

rpm -Va openmpi openmpi-devel
that you have both properly installed?
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: trouble building from source

Post by freman »

find /usr -iname "mpi.h"
/usr/include/openmpi-x86_64/mpi.h
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: trouble building from source

Post by freman »

Code: Select all

dnf install  openmpi openmpi-devel
Last metadata expiration check: 2:30:51 ago on Thu 29 Nov 2018 11:48:42 GMT.
Package openmpi-2.1.1-14.fc29.x86_64 is already installed.
Package openmpi-devel-2.1.1-14.fc29.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
bash-4.4#rpm -Va openmpi openmpi-devel
I tried dnf remove and dnf install on these two and nothing got fixed.
Last edited by freman on Thu Nov 29, 2018 1:27 pm, edited 1 time in total.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: trouble building from source

Post by PrzemoF »

Same here:

Code: Select all

[p@localhost-live ~]$ find /usr -iname "mpi.h"
/usr/include/openmpi-x86_64/mpi.h
Can you post output of cmake to pasteall.org?
Post Reply