Skip to content
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

Improved content description of binaries and resources dirs (#1822) #1832

Conversation

friedrichatgc
Copy link
Member

Clearly define which files should go the binaries and resources dir of the FMU which when these dirs must be unpacked by the FMU importer.

…#1822)

Clearly define which files should go the binaries and resources dir of
the FMU which when these dirs must be unpacked by the FMU importer.
@chrbertsch chrbertsch linked an issue Nov 18, 2022 that may be closed by this pull request
@@ -84,19 +87,20 @@ The header files `fmi3PlatformTypes.h`, `fmi3FunctionTypes.h` and `fmi3Functions

===== Directory `binaries` [[binaries-directory]]

A binary FMU must contain the binary files for all supported platforms in this folder.
A binary FMU must contain, for each supported platform, the shared library `<modelIdentifier>.{dll|dylib|so}` and all files which are needed to load this shared library
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An FMU may also ship with static libraries.

@clagms clagms assigned clagms and t-sommer and unassigned clagms Nov 23, 2022
@chrbertsch
Copy link
Collaborator

Webmeeting: @t-sommer : I will come up with proposals to simplify the wording. Could also be backported to FMI 2.0.x

Copy link
Collaborator

@pmai pmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content-wise seems the right thing to me, tightened wording would be OK by me.

docs/2_5_fmu_distribution.adoc Outdated Show resolved Hide resolved
Co-authored-by: Pierre R. Mai <pmai@pmsf.de>
To use the binaries of a specific platform, all items in that platform-specific binary folder must be unpacked at the same location as the binary `<modelIdentifier>.{dll|dylib|so}`.
This is needed since the shared library may search for other files, needed during library load time, relative to its own file location.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reasoning should not be normative.


====== FMUs with static libraries [[binaries-directory-static]]

A static library binary FMU must contain, for each supported platform and ABI, the static library `<modelIdentifier>.{a|lib}` and all files which are needed to link with this static library
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requiring "all files which are needed to link with this static library" to be contained in the FMU would render any FMU illegal that has external dependencies (caused by the static library).


A static library binary FMU must contain, for each supported platform and ABI, the static library `<modelIdentifier>.{a|lib}` and all files which are needed to link with this static library
in the corresponding platform-specific binary folder.
These binary files may go into an ABI specific subdirectory, see <<platform-tupe-definition>> also for linking instructions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This folder must not be a subdirectory of the platform binary directory but the binaries directory. Also, we should not allow spreading libraries and dependencies across multiple folders.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, we should have a concise set of rules for the naming and availability at runtime in the spec and move all the reasoning and explanations to the implementers guide.

@andreas-junghanns
Copy link
Contributor

All: Markus dropped off our planet. Any change we want to be made, we must now make. @t-sommer : will you take over? You seem most interested...

@chrbertsch
Copy link
Collaborator

We should decide whether to proceed with this PR or close it, if the changes are not considered helpful.

@chrbertsch
Copy link
Collaborator

FMI Design Meeting:
Pierre: the original intent was to clarify that in binaries only things are put that are needed at link or load time.
For things needed at runtime, they have to be put in resources
Torsten: Give a rational that the FMU may depend on files that must be present during load time.
Pierre: Link time is different for statically or dynamically linked library.
Pierre: There is a whole section in the IG! The reason for this PR was, that people were unclear that platform specific files can be in resources.
Pierre: Similar questions currently arise in the XCP LS, so a clarification is welcome. E.g. would not expect A2L files in resources or binaries, as they are not needed during runtime. Only for specific use cases the A2L file would be needed during runtime ...

Christian: I will create a new PR

@chrbertsch
Copy link
Collaborator

Superseded by #1849

@chrbertsch chrbertsch closed this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relax content description of /binaries folder
6 participants