Boost not Found - Compile FreeCAD on Window [SOLVED]

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
sgrogan
Posts: 5800
Joined: Wed Oct 22, 2014 5:02 pm

Re: Boost not Found - Compile FreeCAD on Window

Post by sgrogan » Sat Mar 21, 2020 4:36 pm

wandererfan wrote:
Sat Mar 21, 2020 2:23 pm
My VM gets 4 cores and 8Gb of memory.
I think if using the VS IDE the max cores will be used. For me compiling native on Win, 6.5 - 8 GB of memory is used. If too many cores are available maybe more memory is required and A "disk swap" problem manifests itself? On Travis we have 2 threads, I'm not sure if it's 1 core hyper-threaded or a 2 cores single-threaded. Note sure what memory is available, but a scratch build takes approx 2.5 hrs.
kisolre
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Boost not Found - Compile FreeCAD on Window

Post by kisolre » Sat Mar 21, 2020 4:45 pm

What configuration is used for the 0.19_pre builds? Here Release build resulted in 2.6 GB but the 0.19_pre is just 1.3 GB?
dwi
Posts: 9
Joined: Fri Apr 10, 2020 12:15 am

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by dwi » Fri Apr 10, 2020 2:39 pm

Hello,

There is an option to compile faster using MSVC /MP or /MP8 (8 is a number similar to the number of processor available).
You will find this in the CMAKE section.
- CMAKE_C_FLAGS_... and CMAKE_CXX_FLAGS_... (to be test)

You can also set the environment variable CMAKE_BUILD_PARALLEL_LEVEL from cmake 3.12+.

OWNERS : maybe interesting to change (if not done already) CMAKE config to enable this feature for the future releases of FreeCAD.

Let me know if this was usefull 8-)

regards,

dwi
User avatar
uwestoehr
Posts: 1425
Joined: Sun Jan 27, 2019 3:21 am

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by uwestoehr » Fri Apr 10, 2020 5:24 pm

dwi wrote:
Fri Apr 10, 2020 2:39 pm
Let me know if this was usefull 8-)
CMake of FC does not yet have this option. Please add it if you think this should be available.

However, MSVC builds already parallel automatically whenever possible: I have 8 cores and when rebuilding FC from scratch I see that all 8 cores are running.
User avatar
sgrogan
Posts: 5800
Joined: Wed Oct 22, 2014 5:02 pm

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by sgrogan » Fri Apr 10, 2020 7:57 pm

kisolre wrote:
Sat Mar 21, 2020 4:45 pm
What configuration is used for the 0.19_pre builds? Here Release build resulted in 2.6 GB but the 0.19_pre is just 1.3 GB?
Hi kisolre,i
Apologies because I thought I had responded to this, I guess not.
The Release is so much smaller because it only copies the stuff necessary for a release build from the bin directory of the Libpack.
There are a bunch of executables in the bin dir that are not necessary, as well as the debug versions of the .dll's and the .pdb's.

If you want you can start a new thread and we can discuss what to copy that is truly necessary. Unfortunately not all the dependent debugg .dlls are named consistently. Having a Python script available to CMake to selectively copy the stuff would be good.
User avatar
sgrogan
Posts: 5800
Joined: Wed Oct 22, 2014 5:02 pm

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by sgrogan » Thu Apr 23, 2020 9:05 pm

kisolre wrote:
Sat Mar 21, 2020 4:45 pm
What configuration is used for the 0.19_pre builds? Here Release build resulted in 2.6 GB but the 0.19_pre is just 1.3 GB?
I am working on this script. I run it from a cmd shell.

Code: Select all

