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_setjmp is not exported on Windows, making it impossible to use the JL_TRY/JL_CATCH macros when embedding Julia #42245

Closed
Taaitaaiger opened this issue Sep 14, 2021 · 0 comments · Fixed by #42267
Assignees
Labels
regression Regression in behavior compared to a previous version
Milestone

Comments

@Taaitaaiger
Copy link
Contributor

Taaitaaiger commented Sep 14, 2021

On Windows jl_setjmp is implemented in assembly here (64 bit) and here (32 bit). On Linux, jl_setjmp is an "alias" to sigsetjmp. The result is that if the JL_TRY/JL_CATCH macros are used when embedding Julia on Linux they work successfully because suigsetjmp can be found in libc, but when embedding on Windows instead it fails because jl_setjmp is not exported.

The easiest way to reproduce this error is to wrap the call to jl_eval_string in the example found here with JL_TRY/JL_CATCH. I've used MINGW to compile the code, the instructions for MSVC didn't work but I haven't investigated this further because I have very little experience with developing on Windows and Visual Studio.

@vtjnash vtjnash added this to the 1.7 milestone Sep 14, 2021
@vtjnash vtjnash added the regression Regression in behavior compared to a previous version label Sep 14, 2021
@JeffBezanson JeffBezanson self-assigned this Sep 15, 2021
JeffBezanson added a commit that referenced this issue Sep 15, 2021
vtjnash pushed a commit that referenced this issue Sep 16, 2021
KristofferC pushed a commit that referenced this issue Sep 23, 2021
fix #42245

(cherry picked from commit c5f3487)
KristofferC pushed a commit that referenced this issue Sep 28, 2021
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
regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants