Ubuntu instructions lead to missing libboost-python-dev

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Ubuntu instructions lead to missing libboost-python-dev

Post by chennes »

I don't know if this is a problem with the instructions on the Wiki, or with the way the dependencies are set up screwing something up, or with me screwing something up, but twice this week I've installed FreeCAD on Ubuntu-based systems following the instructions here. The steps:

Code: Select all

sudo add-apt-repository --enable-source ppa:freecad-maintainers/freecad-daily && sudo apt-get update
sudo apt-get build-dep freecad-daily
sudo apt-get install freecad-daily
do not install libboost-python-dev, which must be manually installed in order for CMake to succeed. Is this a missing step in the wiki, or a problem with the Freecad-daily dependencies? Or a problem with these machines?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ubuntu instructions lead to missing libboost-python-dev

Post by sgrogan »

FreeCAD can use libboost-python or Pybind11
The PPA uses the second. You need to add the additional CMake flag

Code: Select all

-DFREECAD_USE_PYBIND11=ON
if using Pybind11
"fight the good fight"
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ubuntu instructions lead to missing libboost-python-dev

Post by chennes »

sgrogan wrote: Tue Dec 15, 2020 6:37 pm if using Pybind11
So then should I update the Wiki instructions to say:

Code: Select all

#!/bin/sh
sudo add-apt-repository --enable-source ppa:freecad-maintainers/freecad-daily && sudo apt-get update
sudo apt-get build-dep freecad-daily
sudo apt-get install freecad-daily

git clone https://github.com/FreeCAD/FreeCAD.git freecad-source
mkdir freecad-build
cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DFREECAD_USE_PYBIND11=ON ../freecad-source
make -j$(nproc --ignore=2)
or would it be better to:

Code: Select all

#!/bin/sh
sudo add-apt-repository --enable-source ppa:freecad-maintainers/freecad-daily && sudo apt-get update
sudo apt-get build-dep freecad-daily
sudo apt-get install freecad-daily
sudo apt-get install libboost-python-dev

git clone https://github.com/FreeCAD/FreeCAD.git freecad-source
mkdir freecad-build
cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ../freecad-source
make -j$(nproc --ignore=2)
?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ubuntu instructions lead to missing libboost-python-dev

Post by sgrogan »

chennes wrote: Tue Dec 15, 2020 6:43 pm?
I would favor the first because that is how the PPA binaries are built. But both should be perfectly acceptable.
"fight the good fight"
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ubuntu instructions lead to missing libboost-python-dev

Post by chennes »

sgrogan wrote: Tue Dec 15, 2020 7:08 pm I would favor the first because that is how the PPA binaries are built.
OK, great, I went with that solution. Thanks!
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply