Ticket #3821 - Docker env build container, now with FEM!

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by Kunda1 »

geraldfuchs wrote: Mon Jan 18, 2021 10:20 am I tried to use docker for compile/build, on a MacOS and the compile/build process works, no error messages, though it took quite long.
Maybe the answer is somewhere in https://forum.freecadweb.org/viewtopic.php?f=4&t=51345 ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
qwerty_f
Posts: 204
Joined: Thu Sep 24, 2020 3:22 pm

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by qwerty_f »

I just thought to give that a try since the homebrew solution (for Big Sur) still has some lackings. But at 39% I got

Code: Select all

c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
src/App/CMakeFiles/FreeCADApp.dir/build.make:428: recipe for target 'src/App/CMakeFiles/FreeCADApp.dir/DocumentObserverPython.cpp.o' failed
make[2]: *** [src/App/CMakeFiles/FreeCADApp.dir/DocumentObserverPython.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs....
Too bad
pilhuhn
Posts: 7
Joined: Sat Feb 13, 2021 11:06 am

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by pilhuhn »

Looks like this no longer works with HEAD

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake:39 (message):
  FreeCAD 0.20 and later requires C++17.  G++ must be 7.3 or later, the used
  version is 6.3.0
Different question: is X11 really required for a pure build on macOS?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by Kunda1 »

vejmarie wrote: pinged by pinger macro
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by vejmarie »

pilhuhn wrote: Sun Mar 21, 2021 10:56 am Looks like this no longer works with HEAD

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake:39 (message):
  FreeCAD 0.20 and later requires C++17.  G++ must be 7.3 or later, the used
  version is 6.3.0
Different question: is X11 really required for a pure build on macOS?
You do not need X11 for a build on macOS. Which compiler version are you using GCC or CLang ? Most of our build are based on CLang and XCode. Can you give a try with GCC 10 at least. It is available with homebrew
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by vejmarie »

pilhuhn wrote: Sun Mar 21, 2021 10:56 am Looks like this no longer works with HEAD

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake:39 (message):
  FreeCAD 0.20 and later requires C++17.  G++ must be 7.3 or later, the used
  version is 6.3.0
Different question: is X11 really required for a pure build on macOS?
You do not need X11 for a build on macOS. Which compiler version are you using GCC or CLang ? Most of our build are based on CLang and XCode. Can you give a try with GCC 10 at least. It is available with homebrew
pilhuhn
Posts: 7
Joined: Sat Feb 13, 2021 11:06 am

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by pilhuhn »

@vjemarie This is with the docker build (as the thread subject says). The outdated gcc is inside that docker image and not the host one, so I can't just brew install the new one.
I suspect that this failure affects everyone trying to use this way of building independent of the host OS.
DavidA380
Posts: 1
Joined: Tue May 11, 2021 10:30 pm

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by DavidA380 »

I tried to follow the Compile with Docker guide on my MacOS 11.2.3 Big Sur , Apple M1 chip. This is as far as I could get

david@Davids-Air ~ % docker run -it --rm -v $fc_source:/mnt/source -v $fc_build:/mnt/build -e "DISPLAY" -e "QT_X11_NO_MITSHM=1" -v /tmp/.X11-unix:/tmp/.X11-unix:ro registry.gitlab.com/daviddaish/freecad_docker_env:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@c6b1550084a6:~#

Is there anything I can do to fix problem?
iyd2019
Posts: 108
Joined: Tue Oct 15, 2019 9:19 am

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by iyd2019 »

Hi there!
DavidA380 wrote: Tue May 11, 2021 11:04 pm I tried to follow the Compile with Docker guide on my MacOS 11.2.3 Big Sur , Apple M1 chip. This is as far as I could get

david@Davids-Air ~ % docker run -it --rm -v $fc_source:/mnt/source -v $fc_build:/mnt/build -e "DISPLAY" -e "QT_X11_NO_MITSHM=1" -v /tmp/.X11-unix:/tmp/.X11-unix:ro registry.gitlab.com/daviddaish/freecad_docker_env:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@c6b1550084a6:~#

Is there anything I can do to fix problem?
The problem is that the building tools (compiler, linker, etc.) are for intel based machines, and the new M1 is an arm based machine: the Docker image that @David_D created should be refactored for this purpose. Maybe you can try to use his Docker image creation script as a template to create a new one changing the building toolchain.

I haven't checked, but maybe someone else is already compiling FreeCAD for the M1 based machines. Not an easy task anyway...

Regards!
torger
Posts: 10
Joined: Sun Feb 13, 2022 6:56 pm

Re: Ticket #3821 - Docker env build container, now with FEM!

Post by torger »

Same issue now a year later, the container has too old build tools so it cannot build 0.20.

What's the status of the docker container, is it abandoned and everyone is building without docker?
pilhuhn wrote: Sun Mar 21, 2021 10:56 am Looks like this no longer works with HEAD

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake:39 (message):
  FreeCAD 0.20 and later requires C++17.  G++ must be 7.3 or later, the used
  version is 6.3.0
Different question: is X11 really required for a pure build on macOS?
Post Reply