Title: HDF5 linker issues with Visual Studio Debug configuration · Issue #4584 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: HDF5 linker issues with Visual Studio Debug configuration · Issue #4584 · IfcOpenShell/IfcOpenShell
X Title: HDF5 linker issues with Visual Studio Debug configuration · Issue #4584 · IfcOpenShell/IfcOpenShell
Description: For a while now I've had problems with building the v0.8.0 branch. I have managed to work around the issues, but since momentum is building for the v0.8.0 branch, I thought I'd share the issues and my workarounds in hopes that it will he...
Open Graph Description: For a while now I've had problems with building the v0.8.0 branch. I have managed to work around the issues, but since momentum is building for the v0.8.0 branch, I thought I'd share the issues and...
X Description: For a while now I've had problems with building the v0.8.0 branch. I have managed to work around the issues, but since momentum is building for the v0.8.0 branch, I thought I'd share the is...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/4584
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HDF5 linker issues with Visual Studio Debug configuration","articleBody":"For a while now I've had problems with building the v0.8.0 branch. I have managed to work around the issues, but since momentum is building for the v0.8.0 branch, I thought I'd share the issues and my workarounds in hopes that it will help others and maybe lead to permanent solutions.\r\n\r\nHere is my process using the `x64 Native Tools Command Prompt for VS 2022` environment:\r\n\r\n```\r\ngit clone --recursive https://github.com/IfcOpenShell/IfcOpenshell.git\r\ncd IfcOpenShell\r\ngit checkout v0.8.0\r\ngit submodule update --init --recursive\r\ncd .\\win\r\nset IFCOS_INSTALL_PYTHON=FALSE\r\nbuild-deps.cmd vs2022-x64 Debug\r\nbuild-deps.cmd vs2022-x64 Release\r\necho PY_VER_MAJOR_MINOR=312>> BuildDepsCache-x64.txt\r\necho PYTHONHOME=F:\\Python\\Python312>> BuildDepsCache-x64.txt\r\nrun-cmake.bat vs2022-x64\r\n```\r\n\r\nI'm not sure if `git submodule update --init --recursive` is still necessary. It was a workaround because of CityJSON early on. It would be nice if this step was automatic.\r\n\r\nAnyway, back to my process. I next open the IfcOpenShell.sln file with Visual Studio and use the `Build > Solution` command on the Debug and Release configurations.\r\n\r\nMultiple projects for both the Debug and Release configurations do not link with the following error:\r\n\r\n> LINK : fatal error LNK1181: cannot open input file 'F:\\IfcOpenshell\\_deps-vs2022-x64-installed\\HDF5-1.8.22-win64\\lib\\libhdf5_cpp.lib'\r\n\r\nActually, there are linker errors for all of the HDF5 libraries. I'm just showing one for simplicity.\r\n\r\nThe root cause is `build-deps.cmd vs2022-x64 Debug` builds (or maybe installs, I don't know) debug versions of the lib files and their names all end with \"..._D.lib\".\r\n\r\nMy workaround is to copy the contents of `F:\\IfcOpenshell\\_deps-vs2022-x64-installed\\HDF5-1.8.22-win64\\lib` away for safe keeping, delete the IfcOpenShell folder and start over.\r\n\r\nUsing the exact steps as before but reversing the order of running `build-deps.cmd` with Debug and Release options (use Release first).\r\n\r\nRelease builds are successful. Debug builds still fail, but for different reasons.\r\n\r\nRunning `build-deps.cmd vs2022-x64 Release` first builds or installs the HDF5 libraries without the \"..._D.lib\". You get the files with just \".lib\".\r\n\r\nDebug builds fail with the following errors (this is just a sample... you get lots of these):\r\n\r\n> libhdf5_cpp.lib(H5FcreatProp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in IfcConvert.obj\r\n> libhdf5_cpp.lib(H5FcreatProp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in IfcConvert.obj\r\n\r\nMy workaround is to copy all the HDF5 libraries with \"_D.lib\" that I saved away earlier into `F:\\IfcOpenshell\\_deps-vs2022-x64-installed\\HDF5-1.8.22-win64\\lib` and change the linker settings to use the \"_D.lib\" files. This fixes the problem but there are a lot of warnings about not having debugging information.\r\n\r\nDebug builds still fail, but now it's a linking issue with the boost libraries. The errors are similar to before:\r\n\r\n> libboost_program_options-vc143-mt-x64-1_79.lib(value_semantic.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in IfcConvert.obj\r\n> libboost_program_options-vc143-mt-x64-1_79.lib(value_semantic.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in IfcConvert.obj\r\n\r\nThis is a new issue that has crept in over the last couple of weeks. \r\n\r\nMy workaround is to change the linker settings to use the debug versions of the boost libraries by adding \"-gd\" after \"mt\" in the library name. For example, change `libboost_system-vc143-mt-x64-1_79.lib` to `libboost_system-vc143-mt-gd-x64-1_79.lib`.\r\n\r\nNow debug and release builds work.\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/RickBrice","@type":"Person","name":"RickBrice"},"datePublished":"2024-04-24T18:48:35Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/4584"}
| 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:905a0fbf-b33c-ef12-4e82-985b4b5b5aac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E688:292BF3:D9B4D:122E46:6B04B064 |
| html-safe-nonce | e8cbfd2fc64d44dd001545e293ba5ae2e8dfb9f9a1d7948bd88a84893d9f814e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjg4OjI5MkJGMzpEOUI0RDoxMjJFNDY6NkIwNEIwNjQiLCJ2aXNpdG9yX2lkIjoiNTI0NDA2NDQ3NjQ2NjI5NDg4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8eace9d764ae29a43353ad306a0bf5b905c88a289b1373908dd3a4ea4b1717bb |
| hovercard-subject-tag | issue:2261956992 |
| 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/4584/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e314526d51d2db3638c3319712074a3d7d97a6a29240d62f4ff1c6a7de3cda9/IfcOpenShell/IfcOpenShell/issues/4584 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e314526d51d2db3638c3319712074a3d7d97a6a29240d62f4ff1c6a7de3cda9/IfcOpenShell/IfcOpenShell/issues/4584 |
| og:image:alt | For a while now I've had problems with building the v0.8.0 branch. I have managed to work around the issues, but since momentum is building for the v0.8.0 branch, I thought I'd share the issues and... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RickBrice |
| 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