REM Copy Libpack Python and (U)CRT to FreeCAD/bin
robocopy %1\bin\DLLs %2\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\bin\Lib %2\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\bin\Scripts %2\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\bin python*.* %2\bin\ /XF *.pdb /XF python*_d.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %1\bin msvc*.* %2\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %1\bin ucrt*.* %2\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Libpack QT5/plugins to FreeCAD/bin
robocopy %1\plugins %2\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\bin\ QtWebEngineProces* assistant* %2\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\resources %2\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\translations %2\translations /MT:%NUMBER_OF_PROCESSORS% > nul
REM generate qt.conf
echo [Paths] > %2\bin\qt.conf
echo Prefix =.. >> "%2\bin\qt.conf
REM get all the dependency .dll's
robocopy %1\bin *.dll %2\bin /XF *.pdb /XF api*.* /XF *d.dll /XF *_d.dll /XF *-gd-*.dll /XF *-gyd-*.dll XF/ *_debug.dll  /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %1\bin *TKG2d.dll *TKG3d.dll *TKStd.dll *TKV3d.dll %2\bin /MT:%NUMBER_OF_PROCESSORS% > nul
To only copy the necessary stuff.
%1 is the path to the libpack
%2 is the path to the build/install directory.

I would like to port it to python and add it to FreeCAD's CMake.
Any ideas?
kisolre
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by kisolre » Fri Apr 24, 2020 6:43 am

Why port it to Python?
And will this copy only the stuff from the Libpack or everything needed to run FreeCAD?
User avatar
sgrogan
Posts: 5800
Joined: Wed Oct 22, 2014 5:02 pm

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by sgrogan » Fri Apr 24, 2020 6:49 pm

kisolre wrote:
Fri Apr 24, 2020 6:43 am
Why port it to Python?
Mostly for consistency. See here for some of the tools we use https://github.com/FreeCAD/FreeCAD/tree ... /src/Tools
I'd like to add it to CMake, so no external script. I think it would be good to avoid a mismash of .sh, .bat, .cmd, .ps scipts if it could be done in python.
kisolre wrote:
Fri Apr 24, 2020 6:43 am
And will this copy only the stuff from the Libpack or everything needed to run FreeCAD?
CMake by default should copy all the necessary stuff from the sources to build/install. So the only other necessary stuff should be in the Libpack. And that is what the script copies.
I have REM'd out the U(CRT) stuff because if compiling locally it should be in your PATH from the compiler your using.
kisolre
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by kisolre » Fri Apr 24, 2020 7:34 pm

This is going off topic now...
There is an Install vcproject which copies a lot of stuff to the specified install dir - those 2.65 GB I was talking about. Today I cleaned the install folder (manually deleted all) and build that Install solution - it copied 2.65gb and FreeCAD worked from there. How should CMake copy that stuff? Run with some parameters?
I have very broad idea about Python and those Tools have no meaning to me :) To build FreeCAD I followed the wiki to the letter and it worked. I just want it to continue to be so easy. If I can help as little as it is I will continue to give suggestions, try the things that I can and understand. But this is getting too deep for me now :)
I used Visual studio for the build/install. How CMake got me there - no idea.
On a side note why is the ThumbnailProvider.sln scraped? https://github.com/FreeCAD/FreeCAD/comm ... d3dd1798c3
Should we not support thumbnails under Windows? I really like them.
User avatar
sgrogan
Posts: 5800
Joined: Wed Oct 22, 2014 5:02 pm

Re: Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by sgrogan » Fri Apr 24, 2020 7:58 pm

kisolre wrote:
Fri Apr 24, 2020 7:34 pm
How should CMake copy that stuff? Run with some parameters?
We are talking about this part of the wiki
Method 2: You build the target INSTALL

Method 2 is the simpler one because it automatically assures that all libraries needed to run the FreeCAD.exe are in the correct folder. The FreeCAD.exe and the libraries will be output in the folder you specified in the CMake variable CMAKE_INSTALL_PREFIX.

For Method 1 you need to put the libraries into the bin folder of your build folder (where the FreeCAD.exe is). This can easily be done:

Open the CMake GUI.
Search there for the variable option FREECAD_COPY_DEPEND_DIRS_TO_BUILD and check it.
Search there for the variable option FREECAD_COPY_LIBPACK_BIN_TO_BUILD and check it.
Click on Configure. At the end of the configuration CMake will automatically copy the necessary libraries from the LibPack folder.
I am trying to make the red automatic, without the unnecessary stuff from CMake. Now CMake copies the entirety of the LIbpack/bin directory. This is not necessary for a release build, only a subset needs to be copied. I think it needs to be done here: https://github.com/FreeCAD/FreeCAD/blob ... ions.cmake
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests