CMake: "Could NOT find Boost (missing: filesystem, ...)"

Having trouble installing or compiling FreeCAD? Get help here.
WJSW
Posts: 4
Joined: Tue Feb 04, 2020 5:18 pm

CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by WJSW » Wed Feb 05, 2020 10:42 am

In attempting to CMake FreeCAD 0.18 (x86) w/ LibPack11_x86_VC12, I keep encountering this specific roadblock:

Code: Select all

Compiler: MSVC, version: 19.16.27034.0
prefix: C:/Program Files (x86)/FreeCAD
bindir: bin
datadir: data
docdir: doc
includedir: include
libdir: lib
cmake: 3.15.4
Libpack NOT found.
If you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.
Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.
PyCXX found:
  Headers:  D:/dev/FreeCAD/FreeCAD/src
  Sources:  D:/dev/FreeCAD/FreeCAD/src/CXX
  Version:  6.2.8
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.55.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:2162 (find_package_handle_standard_args)
  cMake/FreeCAD_Helpers/SetupBoost.cmake:7 (find_package)
  CMakeLists.txt:53 (SetupBoost)


Configuring incomplete, errors occurred!
See also "D:/dev/FreeCAD/FreeCAD build/CMakeFiles/CMakeOutput.log".
See also "D:/dev/FreeCAD/FreeCAD build/CMakeFiles/CMakeError.log".
While I'm not super familiar with CMake and have only used it a handful of times in the past, I believe I've set up the params correctly. I've set my Boost_INCLUDE_DIR to the '/include' directory within the FreeCADLibs dir. Am I right in thinking that the various lib directories will follow suit?
I've been at this for a few days now, with little in the way of progress, do please let me know if there's any information that would be helpful.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by wandererfan » Wed Feb 05, 2020 1:39 pm

WJSW wrote:
Wed Feb 05, 2020 10:42 am
While I'm not super familiar with CMake and have only used it a handful of times in the past, I believe I've set up the params correctly. I've set my Boost_INCLUDE_DIR to the '/include' directory within the FreeCADLibs dir. Am I right in thinking that the various lib directories will follow suit?
Disclosure: I am not a Win developer.

Boost_INCLUDE_DIR will not help find the Boost libs.

When I set up my Win development environment, I had to manually enter the Boost lib locations manually. Once that was done
CMake was happy. https://www.forum.freecadweb.org/viewto ... ns#p337938
WJSW
Posts: 4
Joined: Tue Feb 04, 2020 5:18 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by WJSW » Wed Feb 05, 2020 2:27 pm

wandererfan wrote:
Wed Feb 05, 2020 1:39 pm
I had to manually enter the Boost lib locations manually.
Good to know. I've since set both of the 'Boost_LIBRARY_DIR_...' params to LibPack's '/lib' directory, but the error remains unchanged. It may be worth noting that the individual library lib's remain unset, as does the 'Boost_DIR', could either of these be the issue? The seem to be reset to null whenever I go to configure so I assume CMake knows something I don't (especially given all the lib files are found directly within '/lib')?
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by wandererfan » Wed Feb 05, 2020 3:17 pm

WJSW wrote:
Wed Feb 05, 2020 2:27 pm
Good to know. I've since set both of the 'Boost_LIBRARY_DIR_...' params to LibPack's '/lib' directory, but the error remains unchanged. It may be worth noting that the individual library lib's remain unset, as does the 'Boost_DIR', could either of these be the issue? The seem to be reset to null whenever I go to configure so I assume CMake knows something I don't (especially given all the lib files are found directly within '/lib')?
The Cmake output from the first post says that libpack was not found. I believe that Cmake looks in the libpack for Boost libs.
I also had trouble setting the libpack parameter. From the post linked above:


"- getting CMake to find the LibPack was very frustrating. I finally realized that CMake wanted "C:\blah-blah\FCBuildDir\Libpack\FreeCADLibs_12.1.2_x64_VC15\", not "C:\blah-blah\FCBuildDir\Libpack\". "
WJSW
Posts: 4
Joined: Tue Feb 04, 2020 5:18 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by WJSW » Mon Feb 10, 2020 10:37 am

wandererfan wrote:
Wed Feb 05, 2020 3:17 pm
"- getting CMake to find the LibPack was very frustrating. I finally realized that CMake wanted "C:\blah-blah\FCBuildDir\Libpack\FreeCADLibs_12.1.2_x64_VC15\", not "C:\blah-blah\FCBuildDir\Libpack\". "
Yes, I believe I've had my FREECAD_LIBPACK_DIR param set to this same location: "D:\dev\FreeCAD\FreeCAD build\FreeCADLibs_11.11_x86_VC12\FreeCADLibs_11.11_x86_VC12", the inside of which looks like this:
Image

Just to be totally clear, all other lib files seem to have been found within the same lib directory, so I'm honestly not sure how much to believe the "Libpack NOT found." error? For reference, this is what my directories are shown as now, with the top ungrouped params being automatically generated by CMake:
Image
User avatar
sgrogan
Posts: 6087
Joined: Wed Oct 22, 2014 5:02 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by sgrogan » Mon Feb 10, 2020 11:06 pm

WJSW wrote:
Wed Feb 05, 2020 10:42 am
In attempting to CMake FreeCAD 0.18 (x86) w/ LibPack11_x86_VC12, I keep encountering this specific roadblock:

Code: Select all

Compiler: MSVC, version: 19.16.27034.0
What version of Visual Studio is this? I think it newer than VS2013?
The Libpack you use only works with VS2013, which is VC12, I'm not sure what MSVC version.

Is there a reason to choose 0.18, rather than 0.19 master? There has been significant upgrades to FreeCAD's dependencies and MS's compiler strategy (with the so called UCRT for VS2015+) It's been difficult to maintain the 0.18 release branch for backports, and once 0.19 is released, this will be a dead end.
"fight the good fight"
WJSW
Posts: 4
Joined: Tue Feb 04, 2020 5:18 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by WJSW » Tue Feb 11, 2020 9:22 am

sgrogan wrote:
Mon Feb 10, 2020 11:06 pm
Is there a reason to choose 0.18, rather than 0.19 master?
Thanks for the heads up, downloading VS2013 as we speak - but do you think this is what would have caused this issue from within CMake? Surely it would have still "found" the libpack? Also, I'm specifically interested in building the x86 ver of the project, which is no longer supported as of 0.19.
User avatar
uwestoehr
Posts: 1777
Joined: Sun Jan 27, 2019 3:21 am

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by uwestoehr » Sun May 03, 2020 11:57 am

WJSW wrote:
Wed Feb 05, 2020 10:42 am
Libpack NOT found.
In your output I see that the LibPack is missing, thus of course boost is missing. So you must specify the path to it.

Note: we had several compilation issues and therefore this Wiki page was setup:
https://wiki.freecadweb.org/Compile_on_Windows

You must follow it _exactly_ and you will get FreeCAD to compile. If you fail, please report at what step the problem occurs.
User avatar
sgrogan
Posts: 6087
Joined: Wed Oct 22, 2014 5:02 pm

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by sgrogan » Sun May 03, 2020 1:12 pm

uwestoehr wrote:
Sun May 03, 2020 11:57 am
You must follow it _exactly_ and you will get FreeCAD to compile. If you fail, please report at what step the problem occurs.
This won't work for WJSW

The goal is to build an x86, i.e.32 bit version.
There is no Libpack for 32 bit with VS2015+
Therefore WJSW must use an 11.*_x86 Libpack based on VS2013 (happens to be PY2/QT4).
VS2013 predates the (U)CRT so WJSW must use precisely VS2013.
FreeCAD 0.19 contains C++11 features not supported by VS2013.
Therefore, on Win, the easiest way to make a 32 bit build is to use VS2013 and an 11.x Libpack and use 0.18/release branch FreeCAD source.
"fight the good fight"
User avatar
uwestoehr
Posts: 1777
Joined: Sun Jan 27, 2019 3:21 am

Re: CMake: "Could NOT find Boost (missing: filesystem, ...)"

Post by uwestoehr » Mon May 04, 2020 10:07 am

sgrogan wrote:
Sun May 03, 2020 1:12 pm
The goal is to build an x86, i.e.32 bit version.
Thanks for clarification.
I missed why this is necessary. However, allow me a general statement: 32bit support is running out. So some libraries don't offer 32bit versions anymore (also in the Linux world some Linux distros dropped official 32bit support.) Therefore I think it is a matter of time when a 32bit build won't be possible anymore.

Besides this, since CAD is a memory-consuming process, it is in my opinion important to upgrade the CAD PCs because win32 cannot deal with memories larger than 4 GB.
Post Reply

Who is online

Users browsing this forum: tonyaimer and 1 guest