Python errors after building from master

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
falviani
Posts: 250
Joined: Tue May 07, 2019 8:49 pm

Python errors after building from master

Post by falviani »

Hi all,

I cannot include the usual version info here since my build is broken. :(

I just built from the latest master (as of 1PM CDT 14Apr21) using the latest VS2019. I have Python 3.8.9 installed, but the CMake config shows that it's pointing to the versions in the libpack. The build was successful but when I try to launch the app I get the following errors (in order):
err_all.png
err_all.png (30.78 KiB) Viewed 1307 times
Can anybody suggest fixes for these?

Thanks in advance,
Frank
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Python errors after building from master

Post by wmayer »

I have Python 3.8.9 installed
You don't need a separate Python installation. The LibPack provides everything you need.
build was successful but when I try to launch the app I get the following errors (in order):
Now you need to extend the PATH environment variable by the LibPack's bin directory. You don't need to do this system-wide but you can do this within VS. Therefore right-click on the FreeCADMain target in the Solution Explorer and go to Properties. There switch to Debugging and write this to the environment section:

Code: Select all

FREECAD_LIBPACK_BIN=Your_path_to_the_Libpack\bin
PATH=%FREECAD_LIBPACK_BIN%;%PATH%
falviani
Posts: 250
Joined: Tue May 07, 2019 8:49 pm

Re: Python errors after building from master

Post by falviani »

I followed your instructions, I believe. The configuration in VS looks like this:
VS2019Properties.png
VS2019Properties.png (118.69 KiB) Viewed 1217 times
But at least I'm getting new errors (sigh):
15Apr21_VSEdited_AllErrs.png
15Apr21_VSEdited_AllErrs.png (50.28 KiB) Viewed 1217 times
I'm getting tired.
Frank
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Python errors after building from master

Post by wmayer »

But at least I'm getting new errors (sigh):
Instead of getting a failure that Qt dlls cannot be found you get that an entry point isn't found. This looks like a binary incompatible Qt version is loaded. If you press F5 inside VS you should get some hints (see VS's Output window) about where the Qt dlls are located.

Alternatively you can copy the content of the LibPack's bin directory to FreeCAD's bin directory. This way the Qt dlls are in the same directory as FreeCADBase.dll, ... and then the correct version is loaded.
I'm getting tired.
Don't give up!
falviani
Posts: 250
Joined: Tue May 07, 2019 8:49 pm

Re: Python errors after building from master

Post by falviani »

Here's the output window from VS2019:

Code: Select all

Build started...
1>------ Build started: Project: fc_version, Configuration: Release x64 ------
1>Generating version_check
1>git
1>E:/Dev/FreeCAD19_Output/src/Build/Version.h.out written
1>Generating Version.h
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): warning MSB8065: Custom build for item "E:\Dev\FreeCAD19_Output\CMakeFiles\bfc1867e28e48ff3ba6cde6689ec44ff\version_check.rule" succeeded, but specified output "e:\dev\freecad19_output\src\build\version_check" has not been created. This may cause incremental build to work incorrectly.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): warning MSB8064: Custom build for item "E:\Dev\FreeCAD19_Output\CMakeFiles\bfc1867e28e48ff3ba6cde6689ec44ff\Version.h.rule" succeeded, but specified dependency "e:\dev\freecad19_output\src\build\version_check" does not exist. This may cause incremental build to work incorrectly.
1>Done building project "fc_version.vcxproj".
========== Build: 1 succeeded, 0 failed, 109 up-to-date, 0 skipped ==========
At the end of the build came this cheerful message:
15Apr21_AccessDenied.png
15Apr21_AccessDenied.png (3.71 KiB) Viewed 1198 times
So I copied the entire contents of the libpack bin directory into the FreeCAD output's bin directory (replacing files with the same names). So, attempting to launch Freecad.exe yields this:
15Apr21_AfterLibPackCopy.png
15Apr21_AfterLibPackCopy.png (7.98 KiB) Viewed 1198 times
I MUST have something truly weird about my machine/dev configuration. I can't believe the Master branch is in this state :(

Frank
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python errors after building from master

Post by sgrogan »

falviani wrote: Thu Apr 15, 2021 9:31 pm So, attempting to launch Freecad.exe yields this:
This can be fixed by setting FREECAD_COPY_PLUGINS_BIN_TO_BUILD with CMake-gui and then configure and generate.
This should move the necessary files, no need to build in VS.
"fight the good fight"
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Python errors after building from master

Post by wmayer »

Here's the output window from VS2019:
That's not what I meant. If you press F5 to start debugging you should see the list of loaded dlls and their absolute paths. Then you should be able to see where are the incompatible dlls are located.
I MUST have something truly weird about my machine/dev configuration. I can't believe the Master branch is in this state
You have almost reached the goal. In the bin directory there must be a directory platforms with the qwindows.dll.
falviani
Posts: 250
Joined: Tue May 07, 2019 8:49 pm

Re: Python errors after building from master

Post by falviani »

SRogan,

Unfortunately there are NO freecad copy options in CMake:
15Apr21_CMakeFreeCADOptions.png
15Apr21_CMakeFreeCADOptions.png (8.08 KiB) Viewed 1167 times
So I'm not sure how I would do that. Putting 'copy' into the search box shows nothing at all.

Thanks for the idea - the instructions on the site explicitly call to set all 3 copy options on, but they no longer seem to exist.

Frank
falviani
Posts: 250
Joined: Tue May 07, 2019 8:49 pm

Re: Python errors after building from master

Post by falviani »

WMayer,

I did use F5 to start debugging. It gave the errors I showed in the VSOutput then stopped with an 'access denied' error.

Frank
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python errors after building from master

Post by sgrogan »

falviani wrote: Thu Apr 15, 2021 10:55 pm Unfortunately there are NO freecad copy options in CMake:
If you run configure again does it show up?
Attachments
Capture.PNG
Capture.PNG (26.22 KiB) Viewed 1160 times
"fight the good fight"
Post Reply