-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fmilib: add recipe for version 2.4.1 #20256
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 1cf10e7fmilibrary/2.4.1@#04070e62827fcbbbbbc509f1b9d3d51c
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request. I see many patches that could be sent to the upstream as well. Using find_package is not only a recommendation by Cmake part but also much safer than mimicking where artifacts are installed.
Co-authored-by: Uilian Ries <uilianries@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
vre = VirtualRunEnv(self) | ||
vre.generate(scope="build") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is normally not required for CMake projects. What is the purpose of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is need when option with_fmu=True
. Then, during the build process some executables need runtime access to what can be found in the virtual run environment.
recipes/fmilib/all/patches/2.4.1-003-use-expat-from-conan.patch
Outdated
Show resolved
Hide resolved
recipes/fmilib/all/patches/2.4.1-002-add-minizip-tools-as-functions.patch
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
- Simplify patches - Download minizip sources instead of patch - Write replace in file for a few minizip versions, 1.2.13 and 1.3.1 - Use CMakeDeps cmake_target_property instead of patching dependency target names
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Sorry for the delay. I have some concerns/suggestions and questions, would love to get some insight on some of the changes :)
recipes/fmilib/all/conanfile.py
Outdated
copy(self, "fmiModel*.h", self.dependencies["fmi1"].cpp_info.components["modex"].includedirs[0], | ||
path.join(self.build_folder, "fmis", "FMI1")) | ||
copy(self, "fmiPlatformTypes.h", self.dependencies["fmi1"].cpp_info.components["cosim"].includedirs[0], | ||
path.join(self.build_folder, "fmis", "FMI1")) | ||
copy(self, "fmiFunctions.h", self.dependencies["fmi1"].cpp_info.components["cosim"].includedirs[0], | ||
path.join(self.build_folder, "fmis", "FMI1")) | ||
copy(self, "*.h", self.dependencies["fmi2"].cpp_info.includedirs[0], | ||
path.join(self.build_folder, "fmis", "FMI2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any insights into why these folders can not to out of source for the build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason. I moved them to the source folder instead.
recipes/fmilib/all/conanfile.py
Outdated
minizip_code = { | ||
"1.3.1": | ||
{ | ||
"url": "https://zlib.net/fossils/zlib-1.3.1.tar.gz", | ||
"sha256": "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" | ||
}, | ||
"1.2.13": | ||
{ | ||
"url": "https://zlib.net/fossils/zlib-1.2.13.tar.gz", | ||
"sha256": "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" | ||
} | ||
} | ||
get(self, | ||
**minizip_code[str(self.dependencies["minizip"].ref.version)], | ||
pattern="*/minizip/*", | ||
strip_root=True, destination=path.join(self.build_folder)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik, the library needs the actual source code for minizip instead of relying in the compiled library (Would appreciate insight into this too!)
You actually get access to the dependency's conandata thru the self.dependencies
accessor, so this could be simplified to something like
minizip_code = { | |
"1.3.1": | |
{ | |
"url": "https://zlib.net/fossils/zlib-1.3.1.tar.gz", | |
"sha256": "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" | |
}, | |
"1.2.13": | |
{ | |
"url": "https://zlib.net/fossils/zlib-1.2.13.tar.gz", | |
"sha256": "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" | |
} | |
} | |
get(self, | |
**minizip_code[str(self.dependencies["minizip"].ref.version)], | |
pattern="*/minizip/*", | |
strip_root=True, destination=path.join(self.build_folder)) | |
minizip_version = self.dependencies["minizip"].ref.version | |
get(self, | |
**self.dependencies["minizip"].conandata["sources"][minizip_version], | |
pattern="*/minizip/*", | |
strip_root=True, destination=path.join(self.build_folder)) |
which allivieates some of your concerns - I would still like some way to avoid this, but alas seems like this will be that way to go forward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmilib
introduce minizip.c
and minunz.c
as functions instead of applications by changing their main
functions. To do this, fmilib
needs the minizip
sources. It also uses other functionality in minizip
, so the precompiled library is also needed. In patch file *002*.patch
, you can see the new header files for the patched functions.
Your suggestion worked nicely, thank you!
- Fetch minizip source info from conan_data - Copy fmi headers into source folder rather than build folder
Conan v1 pipeline ✔️All green in build 5 (
Conan v2 pipeline ✔️
All green in build 5 (
|
|
Hi @joakimono sorry for the radio silence - I've been talking with @uilianries and we're checking some changes to the recipe to make it a bit more maintenable, sorry that I didn't communitcate it better! |
Specify library name and version: fmilib/2.4.1
fmilibrary is a software package that enables integration of Functional Mock-up Units (FMUs). This library is an implementation of the FMI open standard.
This package is a dependency of the software provided by Open Simulation Platform.