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

Distribute versioned shared libraries #106

Closed
edubart opened this issue Jul 17, 2023 · 0 comments · Fixed by #67
Closed

Distribute versioned shared libraries #106

edubart opened this issue Jul 17, 2023 · 0 comments · Fixed by #67
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@edubart
Copy link
Contributor

edubart commented Jul 17, 2023

Context

Currently an application that was linked to a newer libcartesi.so version such as v0.14.0 is able to run on systems with old emulators version such as v0.13.0 and potentially crash because of mismatches in the C ABI interface. This is because the shared library always has the name cartesi.so, and there is no option to link to a versioned shared library.

This is also a problem in an environment where different emulator versions coexist in different paths, a typical situation when developing a new emulator while having to test an old emulator.

Possible solutions

We should start distributing a versioned shared library, such as libcartesi.so.0.14.0 and make libcartesi.so a symlink to it.
This way we can link programs to versioned shared libraries, and then attempts to run an application that was actually linked to a different emulator will give an error about the shared library not found instead of a crash or undefined behavior. We should also make use of this, that is, start to link a versioned library for cartesi.so.

@edubart edubart added the enhancement New feature or request label Jul 17, 2023
@mpolitzer mpolitzer linked a pull request Aug 9, 2023 that will close this issue
@mpolitzer mpolitzer moved this from Todo to Waiting Review in Machine Emulator SDK Aug 9, 2023
@edubart edubart moved this from Waiting Review to PR Available in Machine Emulator SDK Aug 14, 2023
@edubart edubart added this to the v0.15.0 milestone Aug 14, 2023
@github-project-automation github-project-automation bot moved this from PR Available to Done in Machine Emulator SDK Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants