FreeCAD failed to build in runtest on MSVC

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
miniMO
Posts: 4
Joined: Tue Sep 13, 2022 10:26 am

FreeCAD failed to build in runtest on MSVC

Post by miniMO »

Hi All,
We use msvc to compile FreeCAD (git commit 8b4e114b9d), and it is failed testBooleanCommonCase (PartDesignTests.TestBoolean.TestBoolean) ... Recompute failed! Please check report view. Could anyone help to look at this issue? Thanks.

Repro steps:
1. open VS2019 x64 tools command
2. git clone https://github.com/FreeCAD/FreeCAD.git F:\gitP\FreeCAD\FreeCAD
3. download https://github.com/apeltauer/FreeCAD/re ... ack_12.5.2 F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17
4. mkdir F:\gitP\FreeCAD\FreeCAD\build_amd64 && cd F:\gitP\FreeCAD\FreeCAD\build_amd64
5. set _CL_= /permissive- or set _CL_= /std:c++latest
6. set PATH=F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17\bin;%PATH%
7. set PATH=F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17\bin\Scripts;%PATH%
8. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DFREECAD_LIBPACK_DIR=F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17 -DBUILD_FEM_NETGEN=OFF -DFREECAD_RELEASE_PDB=OFF -DFREECAD_RELEASE_SEH=OFF -DCMAKE_BUILD_TYPE=Release.
9. msbuild /m /p:Platform=x64 /p:Configuration=Release FreeCAD.sln /t:Rebuild
10.cd F:\gitP\FreeCAD\FreeCAD\build_amd64\bin
11.xcopy F:\gitP\FreeCAD\tools\FreeCADLibs_12.5.2_x64_VC17\bin F:\gitP\FreeCAD\FreeCAD\build_amd64\bin /k/r/e/i/s/c/h/f/y
12.FreeCADCmd.exe --run-test 0 2>&1
More info:
OS Version: windows server 2019
VS version: VS2019 (16.11.18)
msvc version: 19.31.31009.95 (msvc inner latest build)
Last edited by Kunda1 on Fri Sep 23, 2022 3:25 pm, edited 1 time in total.
Reason: added git commit hyperlink
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD failed to build in runtest on MSVC

Post by adrianinsaval »

your link to the libpack is broken but I think the current libpack is hosted here: https://github.com/FreeCAD/FreeCAD-LibPack/releases not there. I don't know if that could be the cause. Also, why compile a two weeks old version? If you have issues the first thing to try is to see if the latest still has the same issue.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: FreeCAD failed to build in runtest on MSVC

Post by GeneFC »

Libpack 12.5.2 is at least 18 months old. I doubt it will work well for builds using the current master.

Gene
miniMO
Posts: 4
Joined: Tue Sep 13, 2022 10:26 am

Re: FreeCAD failed to build in runtest on MSVC

Post by miniMO »

We used the latest LibPack-0.20 Version 2.6, but this error still exists.
Attachments
test.log.3 (1).log
detail info
(439.27 KiB) Downloaded 21 times
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD failed to build in runtest on MSVC

Post by adrianinsaval »

The text "Recompute failed! Please check report view." does not imply that the test failed, sometimes the recompute failure is exactly the expected outcome of the test, as you can see these test are reported as passing (ok):

Code: Select all

testBooleanCommonCase (PartDesignTests.TestBoolean.TestBoolean) ... Recompute failed! Please check report view.
ok
testBooleanCutCase (PartDesignTests.TestBoolean.TestBoolean) ... Recompute failed! Please check report view.
ok
you need to look at the test listed as failing or having errors after the

Code: Select all

======================================================================
your log says

Code: Select all

FAIL: testPlacement (TestPartApp.PartTestShapeRotate)
That's the one that's failing
miniMO
Posts: 4
Joined: Tue Sep 13, 2022 10:26 am

Re: FreeCAD failed to build in runtest on MSVC

Post by miniMO »

Yes, thanks, you are right. This failure is really due to FAIL: testPlacement (TestPartApp.PartTestShapeRotate). Could you help look?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD failed to build in runtest on MSVC

Post by wmayer »

According to issue #7486 the failure is in line 230, i.e.

Code: Select all

self.assertTrue(box.Placement.isSame(p2 * p1))
Here is the extracted test:

Code: Select all

import math
from FreeCAD import Base

box = Part.makeBox(1, 1, 1)
box.Placement.Base = Base.Vector(10, 10, 10)
box.rotate((0, 0, 0), (0, 0, 1), 90)
p1 = Base.Placement()
p1.Base = Base.Vector(10, 10, 10)
p2 = Base.Placement()

p2.Rotation.Angle = math.radians(90)

# This gives False for you
box.Placement.isSame(p2 * p1)
So, what's the output of

Code: Select all

box.Placement
and

Code: Select all

p2 * p1
?
Post Reply