Skip to content

Conversation

@MugundanMCW
Copy link

PR Description:

  • The PR adds support for building the IfcOpenShell library for both Windows x64 and Windows ARM64 as part of the FreeCAD LibPack compilation process.

  • The build_ifcopenshell function handles the building of dependencies, the IfcOpenShell Python extension, and installs IfcOpenShell into the FreeCAD LibPack installation directory.

  • The changes have been validated on both Windows x64 and Windows ARM64 platforms to ensure proper functionality of IfcOpenShell with FreeCAD

@postwait
Copy link

postwait commented Dec 6, 2025

The looks clean and correct to me. How can I help get this integrated?

@chennes
Copy link
Member

chennes commented Dec 18, 2025

It isn't working for me (in a non-ARM x64 system). It just seems to sit there doing nothing after the "Building ifcopenshell" standard printout. This is very different from the others, since it's using a custom wrapper around the CMake calls, so it's taking me some time to get my head around what's going on.

@MugundanMCW
Copy link
Author

It isn't working for me (in a non-ARM x64 system). It just seems to sit there doing nothing after the "Building ifcopenshell" standard printout. This is very different from the others, since it's using a custom wrapper around the CMake calls, so it's taking me some time to get my head around what's going on.

Hi @chennes
Did you encounter any build errors while building IfcOpenShell on Windows x64?

@chennes
Copy link
Member

chennes commented Dec 19, 2025

I'm peeling back the onion now. The first problem is that:

subprocess.run(
                [self.init_script, "&", build_deps_cmd, vs_platform, build_cfg],
                check=True,
                capture_output=True,
                env=env,
                cwd=win_dir,
            )

doesn't work as expected: the build-deps.cmd script has a confirmation prompt, so the reason that my build just sat there was because that script was waiting for user input.

Second, when I run that script by hand, it tells me I have to be using PowerShell, which isn't how the automated system is configured, so that needs to be resolved somehow. And then, once I do am running in PowerShell, building the proj dependency fails with a linker error, unable to find some sqlite3 functions like sqlite3_close and sqlite3_exec. This may or may not be related to the warning:

    26>G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps-vs2022-x64-installed\sqlite3\lib\sqlite3.lib : war
       ning LNK4272: library machine type 'x86' conflicts with target machine type 'x64' [G:\FreeCAD\FreeCAD-LibPack-ch
       ennes\working\ifcopenshell\_deps\proj-9.2.1\_build-vs2022-x64\src\apps\gie.vcxproj]

@chennes
Copy link
Member

chennes commented Dec 19, 2025

The first two problems were easy enough to resolve (and even resulted in an improved process -- I didn't know about the vswhere command). Onto the third...

@chennes
Copy link
Member

chennes commented Dec 19, 2025

OK -- simply deleting the ifcopenshell clone and letting it re-run with the updated Visual Studio configuration script got me through the dependencies builds (though it's pretty awful that we have to rebuild so many dependencies - I assume that you tried to build IfcOpenShell with the already-built HDF5, OCCT, etc. and it didn't work?).

Anyway, my IfcOpenShell CMake call is now failing with:

  The source directory

    G:/FreeCAD/FreeCAD-LibPack-chennes/working/ifcopenshell/src/svgfill

  does not contain a CMakeLists.txt file.

@chennes
Copy link
Member

chennes commented Dec 21, 2025

And that problem anyway turned out to be related to how git submodules work (or fail to work, as the case may be). Next up...

Build FAILED.

       "G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\rocksdb.sln" (Build target) (1) ->
       "G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\ALL_BUILD.vcxproj.metaproj" (default target)
       (2) ->
       "G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\block_cache_trace_analyzer.vcxproj.metaproj"
       (default target) (3) ->
       "G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\rocksdb.vcxproj.metaproj" (default target) (4
       ) ->
       "G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\rocksdb.vcxproj" (default target) (10) ->
       (ClCompile target) ->
         G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\options\options.cc(1,1): error C1090: PDB API call failed, err
       or code '5': G:\FreeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\RelWithDebInfo\rocksdb.pdb [G:\Fr
       eeCAD\FreeCAD-LibPack-chennes\working\ifcopenshell\_deps\rocksdb-9.11.2\_build-vs2022-x64\rocksdb.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:11:27.56

An error occurred

@chennes
Copy link
Member

chennes commented Dec 21, 2025

If I manually run each step on the command line it eventually works, and I can backtrack and run the script to get all the copying done, but I have yet to be able to get the script to run on its own from start to finish.

@chennes
Copy link
Member

chennes commented Dec 22, 2025

I've incorporated these commits into a new PR that updates most of the rest of the LibPack as well, and takes some steps towards getting the IfcOpenShell build working in the context of the script. Still a work-in-progress, it doesn't run cleanly yet. #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants