Title: Compilation Issues with IfcOpenShell in MSys2 Environment · Issue #6568 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Compilation Issues with IfcOpenShell in MSys2 Environment · Issue #6568 · IfcOpenShell/IfcOpenShell
X Title: Compilation Issues with IfcOpenShell in MSys2 Environment · Issue #6568 · IfcOpenShell/IfcOpenShell
Description: Bug Description I followed the installation instructions provided at https://docs.ifcopenshell.org/ifcopenshell/installation.html for using IfcOpenShell with MSys2. After installing MSys2 as specified (and installing mingw-w64-ucrt-x86_6...
Open Graph Description: Bug Description I followed the installation instructions provided at https://docs.ifcopenshell.org/ifcopenshell/installation.html for using IfcOpenShell with MSys2. After installing MSys2 as specif...
X Description: Bug Description I followed the installation instructions provided at https://docs.ifcopenshell.org/ifcopenshell/installation.html for using IfcOpenShell with MSys2. After installing MSys2 as specif...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/6568
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Compilation Issues with IfcOpenShell in MSys2 Environment","articleBody":"### Bug Description\n\n I followed the installation instructions provided at https://docs.ifcopenshell.org/ifcopenshell/installation.html for using IfcOpenShell with MSys2. After installing MSys2 as specified (and installing ` mingw-w64-ucrt-x86_64-gcc` cf. https://www.msys2.org/) and attempting to compile the project, I encountered a series of issues mostly related to the MSys2 environment. While I was able to resolve some of these issues, the compilation process ultimately failed due to errors requiring modifications to the IfcOpenShell code, which I am not supposed to alter.\n\nBelow is a detailed list of the problems encountered during the setup and compilation process, along with the steps I took to resolve them. The purpose of listing these actions is to ensure there wasn’t a mistake in the setup process that could have caused these errors.\n\n## 1. Initial Error\n```\nerror: failed to init transaction (unable to lock database)\nerror: could not lock database: Permission denied\n```\n**Resolution:** This issue was resolved by starting MSys2 with administrator privileges.\n\n## 2. Missing Git and CMake Recognition:\n\nDespite Git and CMake being installed on my system, MSys2 did not recognize them initially. To resolve this, I installed these tools within the MSys2 environment using the following commands:\n\n```\npacman -S git \npacman -S mingw-w64-x86_64-cmake\n```\n\n### 3. Compilation Failure:\n\nWhen running the following command:\n\n```\n./build-deps.sh\n```\n\nI encountered the following compilation errors:\n\n```\nC:/Users/...\n\n[trace.txt](https://github.com/user-attachments/files/19792590/trace.txt)\n\n/IfcOpenshell/deps/OpenCOLLADA/common/libBuffer/include/CommonFWriteBufferFlusher.h:44:9: error: 'int64_t' does not name a type\n 44 | typedef int64_t __int64;\n```\n\n```\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/Externals/LibXML/threads.c:452:43: error: passing argument 1 of '_InterlockedCompareExchangePointer' from incompatible pointer type [-Wincompatible-pointer-types]\n 452 | InterlockedCompareExchangePointer(&global_init_lock, cs, NULL);\n | ^~~~~~~~~~~~~~~~~\n | |\n | struct _RTL_CRITICAL_SECTION * volatile*\n\n```\n\n**Request:** Could you please provide guidance on resolving the compilation errors? Alternatively, if the issue stems from the MSys2 environment, I would appreciate recommendations for adjustments or an alternative setup.\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\nWSys2 > ./build-deps.sh\n\n:: There are 13 members in group mingw-w64-x86_64-toolchain:\n:: Repository mingw64\n 1) mingw-w64-x86_64-binutils 2) mingw-w64-x86_64-crt-git 3) mingw-w64-x86_64-gcc 4) mingw-w64-x86_64-gdb 5) mingw-w64-x86_64-gdb-multiarch\n 6) mingw-w64-x86_64-headers-git 7) mingw-w64-x86_64-libmangle-git 8) mingw-w64-x86_64-libwinpthread-git 9) mingw-w64-x86_64-make\n 10) mingw-w64-x86_64-pkgconf 11) mingw-w64-x86_64-tools-git 12) mingw-w64-x86_64-winpthreads-git 13) mingw-w64-x86_64-winstorecompat-git\n\nEnter a selection (default=all):\nwarning: mingw-w64-x86_64-binutils-2.44-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-crt-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-gcc-14.2.0-2 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-gdb-16.2-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-gdb-multiarch-16.2-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-headers-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-libmangle-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-libwinpthread-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-make-4.4.1-3 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-pkgconf-1~2.3.0-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-tools-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-winpthreads-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-winstorecompat-git-12.0.0.r509.g079e6092b-1 is up to date -- reinstalling\nwarning: mingw-w64-x86_64-boost-1.87.0-2 is up to date -- reinstalling\nwarning: make-4.4.1-2 is up to date -- reinstalling\nwarning: swig-4.2.1-1 is up to date -- reinstalling\nresolving dependencies...\nlooking for conflicting packages...\n\nPackages (16) make-4.4.1-2 mingw-w64-x86_64-binutils-2.44-1 mingw-w64-x86_64-boost-1.87.0-2 mingw-w64-x86_64-crt-git-12.0.0.r509.g079e6092b-1\n mingw-w64-x86_64-gcc-14.2.0-2 mingw-w64-x86_64-gdb-16.2-1 mingw-w64-x86_64-gdb-multiarch-16.2-1\n mingw-w64-x86_64-headers-git-12.0.0.r509.g079e6092b-1 mingw-w64-x86_64-libmangle-git-12.0.0.r509.g079e6092b-1\n mingw-w64-x86_64-libwinpthread-git-12.0.0.r509.g079e6092b-1 mingw-w64-x86_64-make-4.4.1-3 mingw-w64-x86_64-pkgconf-1~2.3.0-1\n mingw-w64-x86_64-tools-git-12.0.0.r509.g079e6092b-1 mingw-w64-x86_64-winpthreads-git-12.0.0.r509.g079e6092b-1\n mingw-w64-x86_64-winstorecompat-git-12.0.0.r509.g079e6092b-1 swig-4.2.1-1\n\nTotal Installed Size: 721.13 MiB\nNet Upgrade Size: 0.00 MiB\n\n:: Proceed with installation? [Y/n]\n(16/16) checking keys in keyring [#####################################################] 100%\n(16/16) checking package integrity [#####################################################] 100%\n(16/16) loading package files [#####################################################] 100%\n(16/16) checking for file conflicts [#####################################################] 100%\n(16/16) checking available disk space [#####################################################] 100%\n:: Processing package changes...\n( 1/16) reinstalling mingw-w64-x86_64-libwinpthread-git [#####################################################] 100%\n( 2/16) reinstalling mingw-w64-x86_64-binutils [#####################################################] 100%\n( 3/16) reinstalling mingw-w64-x86_64-headers-git [#####################################################] 100%\n( 4/16) reinstalling mingw-w64-x86_64-crt-git [#####################################################] 100%\n( 5/16) reinstalling mingw-w64-x86_64-winpthreads-git [#####################################################] 100%\n( 6/16) reinstalling mingw-w64-x86_64-gcc [#####################################################] 100%\n( 7/16) reinstalling mingw-w64-x86_64-gdb [#####################################################] 100%\n( 8/16) reinstalling mingw-w64-x86_64-gdb-multiarch [#####################################################] 100%\n( 9/16) reinstalling mingw-w64-x86_64-libmangle-git [#####################################################] 100%\n(10/16) reinstalling mingw-w64-x86_64-make [#####################################################] 100%\n(11/16) reinstalling mingw-w64-x86_64-pkgconf [#####################################################] 100%\n(12/16) reinstalling mingw-w64-x86_64-tools-git [#####################################################] 100%\n(13/16) reinstalling mingw-w64-x86_64-winstorecompat-git [#####################################################] 100%\n(14/16) reinstalling mingw-w64-x86_64-boost [#####################################################] 100%\n(15/16) reinstalling make [#####################################################] 100%\n(16/16) reinstalling swig [#####################################################] 100%\n:: Running post-transaction hooks...\n(1/1) Updating the info directory file...\n/c/Users/.../IfcOpenshell/deps/OpenCOLLADA /c/Users/.../IfcOpenshell/win\nHEAD is now at 064a60b6 Merge pull request #388 from fl4re/maya-physx-export-fix\n/c/Users/.../IfcOpenshell/win\n/c/Users/.../IfcOpenshell/deps/OpenCOLLADA /c/Users/.../IfcOpenshell/win\n/c/Users/.../IfcOpenshell/deps/OpenCOLLADA/build-msys /c/Users/.../IfcOpenshell/deps/OpenCOLLADA /c/Users/.../IfcOpenshell/win\nCMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):\n Compatibility with CMake \u003c 3.10 will be removed from a future version of\n CMake.\n\n Update the VERSION argument \u003cmin> value. Or, use the \u003cmin>...\u003cmax> syntax\n to tell CMake that the project requires at least \u003cmin> but has been updated\n to work with policies introduced by \u003cmax> or earlier.\n\n\n-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)\nWARNING: Native LibXml2 not found, taking LibXml from ./Externals\n-- Could NOT find PCRE (missing: PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY)\nWARNING: Native PCRE not found, taking PCRE from ./Externals\n-- Configuring done (0.4s)\n-- Generating done (0.9s)\n-- Build files have been written to: C:/Users/.../IfcOpenshell/deps/OpenCOLLADA/build-msys\n[ 1%] Built target UTF_static\n[ 4%] Built target pcre_static\n[ 5%] Built target ftoa_static\n[ 5%] [ B u5i%l]d ingB uCiXlXd ionbgj eCcXtX CoObLjLeAcDtA BCaOsLeLUA[Dt iA Bla6ss%/e]C UMtaiBkluesiF/liCdlMieasnk/gOe pFCeXiXln eso/bCOjOpLeeLcAntD CAOCLBOLLaALsDAAeDUBAtaBisalessUe_tUstitilalst_sis/cCt.MadatikiercF/.isdlirercs///sCOrOpcLe/LnCCAOODLLALLBAAUDDPAAcBrBaeUsCUeotUmitpliisll.sec_dpsPpt.aattotibcej.rd\nni.rc/pspr.co/bCjO\nLLADABUPrecompiledHeaders.cpp.obj\n[ 6%[[[ ] 7 [ 7B7[ %u%i8l]%]]%d ]i8 BnuB%BgiuB]u liu iCllBdXdiduiXiliin ndnlgogigd b n ijCCgCnXXX egXX Co [X cXbX oob CoXjbj jbXeetc t oejCeOcbcj8e%cctCLt]tt OL A CL CDCCOLOAOOLLALBBLuDiAaLALLlBsADALdaeDADAAsUABiDBetBanAaUiasgBstlse aesseUCiUe/UtXitUCtlXlitMis so/al/sibCkle/ljMesFCsCac/iM/MktC aCkelMCaMeFeiOkaFkilLeaseleLsk/FeFs/eOiAi/OFplDlOpieeAepeensB/annCslOsCCO/epeOOLOseULLLL/ntLpAAOCiAeDDpOlsnAAeLnCDOBLC/OLBaAALasCLDBAseMLaADDUAtkeAAaBeiUBBsaFltaaesUstsiiei_sellUlseUUet_sststis_it/iltslaOtpatslsieta_sscn.Ct__ti[dOissac i cttt.Lr9.aaidL/%sttciArDrii.d]/Accc.i sB/d.driaCBidr//sOurirssericr/rLUcl//scLt/dCir/AiCsOncCDlOrLg/OAsLcL CLB_L/ACOLUsAMDXLAStDaAXLDtaAtB AArBBhUoNtiUU/DbajnUgCAiteIRUOBcUcDItLi.HtL.iLvda iclAeisCspsDSrtOtp..copbpj./rL.AhoFsiLcB\nburnApUjnccDpMg\n/tA.a.tiBoMchoabapMnajtpsst.\n.eohcrUb/pitjCpxiO\n.3lLoLb.sAjc/DC\npAMpBa.UkMoeabFtjihlV\neesc/tOopre3n.CcOpLpL.AoDbAjBa\nseUtils_static.dir/src/Math/COLLADABUMathUtils.cpp.obj\n[ 9%] Building CXX object COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/Math/COLLADABUMathQuaterni[o n .9c%p]p .objBu\nilding CXX object COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/Math/COLLADABUMathMatrix4.cpp.obj\n[ 9%] Building CXX object common/libBuffer/CMakeFiles/buffer_static.dir/src/CommonFWriteBufferFlusher.cpp.obj\nIn file included from C:/Users/.../IfcOpenshell/deps/OpenCOLLADA/common/libBuffer/src/CommonFWriteBufferFlusher.cpp:11:\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/common/libBuffer/include/CommonFWriteBufferFlusher.h:44:9: error: 'int64_t' does not name a type\n 44 | typedef int64_t __int64;\n | ^~~~~~~\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/common/libBuffer/include/CommonFWriteBufferFlusher.h:38:1: note: 'int64_t' is defined in header '\u003ccstdint>'; this is probably fixable by adding '#include \u003ccstdint>'\n 37 | # include \u003ccstdio> /* FILE */\n +++ |+#include \u003ccstdint>\n 38 | #ifdef __FreeBSD__\nmake[2]: *** [common/libBuffer/CMakeFiles/buffer_static.dir/build.make:107: common/libBuffer/CMakeFiles/buffer_static.dir/src/CommonFWriteBufferFlusher.cpp.obj] Error 1\nmake[1]: *** [CMakeFiles/Makefile2:455: common/libBuffer/CMakeFiles/buffer_static.dir/all] Error 2\nmake[1]: *** Waiting for unfinished jobs....\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/COLLADABaseUtils/src/COLLADABUStringUtils.cpp: In static member function 'static bool COLLADABU::StringUtils::isNameStartChar(wchar_t)':\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/COLLADABaseUtils/src/COLLADABUStringUtils.cpp:220:45: warning: comparison is always false due to limited range of data type [-Wtype-limits]\n 220 | || ( c >= 0x10000 && c \u003c= 0xEFFFF);\n | ~~^~~~~~~~~~\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/COLLADABaseUtils/src/COLLADABUStringUtils.cpp:220:61: warning: comparison is always true due to limited range of data type [-Wtype-limits]\n 220 | || ( c >= 0x10000 && c \u003c= 0xEFFFF);\n | ~~^~~~~~~~~~\n[ 15%] Built target MathMLSolver_static\n[ 15%] Building C object Externals/LibXML/CMakeFiles/xml_static.dir/threads.c.obj\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/Externals/LibXML/threads.c: In function '__xmlGlobalInitMutexLock':\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/Externals/LibXML/threads.c:452:43: error: passing argument 1 of '_InterlockedCompareExchangePointer' from incompatible pointer type [-Wincompatible-pointer-types]\n 452 | InterlockedCompareExchangePointer(&global_init_lock, cs, NULL);\n | ^~~~~~~~~~~~~~~~~\n | |\n | struct _RTL_CRITICAL_SECTION * volatile*\nIn file included from C:/Program Files (x86)/MSys2/mingw64/include/winnt.h:27,\n from C:/Program Files (x86)/MSys2/mingw64/include/minwindef.h:163,\n from C:/Program Files (x86)/MSys2/mingw64/include/windef.h:9,\n from C:/Program Files (x86)/MSys2/mingw64/include/windows.h:69,\n from C:/Users/.../IfcOpenshell/deps/OpenCOLLADA/Externals/LibXML/threads.c:32:\nC:/Program Files (x86)/MSys2/mingw64/include/psdk_inc/intrin-impl.h:1759:58: note: expected 'void * volatile*' but argument is of type 'struct _RTL_CRITICAL_SECTION * volatile*'\n 1759 | void *_InterlockedCompareExchangePointer(void *volatile *Destination, void *ExChange, void *Comperand) {\n | ~~~~~~~~~~~~~~~~^~~~~~~~~~~\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/Externals/LibXML/threads.c: In function 'xmlOnceInit':\nC:/Users/.../IfcOpenshell/deps/OpenCOLLADA/Externals/LibXML/threads.c:933:34: warning: pointer targets in passing argument 1 of '_InterlockedIncrement' differ in signedness [-Wpointer-sign]\n 933 | if (InterlockedIncrement(&run_once.control) == 1) {\n | ^~~~~~~~~~~~~~~~~\n | |\n | DWORD * {aka long unsigned int *}\nC:/Program Files (x86)/MSys2/mingw64/include/psdk_inc/intrin-impl.h:1693:51: note: expected 'volatile long int *' but argument is of type 'DWORD *' {aka 'long unsigned int *'}\n 1693 | __LONG32 _InterlockedIncrement(__LONG32 volatile *Addend) {\n | ^\nmake[2]: *** [Externals/LibXML/CMakeFiles/xml_static.dir/build.make:387: Externals/LibXML/CMakeFiles/xml_static.dir/threads.c.obj] Error 1\nmake[1]: *** [CMakeFiles/Makefile2:359: Externals/LibXML/CMakeFiles/xml_static.dir/all] Error 2\n[ 16%] Linking CXX static library ../lib/libOpenCOLLADABaseUtils.a\n[ 16%] Built target OpenCOLLADABaseUtils_static\nmake: *** [Makefile:136: all] Error 2\n```","author":{"url":"https://github.com/VMajorczyk","@type":"Person","name":"VMajorczyk"},"datePublished":"2025-04-17T10:24:10Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/6568"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f7b740bb-034f-9c7d-c10d-7d20cb629434 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEA8:D0CA2:36083:47ABD:6B04AE20 |
| html-safe-nonce | 48b61b82f0a88847277506ca5452660a5a1a4b4a32ab49527a2ce9e336b05d87 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUE4OkQwQ0EyOjM2MDgzOjQ3QUJEOjZCMDRBRTIwIiwidmlzaXRvcl9pZCI6IjM2NTQ1MTM3NjE4Njk2NzE5NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dbca8099d56ee2fb8630a79950dc4ce3a2d4040838af78816c1bfccfc0ee70bf |
| hovercard-subject-tag | issue:3002078313 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/6568/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a86536df56c65b15dec545c4eabc0690b0ae7f26da571a0b9f41356e4fafde8b/IfcOpenShell/IfcOpenShell/issues/6568 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a86536df56c65b15dec545c4eabc0690b0ae7f26da571a0b9f41356e4fafde8b/IfcOpenShell/IfcOpenShell/issues/6568 |
| og:image:alt | Bug Description I followed the installation instructions provided at https://docs.ifcopenshell.org/ifcopenshell/installation.html for using IfcOpenShell with MSys2. After installing MSys2 as specif... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | VMajorczyk |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width