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

Register the c-file libraries as :static. #162

Closed
wants to merge 1 commit into from

Conversation

ralt
Copy link
Contributor

@ralt ralt commented May 23, 2020

Note, however, that it is not running LOAD-FOREIGN-LIBRARY, as that
would have it reloaded when the image is restored. For example, SBCL
stores the loaded foreign libraries in its "shared objects" concept,
and tries to restore them all by default when restoring. See also
#157 for a similar effect.

By registering the c-file libraries as :static, using the
recently-merged FOREIGN-LIBRARY-LOAD-STATE, we can make CFFI not use
dlopen() after the image is restored, when the library will be needed.

Note, however, that it is not running LOAD-FOREIGN-LIBRARY, as that
would have it reloaded when the image is restored. For example, SBCL
stores the loaded foreign libraries in its "shared objects" concept,
and tries to restore them all by default when restoring. See also
cffi#157 for a similar effect.

By registering the c-file libraries as :static, using the
recently-merged FOREIGN-LIBRARY-LOAD-STATE, we can make CFFI not use
dlopen() after the image is restored, when the library will be needed.
@sionescu
Copy link
Member

This behavior is incorrect: the ASDF operation is generating a .so, which is a shared object not a static archive. You can't just declare it to be statically linked.

@ralt
Copy link
Contributor Author

ralt commented May 24, 2020

Hm, indeed, it only works in the context of static-program-op. I'll try to think of a way to apply this state only for this operation.

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.

None yet

2 participants