Building Libs for Windows Debug Version with VS2017/Qt5.12

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
saso
Posts: 1338
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby saso » Tue Apr 09, 2019 7:55 am

apeltauer wrote:
Mon Apr 08, 2019 7:22 pm
But I can just say that it speeds up the build on a 8 thread and 12 thread I7. With the flag my machines nearly have 100% percent usage all the time.
Ok, but don't you get the same result if you set it up at build time, something similar to what we do with the command line switches? IMO users should decide by them self how much resources they want to use for the builds on their machines.
apeltauer wrote:
Tue Apr 09, 2019 5:06 am
Do we already have a discussion about a daily automated build,installer and a upload to somewhere?
This would be IMO very nice, I have been playing a bit with it in the past https://github.com/sasobadovinac/FreeCA ... pveyor.yml
User avatar
apeltauer
Posts: 212
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby apeltauer » Tue Apr 09, 2019 11:16 am

saso wrote:
Tue Apr 09, 2019 7:55 am
Ok, but don't you get the same result if you set it up at build time, something similar to what we do with the command line switches?
I always use MSBuild with /maxcpucount: myCpuCount ( /m does the same). This means MSBuild.exe builds several projects parallel, but does not compile cpp files within a project parallel. Instead the compile flag /MP does compile cpp files parallel.

But if the build fails on the ci runner, we should revert the flag...
wmayer
Site Admin
Posts: 15000
Joined: Thu Feb 19, 2009 10:32 am

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby wmayer » Tue Apr 09, 2019 1:40 pm

apeltauer wrote:
Tue Apr 09, 2019 11:16 am
saso wrote:
Tue Apr 09, 2019 7:55 am
Ok, but don't you get the same result if you set it up at build time, something similar to what we do with the command line switches?
I always use MSBuild with /maxcpucount: myCpuCount ( /m does the same). This means MSBuild.exe builds several projects parallel, but does not compile cpp files within a project parallel. Instead the compile flag /MP does compile cpp files parallel.

But if the build fails on the ci runner, we should revert the flag...
When looking at the location where the AppVeyor builds were cancelled the last time before your commit then it has come much further compared to now. So, indeed it looks like the flag slows down the builds on AppVeyor. However, there is no reason to revert the commit, just add a cmake option where you can enable it to still benefit from the speed boost.
User avatar
saso
Posts: 1338
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby saso » Tue Apr 09, 2019 1:50 pm

I did some test builds...

/m
https://ci.appveyor.com/project/sasobad ... s/23675955 ~90%

none
https://ci.appveyor.com/project/sasobad ... s/23709493 ~33%

/MP
https://ci.appveyor.com/project/sasobad ... s/23711150 ~45%

/MP + /m
https://ci.appveyor.com/project/sasobad ... s/23713034 ~70%

The number of lines in the log can sort of be compared to the % of how far the build has come (1000 lines = ~10%). It is of course not exact since even the builds that have the absolute same configuration and are from the same commit are never the same, but we can see if there are big differences.

Update: So at least on Appveyor with only 2 cpu available the /m alone seems to be the fastest.
User avatar
sgrogan
Posts: 5475
Joined: Wed Oct 22, 2014 5:02 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby sgrogan » Tue Apr 09, 2019 8:24 pm

apeltauer wrote:
Tue Apr 09, 2019 5:06 am
I think this is the right place for the libpack. If you mention my name, i would appreciate it.
See Here: https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
Let me know if you want me to change anything.
apeltauer wrote:
Tue Apr 09, 2019 5:06 am
BTW: Do we already have a discussion about a daily automated build,installer and a upload to somewhere?
There are scattered threads, it would be a good time to open a new one, to not hijack this one.
User avatar
apeltauer
Posts: 212
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby apeltauer » Wed Apr 10, 2019 4:59 am

saso wrote:
Tue Apr 09, 2019 1:50 pm
I did some test builds...

/m
https://ci.appveyor.com/project/sasobad ... s/23675955 ~90%

none
https://ci.appveyor.com/project/sasobad ... s/23709493 ~33%

/MP
https://ci.appveyor.com/project/sasobad ... s/23711150 ~45%

/MP + /m
https://ci.appveyor.com/project/sasobad ... s/23713034 ~70%

The number of lines in the log can sort of be compared to the % of how far the build has come (1000 lines = ~10%). It is of course not exact since even the builds that have the absolute same configuration and are from the same commit are never the same, but we can see if there are big differences.

Update: So at least on Appveyor with only 2 cpu available the /m alone seems to be the fastest.
See the PR(https://github.com/FreeCAD/FreeCAD/pull/2079)
Now the /MP flag is optional and can be activated with "cmake -DMP_COMPILE_FLAG=ON"
User avatar
apeltauer
Posts: 212
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby apeltauer » Wed Apr 10, 2019 5:01 am

sgrogan wrote:
Tue Apr 09, 2019 8:24 pm
See Here: https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
Let me know if you want me to change anything.
Perfect!
User avatar
saso
Posts: 1338
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby saso » Wed Apr 10, 2019 5:14 pm

apeltauer wrote:
Wed Apr 10, 2019 4:59 am
See the PR(https://github.com/FreeCAD/FreeCAD/pull/2079)
Now the /MP flag is optional and can be activated with "cmake -DMP_COMPILE_FLAG=ON"
Nice, the build also finished. Thanks for all the great work on the new libs!
User avatar
sgrogan
Posts: 5475
Joined: Wed Oct 22, 2014 5:02 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby sgrogan » Wed Apr 10, 2019 11:39 pm

apeltauer wrote:
Tue Apr 09, 2019 5:06 am
BTW: Do we already have a discussion about a daily automated build,installer and a upload to somewhere?
I made a test build : caution direct download! https://github.com/FreeCAD/FreeCAD/rele ... -12.1.2.7z
UR_
Posts: 1019
Joined: Tue Jan 03, 2017 8:42 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Postby UR_ » Thu Apr 11, 2019 12:08 pm

sgrogan wrote:
Wed Apr 03, 2019 10:25 pm
... With this version of your libpack and my new cmake my previous problems finding boost are gone ...
Sorry for this noob post, but can't get a successful build :-(

Installed FreeCADLibs_12.1.2_x64_VC15.7z into C:\Users\aio\FreeCADlibpack
Source from git into C:\Users\aio\FreeCADcode
Build should go to C:\Users\aio\FreeCADbuild which is empty, ATM

I'm using Cmake 3.14.1 and VS2017.

Still getting this message from Cmake concerning boost:

Code: Select all

Not found, install the components:
   filesystem;program_options;regex;system;thread
C:\Users\aio\FreeCADlibpack and C:\Users\aio\FreeCADbuild is member of environ variable PATH

Boost_DIR is set to C:\Users\aio\FreeCADlibpack
But it is resetted to "NOTFOUND" after Cmakes "Configure"

Are there any additional "tweaks" necessary?