MSYS2 Mingw64 compilation#78
Conversation
Fresh-Upgrade-1
…ing but the following: - IFC4 (only IFC2x3 tried; should work) - VLD - IfcMax - shared libraries
|
Thanks much. I will have a look and get back to you. As for the |
|
Thanks for the openCollada link. Indeed, it would solve the problem. Fred- Dr. Frédéric Bosché Heriot-Watt Univeristy Construction Project Management and Quantity Surveyinghttp://www.hw.ac.uk/schools/energy-geoscience-infrastructure-society/undergraduate/cpmqs.htm – Ranked #1 in Scotland and #3 in UK (NSS 2015) From: Thomas Krijnen [mailto:notifications@github.com] Thanks much. I will have a look and get back to you. As for the COLLADASW::Scene::Scene(), it seems you were unlucky enough to catch this moment in the OpenCollada repository. This was actually addressed by me some time ago: KhronosGroup/OpenCOLLADA@42fef78KhronosGroup/OpenCOLLADA@42fef78 — Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and science. The contents of this e-mail (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. |
|
Thanks for the initial work @Fredounet. Do you happen to have any kind of build script for the dependencies or did you simply build each by hand? |
|
With MSYS2, things are pretty simple. Everything is already built and only needs to be installed from the repository (not all packages are there in the default installation). The only thing I had to build is OCE. FOr this, I did the following (I could put this somewhere else on this website: Using MSYS2, follow the "Building" procedure at https://github.com/tpaviot/oce/wiki/Build-%28MinGW-w64%29. For what follows, please note that I compiled with mingw64, not mingw32. So, adapt as needed. So, I installed the For Cmake, use Like always with OCE, compilation takes forever (but it's a good idea to remember to use |
|
I could write a script for this, indeed. But, I always seem to experience slightly different issues. Anyways, I'll put this on my todo list. |
|
Thanks for the info. |
|
I've created a new PR based on this #84. With some additional changes. Shuffled around the preprocessor macros a bit. The description also contains a small script. Overall building with MSYS2 is a breeze. I'll close this one and leave the other one open for feedback for a while. |
Define the boundary the Path-A web-bring-up refactor will move things
across:
- ViewportHost.h is the embedder interface — surface creation,
framebuffer geometry, frame scheduling, quit, and notification
callbacks (onObjectPicked, onToolModeChanged, …). Desktop hosts
forward notifications to Q_SIGNALS; the future web host pushes
them to JS callbacks.
- ViewportCore.{h,cpp} is the platform-agnostic render-core target.
Empty today — the body fills in across the #78-#86 sequence as
each Qt subsystem (matrices, vectors, strings, timers, render
path, input) gets de-Qt'd and moved over.
- ViewportWindow now multiply-inherits ViewportHost alongside QWindow
and implements the host overrides as thin forwarders: createSurface
returns the cached surface_, requestFrame -> requestUpdate, quit ->
QCoreApplication::quit, onObjectPicked -> emit objectPicked.
Renamed the DPR accessor `dpr()` (vs `devicePixelRatio`) to avoid
the inherited-virtual clash with QWindow's qreal-returning version.
No method movement yet — this is purely the architectural scaffold so
subsequent commits have a destination.
Replace Qt math wrappers with Eigen across ViewportWindow, OverlayRenderer, Federation, and the bonsai-side viewport modules. Eigen was already the canonical type for the actually-important matrix work (InstanceCompose, ModelGpuData, federation matrices); QVector3D/QVector4D/QMatrix4x4 were leftover from when Qt was the path of least resistance. They offered nothing over Eigen for our use case beyond a few graphics helpers (lookAt / perspective / ortho) which were 30 lines to write. Substitutions: QMatrix4x4 → Eigen::Matrix4f QVector2D → Eigen::Vector2f QVector3D → Eigen::Vector3f QVector4D → Eigen::Vector4f API rewrites: .lengthSquared() → .squaredNorm() .length() → .norm() .isNull() → .isZero() .setToIdentity() → .setIdentity() .constData() → .data() .toVector3D() → .head<3>() .inverted(&ok) → tryInvert4f(M, out) Q::dotProduct(a,b) → a.dot(b) Q::crossProduct(a,b) → a.cross(b) QMat4x4(... row-major) → Eigen::Map<const Matrix4f>(col-major buf) QMat4x4().lookAt(...) → lookAtRH(eye, target, up) QMat4x4().perspective(.) → perspectiveYFovGL(fovy, aspect, n, f) QMat4x4().ortho(...) → orthoGL(l, r, b, t, n, f) Default-init divergence handled explicitly (QMatrix4x4() = identity, QVector3D() = zero; Eigen leaves both uninitialized). Public API (CameraState, HomeView, ViewportWindow::computeObjectAabb, the addSectionPlaneAtSurface / pickSurfaceAt / raycast signatures) follows through to Eigen too; bonsai-side View.cpp and Commands.cpp updated to match. Camera helpers (lookAtRH, perspectiveYFovGL, orthoGL, tryInvert4f) extracted to a new CameraMath.h so OverlayRenderer's gizmo MVP and ViewportWindow's buildViewProj share the same definitions. Federation drops its <QVector3D> include in favour of <Eigen/Dense> (already had the latter for the georef matrices). Builds: desktop IfcViewerMinimal ✓, BonsaiViewer ✓, web IfcViewerWeb ✓. Tests: 100/100 pass. Closes #78 + #79; opens the door for #80-#83.
Compiling IfcOpenShell using MSYS2 shell and mingw64 toolchain.
Some of the changes were suggested to me by some of the members here. There is one I created that 'works' but could be incorrect. This is the change to ColladaSerializer.cpp. Could it be due to the version of boost used in MSYS2 (1.60)?
For make, I encountered various issues for which work-arounds are listed here
error: 'locale_t' does not name a typeno matching function for call to 'COLLADASW::Scene::Scene(COLLADASW::StreamWriter*&, COLLADASW::URI)' COLLADASW::Scene scene (mSW, COLLADASW::URI ("#" + scene_id));COLLADASW::URI ("#" + scene_id)as 3rd parameter ofCOLLADASW::Scene scene ();(same as 2nd parameter).error: no matching function for call to 'std::basic_ostream<char>::setf(const openmode&)'!defined(__CYGWIN__)todefined(__CYGWIN__)on line 30 of IfcGeomServer.cpp (note that removing it entirely didn't work).Note: I only tried compilation for IFC2x3. I also didn't build IfcMax nor shared libraries.
Note: when compiling IfcGeomFunctions.cpp, I got the following message. I don't know if it is specific to compilation with MSYS2 though:
C:/msys64/IfcOpenShell/src/ifcgeom/IfcGeomFunctions.cpp:139:2: warning: #warning "You are linking against linking against an older version of Open CASCADE. Version 6.9.0 introduces various improvements with relation to boolean operations. You are advised to upgrade." [-Wcpp]