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

Cross-compilation support #54

Open
Corentin-Gauthier opened this issue Jan 27, 2025 · 2 comments
Open

Cross-compilation support #54

Corentin-Gauthier opened this issue Jan 27, 2025 · 2 comments

Comments

@Corentin-Gauthier
Copy link

Summary
Nimjl crashes when trying to get Julia version from a different architecture toolchain.

Description
I want to cross-compile a program for an aarch64 target on an x86 host. I have downloaded the Julia aarch64 toolchain and updated JULIA_PATH. The nimjl library crashes when it tries to get the Julia version with <JULIA_CROSS_TOOLCHAIN_DIR>/bin/julia -E VERSION. I have found a workaround by statically setting my version: installed in (config.nim) : const cmdOutput = "v\"1.10.6\"".

Alternatives
Get Julia version by parsing the name of <JULIA_CROSS_TOOLCHAIN_DIR>/lib/julia.so.<VERSION> or use another method that allows cross-compilation for multiple architectures ?

@Clonkk
Copy link
Member

Clonkk commented Jan 27, 2025

Ah indeed, this is highlighted in this comment

const cmdOutput = "v"1.10.6"".

This works as a workaround. You can also setup a CI in aarch64 so that the compiling environment matches the execution.

The proper solution will probably a define switch to match the aarch.

@Clonkk
Copy link
Member

Clonkk commented Jan 27, 2025

Tentative fix in #55

I would also make sure you have enough RAM to run Julia code on an aarch64 platform that doesn't compile locally.

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

No branches or pull requests

2 participants