-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem building MeshIO in Ubuntu docker #9
Comments
Thanks for the good report. (Clearly I've never built it on Linux.)
|
This just means that instead of getting an error related to assimp, you'll get one related to this plugin which should be clearer. Part of #9
We use std::clamp which is a C++17 function. Part of #9
This is an attempt to fix a Linux build problem. Also turns on interprocedural optimization in release mode. Part of #9
Those commits should handle (1) & (2) and attempt to handle (3) (assuming it's coming from MeshIO)... |
Thank you very much for your quick reply and your fast fixes. |
Can you give more context around that "relocation R_X86_64_PC32" error? It doesn't tell us what's being linked. Probably something to do with the assimp lib. |
Yes sure, here is an excerpt of the stacktrace:
So my guess would be that the problem has something to do with the libMeshIO.so |
Yes, but it links with assimp statically which is the thing including libz. I just wanted to make sure it wasn't something else. The first thing I will do is update assimp to the latest release, though it doesn't look like there are any changes relevant to this. |
Does your output show cmake running at the top with all its output? I'm looking for this information:
If you have it, can you just copy the whole cmake output here? It will be long, so please use a collapsible section in the GitHub markdown to keep it reasonable. And then anything about assimp in the build which should be something like this:
|
Here are the full logs from the cmake commands of my Dockerfile. |
Ah - it's finding a local lib and using that:
It's possible I'm having a hard time with all the mutually-exclusive zlib-related options in assimp, but it looks like you can set the cmake option |
Thank you so much for your help!
The updated Dockerfile for reference and future use:
The entrypoint.sh script contains the following lines:
|
Great! Thanks for letting me know. I will change the plugin so |
Linux needs zlib built with -fPIC, so build it from the source. Reference: #9
Describe the bug
I'm wanting to use CloudCompare with your MeshIO plugin inside of a docker container.
So far I managed to build CloudCompare and run some of its functions in a ubuntu:focal container.
When I try to enable the MeshIO plugin in ubuntu:focal I get the following message:
"CMake Error at plugins/private/MeshIO/extern/assimp/CMakeLists.txt:41 (CMAKE_MINIMUM_REQUIRED):
CMake 3.22 or higher is required. You are running version 3.16.3"
Then I tried to build everything with cmake 3.22.0 built from scratch. Again CloudCompare works without the MeshIO plugin enabled, but running with the plugin gives me the following message:
"/CloudCompare/plugins/private/MeshIO/src/mioUtils.cpp: In function 'void {anonymous}::_assignMaterialProperties(aiMaterial*, ccMaterial::Shared&)':
/CloudCompare/plugins/private/MeshIO/src/mioUtils.cpp:131:29: error: 'clamp' is not a member of 'std'
property = std::clamp( property, 0.0f, 128.0f );"
After a bit of googling I found out that std:clamp was added with C++ 17.
So I tried to set the C++ version to C++ 17, by using the following commands on the CMakeLists.txt of CloudCompare and the MeshIO plugin:
"sed -i '1i set(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\nset(CMAKE_CXX_EXTENSIONS OFF)' CMakeLists.txt"
Now I get the following error:
"/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libz.a(deflate.o): relocation R_X86_64_PC32 against symbol `z_errmsg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value"
But I'm getting the fealing that I'm following the wrong lead, so my main question is the following:
How am I suppossed to build the MeshIO plugin in ubuntu?
Should I use a different linux distribution?
Or did I make another mistake?
How To Reproduce
I'm running the following Dockerfile:
The /data folder simply contains files of different formats, .ply .e57 .ifc .bin etc.
The entrypoint.sh script has the following content:
Expected behavior
As far as I understand I followed the build instructions for CloudCompare and MeshIO so I would expect it to build properly.
Additional context
I'm also using the e57_plugin as can be seen in the Dockerfile.
Your Environment
The text was updated successfully, but these errors were encountered: