Boost not Found - Compile FreeCAD on Window [SOLVED]

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Boost not Found - Compile FreeCAD on Window [SOLVED]

Post by amrit3701 »

Hi,

I am compiling FreeCAD 0.19 on Windows 10 using CMake GUI and Visual Studio 15 2017 using https://wiki.freecadweb.org/Compile_on_Windows tutorial.

In Visual Studio 15 2017, I installed "Deskop development with C++". https://imgur.com/r3JRUo9

Also, placed FreeCADLibs_12.1.4_x64_VC15 (https://github.com/FreeCAD/FreeCAD/rele ... 64_VC15.7z) folder inside Libpack folder.

Code: Select all

 Z:\> tree -L 4
│── FreeCAD
├── FreeCAD-Build
│   ├── Libpack
│   │   └── FreeCADLibs_12.1.4_x64_VC15
After opening CMake GUI, I set source code= Z:\>FreeCAD and build binaries path= Z:\>FreeCAD-Build and add below environment variables.
* FREECAD_LIBPACK_DIR=Z:/FreeCAD-Build/Libpack/FreeCADLibs_12.1.4_x64_VC15
* BUILD_QT5=[tick checkbox]

On clicking Configure I got below error in CMake console:

Code: Select all

Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. 
The C compiler identification is MSVC 19.16.27038.0 
The CXX compiler identification is MSVC 19.16.27038.0 
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe 
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works 
Detecting C compiler ABI info 
Detecting C compiler ABI info - done 
Detecting C compile features 
Detecting C compile features - done 
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe 
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works 
Detecting CXX compiler ABI info 
Detecting CXX compiler ABI info - done 
Detecting CXX compile features 
Detecting CXX compile features - done 
Compiler: MSVC, version: 19.16.27038.0 
prefix: C:/Program Files (x86)/FreeCAD 
bindir: bin 
datadir: data 
docdir: doc 
includedir: include 
libdir: lib 
cmake: 3.15.7 
Found libpack env variable: Z:/FreeCAD-Build/Libpack/FreeCADLibs_12.1.4_x64_VC15 
PyCXX found: 
  Headers:  Z:/FreeCAD/src 
  Sources:  Z:/FreeCAD/src/CXX 
  Version:  6.2.8 
Found SWIG: Z:/FreeCAD-Build/Libpack/FreeCADLibs_12.1.4_x64_VC15/bin/swig/swig.exe (found version "3.0.12")  
Found PythonInterp: Z:/FreeCAD-Build/Libpack/FreeCADLibs_12.1.4_x64_VC15/bin/python.exe (found version "3.6.8")  
Found PythonLibs: optimized;Z:/FreeCAD-Build/Libpack/FreeCADLibs_12.1.4_x64_VC15/bin/libs/python36.lib;debug;Z:/FreeCAD-Build/Libpack/FreeCADLibs_12.1.4_x64_VC15/bin/libs/python36_d.lib (found suitable exact version "3.6.8")  
Looking for pthread.h 
Looking for pthread.h - not found 
Found Threads: TRUE   
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message): 
  Could NOT find Boost (missing: filesystem program_options regex system 
  thread) (found suitable version "1.67.0", minimum required is "1.48") 
Call Stack (most recent call first): 
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) 
  C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:2164 (find_package_handle_standard_args) 
  cMake/FreeCAD_Helpers/SetupBoost.cmake:7 (find_package) 
  CMakeLists.txt:55 (SetupBoost) 
 
 
Configuring incomplete, errors occurred! 
See also "Z:/FreeCAD-Build/CMakeFiles/CMakeOutput.log". 
See also "Z:/FreeCAD-Build/CMakeFiles/CMakeError.log".
From errors, it looks like cmake unable to find boost from FREECAD_LIBPACK_DIR.

Environment variable of Boost: https://imgur.com/QAV01gl

I already followed below post but it didn't help me.
https://www.forum.freecadweb.org/viewtopic.php?p=366643
https://www.forum.freecadweb.org/viewto ... ns#p337938

Does anybody know how to fix this problem?

Thanks
Attachments
CMakeOutput.log
(9.34 KiB) Downloaded 91 times
CMakeError.log
(1.18 KiB) Downloaded 89 times
Last edited by amrit3701 on Mon Mar 23, 2020 6:34 am, edited 2 times in total.
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Boost on Found - Compile FreeCAD on Window

Post by amrit3701 »

wandererfan wrote:
sgrogan wrote:
uwestoehr wrote:
:roll:
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Boost on Found - Compile FreeCAD on Window

Post by uwestoehr »

amrit3701 wrote: Fri Mar 20, 2020 7:08 pm I am compiling FreeCAD 0.19 on Windows 10 using CMake GUI and Visual Studio 15 2017 using https://wiki.freecadweb.org/Compile_on_Windows tutorial.
It works here following EXACTLY the steps in the Wiki page. I authored the page and regularly check that it still works.
A common problem is that people try the latest CMake version. Please only use the version I specified in the Wiki page. CMake 3.16 will not work!
What is your CMake version?

