New Docker Image For Aevelopment Attempt Getting Fail

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
davidvilly
Posts: 1
Joined: Wed Feb 01, 2023 7:01 am

New Docker Image For Aevelopment Attempt Getting Fail

Post by davidvilly »

Hello, I am trying to build and run FreeCAD for development but it really has been a struggle to even get it to run locally. I decided to update the existing Docker image using Debian and so far this is the error I am getting when building.

Code: Select all

-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   python37
-- found Boost: 1_67
-- boost-incude dirs are: /usr/include
-- boost-python lib is: 
-- boost_LIBRARY_DIRS is: /usr/lib/aarch64-linux-gnu
-- Boost_LIBRARIES is: /usr/lib/aarch64-linux-gnu/libboost_python37.so
-- area module (for Path Workbench) will be installed to: lib
-- /mnt/build/src/Mod/Path/PathSimulator/App/PathSimPy.cpp
-- /mnt/build/src/Mod/Points/App/PointsPy.cpp
-- /mnt/build/src/Mod/Robot/App/Robot6AxisPy.cpp
-- /mnt/build/src/Mod/Robot/App/TrajectoryPy.cpp
-- /mnt/build/src/Mod/Robot/App/WaypointPy.cpp
-- /mnt/build/src/Mod/Robot/App/RobotObjectPy.cpp
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
CMake Error at src/Mod/Sandbox/Gui/CMakeLists.txt:40 (fc_wrap_cpp):
  Unknown CMake command "fc_wrap_cpp". 


-- Configuring incomplete, errors occurred!
See also "/mnt/build/CMakeFiles/CMakeOutput.log". 
See also "/mnt/build/CMakeFiles/CMakeError.log".
I honestly have no clue what this is related to and searching online only yields a 3-year-old thread that doesn't specify a solution. Any help here?
Last edited by davidvilly on Thu Feb 09, 2023 4:18 am, edited 2 times in total.
User avatar
naxq0
Posts: 51
Joined: Wed Apr 25, 2018 7:45 am

Re: New Docker Image For Aevelopment Attempt Getting Fail

Post by naxq0 »

Could you post a bit more info about what you're trying to build?

What existing docker image are you referring to? Where is the Dockerfile?
https://hub.docker.com/search?q=freecad

What version of FreeCAD are you trying to build? And what dependencies? (most importantly OCCT)
westguard
Posts: 1
Joined: Wed Feb 08, 2023 4:33 am

Re: New Docker Image For Aevelopment Attempt Getting Fail

Post by westguard »

I had a similar issue trying to build the 'debug' target with a docker container.
Looks like a bug in CMakeLists.txt for whatever the 'sandbox' is. So far excluding sandbox hasn't obviously broken anything for me.

Try adding -DBUILD_SANDBOX=OFF to the cmake command.
e.g. for debugging freecad something like:

Dockerfile snip:

Code: Select all

(---snip---)
RUN apt-get update
RUN apt-get install -y freecad

# allow source from apt
RUN cp /etc/apt/sources.list /etc/apt/sources.list~
RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list

RUN apt-get update
RUN apt-get build-dep -y freecad
(---/snip---)
then inside container:

Code: Select all

# cd /mnt/build && cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Debug -DBUILD_SANDBOX=OFF ../source
# make -j$(nproc --ignore=2)
# gdb /mnt/build/bin/Freecad
Note I have the source files mounted at /mnt/source and a working dir mounted at /mnt/build
Also note: apt-get build-dep -y freecad gets the build environment for whatever Freecad version your distro's apt points to. I'm sure this could be wrangled to get an arbitrary version's build env, provided it was packaged up for your distro.
Post Reply