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

jl_options no longer exported by libjulia.so #42411

Closed
dalekj opened this issue Sep 28, 2021 · 3 comments
Closed

jl_options no longer exported by libjulia.so #42411

dalekj opened this issue Sep 28, 2021 · 3 comments
Assignees
Labels
kind:regression Regression in behavior compared to a previous version
Milestone

Comments

@dalekj
Copy link

dalekj commented Sep 28, 2021

In order to call some Julia code from MATLAB, I have a c program with Julia embedded which gets compiled as a MEX function. Because MATLAB (or JVM) do weird things with signals, I have to turn off Julia's signal handling by incorporating the following line in my c program.

jl_options.handle_signals = JL_OPTIONS_HANDLE_SIGNALS_OFF;

For Julia versions through v1.5.x, jl_options was exported by libjulia.so, supporting this. However, with the library split into libjulia.so and libjulia-internal.so that occurred in v1.6, jl_options is no longer exported by libjulia.so, although it is exported by libjulia-internal.so. If I link to both of the libraries, things work as expected, but it is my understanding that this is not the supported interface to embedding Julia; libjulia.so is the supported entry point for embedding Julia.

Could jl_options be added to the libjulia.so re-export list for future versions?
Or if there is a good reason not to provide access to jl_options, is there an alternative way to turn off Julia's signal handling?

@vtjnash vtjnash added the kind:regression Regression in behavior compared to a previous version label Sep 28, 2021
@vtjnash
Copy link
Sponsor Member

vtjnash commented Sep 28, 2021

Yes, we should export a pointer to jl_options, for external consumers

@vtjnash vtjnash added this to the 1.7 milestone Sep 28, 2021
@JeffBezanson
Copy link
Sponsor Member

I have a fix for this in #41936; can separate and backport it.

@JeffBezanson JeffBezanson self-assigned this Sep 28, 2021
KristofferC pushed a commit that referenced this issue Oct 5, 2021
Co-authored-by: Jameson Nash <[email protected]>
(cherry picked from commit c5cb029)
@dalekj
Copy link
Author

dalekj commented Dec 9, 2021

Thanks for fixing this.
@JeffBezanson is it possible to get the fix backported to 1.6.x since that is the new LTS?

LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

3 participants