Can you please restart from the beginning and tell me at what step of https://wiki.freecadweb.org/Compile_on_Windows#CMake you get the problems?
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Boost on Found - Compile FreeCAD on Window

Post by amrit3701 »

uwestoehr wrote: Fri Mar 20, 2020 7:31 pm
It works here following EXACTLY the steps in the Wiki page. I authored the page and regularly check that it still works.
A common problem is that people try the latest CMake version. Please only use the version I specified in the Wiki page. CMake 3.16 will not work!
What is your CMake version?
Hi @uwestoehr,

CMake version is 3.15.7
Screenshot 2020-03-21 at 1.46.55 AM.png
Screenshot 2020-03-21 at 1.46.55 AM.png (520.19 KiB) Viewed 1523 times
Can you please restart from the beginning and tell me at what step of https://wiki.freecadweb.org/Compile_on_Windows#CMake you get the problems?
I have published a video to show my problem. https://youtu.be/NxJhmD_7Ukk

Hope this helps to find my problem.

Thanks,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Boost not Found - Compile FreeCAD on Window

Post by apeltauer »

In your Video you are using cmake to create 32bit vs solutions. The Libpack is made for 64Bit.
See minute 4:00, also specific the optional platform parameter x64 (second Box)...
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Boost on Found - Compile FreeCAD on Window

Post by uwestoehr »

amrit3701 wrote: Fri Mar 20, 2020 8:49 pm I have published a video to show my problem. https://youtu.be/NxJhmD_7Ukk
I write in the Wiki "Click Configure". So in minute 3:04 in your video you must click in CMake on the "Configure" button.

Later in minute 3:14 you add an entry. But I wrote "Search in CMake for the variable FREECAD_LIBPACK_DIR..." so you must search for it, not add. If it is not there, you made a mistake before.

Therefore I wrote that you must EXACTLY follow the steps. (I cost me hours to find out how it works and it only works the exact way.)
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Boost on Found - Compile FreeCAD on Window

Post by vocx »

uwestoehr wrote: Fri Mar 20, 2020 11:34 pm ...
Therefore I wrote that you must EXACTLY follow the steps. (I cost me hours to find out how it works and it only works the exact way.)
Welcome to writing documentation, brother. Some people just won't follow directions.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Boost not Found - Compile FreeCAD on Window

Post by kisolre »

vocx wrote: Fri Mar 20, 2020 11:44 pm Some people just won't follow directions.
About the directions - what is enough to be installed here for the compile to work:
.
VSCommunityComponents.JPG
VSCommunityComponents.JPG (120.12 KiB) Viewed 1455 times
.
Create a new folder where the compiled FreeCAD should be. It is highly recommended that this folder is not inside the source code folder of FreeCAD.
Create there a new subfolder for the LibPack. Note: The name of this subfolder must be the same as the LibPack file name.
Subfolder of the Build folder? I know that this is assumed but still... Ans recent Libpacks already have a folder inside. Should the tree be
Build\FreeCADLibs_12.1.4_x64_VC15
or
Build\FreeCADLibs_12.1.4_x64_VC15\FreeCADLibs_12.1.4_x64_VC15?
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Boost not Found - Compile FreeCAD on Window

Post by amrit3701 »

apeltauer wrote: Fri Mar 20, 2020 10:33 pm In your Video you are using cmake to create 32bit vs solutions. The Libpack is made for 64Bit.
See minute 4:00, also specific the optional platform parameter x64 (second Box)...
uwestoehr wrote: I write in the Wiki "Click Configure". So in minute 3:04 in your video you must click in CMake on the "Configure" button.

Later in minute 3:14 you add an entry. But I wrote "Search in CMake for the variable FREECAD_LIBPACK_DIR..." so you must search for it, not add. If it is not there, you made a mistake before.

Therefore I wrote that you must EXACTLY follow the steps. (I cost me hours to find out how it works and it only works the exact way.)
Hello guys, you rock!

After following your comments, I successfully configured FreeCAD. However, building FreeCAD VS'15 2017 is very time-consuming in Virtual box. It already took 6 hours and building process still running. :roll:

Do you how I can speed up the building process in VS'15 2017? For eg, in Ubuntu I used make -j<no of processors>.

Here is my Windows configuration:
Screenshot 2020-03-21 at 6.22.31 PM.png
Screenshot 2020-03-21 at 6.22.31 PM.png (904.16 KiB) Viewed 1411 times
Thanks,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Boost not Found - Compile FreeCAD on Window

Post by wandererfan »

amrit3701 wrote: Sat Mar 21, 2020 12:56 pm After following your comments, I successfully configured FreeCAD. However, building FreeCAD VS'15 2017 is very time-consuming in Virtual box. It already took 6 hours and building process still running. :roll:

Do you how I can speed up the building process in VS'15 2017? For eg, in Ubuntu I used make -j<no of processors>.
No help, but maybe another data point is useful.

My VM gets 4 cores and 8Gb of memory. It isn't a really fast processor (1.8 clock), but a full build from scratch is less than 2 hours using VS15 2017. The disk is SSD. CCache is not installed.

I did not change any VS defaults regarding parallel builds or max cores.

Will have another look at my setup next time I am at the machine with the VM.
Post Reply