CMake not finding boost_python

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Chip
Posts: 2
Joined: Mon Sep 28, 2015 2:40 pm

CMake not finding boost_python

Post by Chip »

I'm trying to compile FreeCAD on windows. I have VS 2013 installed.

I've been trying to follow the instructions on http://www.freecadweb.org/wiki/?title=CompileOnWindows

I've downloaded from Git the FreeCAD source

I've downloaded from sourceforge FreeCADLibs_11.1_x64_VC12 and unzipped it into a folder in my FreeCAD folder.

I ran configure in CMake and as expected it generated an error saying that FREECAD_LIBPACK_DIR was not set. I fixed that error. (No problem)

I ran configure in CMake again but now it fails with the error:

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message):
Unable to find the requested Boost libraries.

Boost version: 1.55.0

Boost include path: E:/FreeCAD/FreeCADLibs_11.1_x64_VC12/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:11 (find_package)


CMake does not display variables BOOST_LIBRARYDIR or BOOST_ROOT. Do these need to be set as environmental variables? If so what are the correct values? I searched my libpack folders and could not find any files boost_python. Any help with this greatly appreciated.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: CMake not finding boost_python

Post by sgrogan »

Hello Chip! Welcome to FreeCAD and the forum. :D
Boost Python is a new dependency that's not in the libpack.
Unzip the attached and place the .dll files in the libpack bin folder, place the .lib files in the libpack lib folder, and re-run cmake
BoostPython.7z
(227.87 KiB) Downloaded 619 times
EDIT: This is x64 version of boost python. See here: viewtopic.php?f=4&t=12631#p101315 for x86 version.
Last edited by sgrogan on Wed Feb 03, 2016 9:28 pm, edited 1 time in total.
"fight the good fight"
Chip
Posts: 2
Joined: Mon Sep 28, 2015 2:40 pm

Re: CMake not finding boost_python

Post by Chip »

Thanks Sgrogan,

Adding those BoostPython files fixed the problem. Good news, I've successfully:

1) run cmake creating my FreeCAD_trunk.sln
2) run build on ALL_BUILD with success on every project
3) switched my startup app to FreeCADMain project
4) launched FreeCad_d.exe in the debugger.

Now to actually start learning the code, and maybe even find some small tasks to take on!

Thanks again,

Chip
boodorgad
Posts: 2
Joined: Sun Nov 08, 2015 6:26 am

Re: CMake not finding boost_python

Post by boodorgad »

Hi there

I had exactly the same Problem as described by Chip :
-Win7
-current Source form git
-FreeCADLibs_11.1_x64_VC12
-IDE=VS2013 Express
-Cmake=3.xx

With the BoostPython.7z files from Sgrogan i'm also able to run cmake and build the Project successfully in VS but if i try to launch the FreeCAD.exe(release x64) the following Error occours:

".... boost_regex-vc120-mt-1_55.dll is missing ..."

Does anyone has this dll and may attach it to this thread? (Or even better, upload a new complete working FreeCADLib package?)

Thanks
Boodorgad
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: CMake not finding boost_python

Post by sgrogan »

boost_regex-vc120-mt-1_55.dll should be in the bin directory of the Libpack.
Did you copy the contents of the bin folder of the Libpack to the bin folder in the build directory?
"fight the good fight"
boodorgad
Posts: 2
Joined: Sun Nov 08, 2015 6:26 am

Re: CMake not finding boost_python

Post by boodorgad »

Thanks for the Answer.

You're right, the dll is in the LibPack.
I use now cmake 3.3.2 instead of 3.4.0rc(3.4 copy the Libpack automatically into the buildfolder?) and after i copy the Libpack\bin folder content manually into the build\bin directory the FreeCAD.exe runs!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: CMake not finding boost_python

Post by sgrogan »

boodorgad wrote:(3.4 copy the Libpack automatically into the buildfolder?)
No Cmake won't copy the Libpack folders automatically, you must do this manually.
"fight the good fight"
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: CMake not finding boost_python

Post by damian »

Hola:

I'm having the same issue, in Ubuntu 14.04

Building out-of-source, when I execute cmake:

Code: Select all

-- Build type:
git
/home/damian/freecad-build/src/Build/Version.h written
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.54.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:11 (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!
Gracias
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: CMake not finding boost_python

Post by jmaustpc »

damian wrote:Hola:

I'm having the same issue, in Ubuntu 14.04
Have you installed the matching dev packages? E.g. libboost-python1.54 and libboost-python1.54-dev
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: CMake not finding boost_python

Post by damian »

I had not libboost-python1.54-dev

now is compiling ...

thank you very much jmaustpc
Post Reply