-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] assimp/5.4.3: Undefined minizip symbols on assimp static build #25765
Comments
It's not a issue coming from You have two libraries with conflicting CMake config files in your dependency graph:
As a workaround, you can override To summarize the root cause of this issue at conancenter recipe level: it's a |
Hi @SpaceIm and thanks for your feedback. About the workaround to change the cmake_file_name generated by CMakeDeps for minizip-ng requirement of opencolorio consumer, If I do that the find_package of opencolorio CMake scripts will not works anymore? Is this kind of issue could be detected by CMakeDeps and produce an explicit error log? Because this kind of issue is very time consuming to detect. Does I understand correctly if i say that minizip-ng is an API compatible replacement of minizip and this last is no more maintained? Regards. |
Not sure to understand. Are you afraid of some side effect in the build of opencolorio? There is no reason. When you override cmake_file_name of a dependency in your own conanfile (not the one of opencolorio), it doesn't change cmake_file_name in the internal conan build of your dependencies, each build logic is isolated. Anyway, I would change cmake_file_name of minizip, not minizip-ng.
I'm not an expert of this lib. If compatibility is enabled ( |
Ok then it is not a workaround if we need to fix the minizip recipe. To come back to mean to have CMakeDeps give a better feedback in case of such conflict, what do you think?
Hum interesting this mz_compatibility option . Regards. |
Sorry I don't understand what you mean or you misunderstood what I said. You can override in your own package cmake_file_name of minizip, it should fix build issue of your package, and it will not affect opencolorio build at all (which is working fine I guess). But consumers of your package may encounter this issue (if they use CMakeDeps), since overriding cmake_file_name is something isolated in each package. |
Hi @SpaceIm, Sorry for the misunderstanding, to take again https://github.com/EstebanDugueperoux2/conan_assimp_test example, I have added:
to CMakeDeps in my recipe in despite this last doesn't consume minizip directly. Regards. |
Now I have a segfault at runtime when my final static executable invoke "oiio::ColorConfig colorConfig(configOCIOFilePath);" :
I permit to ping @irieger which know well openimageio and opencolorio. Regards. |
To make an addition, I have tried to reproduce with a shared build with following command because opencolorio requires static minizip-ng as requirement:
but got linking error on openimageio:
also tried to do a full shared build with #24395 fix to have opencolorio works with a shared build of minizip-ng dependency, but links correctly only with gold linker and running also. Also tried with a shared build without conan, i.e. only with cmake using assimp and openimageio requirements from ubuntu package manager and it build and run without error. I would like to confirm if it is an openimageio recipe issue but doing same static build scenario without conan but I'm not able to have a static lib in ubuntu/debian repos. Regards. |
Hey, I have to admit I have never called into any of the OCIO related sections of OIIO. Don't know if it calls any function when just using it to read/write files but wouldn't assume so. However I now tried the OIIO::ColorConfig initialization and had it work in several scenarios. Somehow your sample code doesn't work also here, but I created a kind of derived sample and there I don't get any segfaults. Have to admit I have no clue why it would work in one case but not the other as to me the logic looks quite the same. See: https://github.com/irieger/conan_assimp_test, I added a folder oiio-only where I first started to reproduce just the color part and added back some code to include assimp (just copying parts from you. None of the situations failed. Also I was curious what an invalid path to OIIO::ColorConfig does but it seems to just load some defaults, no error. I really don't see why my code should work while yours is failing in this way. Also tested the OIIO ColorConfig part by hacking in a test to my project where I use OIIO and thus already link OIIO, shared all the way (using my https://github.com/irieger/conan-center-index/tree/with-non-upstream-changes branch where I have removed the config error on shared builds, requires gold or mold on Linux to build). So not really able to reproduce it besides your code where I'm not sure in why it could fail. |
Description
Having a package consuming assimp and openimageio as dependencies to do a static build, I encounter 2 issues:
See https://github.com/EstebanDugueperoux2/conan_assimp_test to reproduce.
I reproduce these issues only when adding openimageio requirement in addition to assimp.
Package and Environment Details
Conan profile
[settings]
os=Linux
arch=x86_64
compiler=gcc
compiler.cppstd=17
compiler.version=10
compiler.libcxx=libstdc++11
build_type=Release
Steps to reproduce
conan create . --build missing
Logs
https://github.com/EstebanDugueperoux2/conan_assimp_test/blob/main/static_build_with_assimp_and_openimageio_with_cmakedeps_property_workaround.log
The text was updated successfully, but these errors were encountered: