I’ve already tried the basic debugging steps, including ensuring all dependencies are installed and checking system resources. Despite this, the build keeps failing.
I would really appreciate any guidance on:
How to resolve this specific linking issue.
Whether there are any pre-built Julia binaries or installation packages for the RISC-V architecture that I can use.
While I do see in the 2-year-old docs (has there much work been done since? RISC-V support was incomplete then):
Currently, this fork is compiling okay and seems to work fine.
I note that it used patched LLVM 14, and Julia is now at LLVM 18 or 19. It might help, actually, or hurt?
Two years ago is Julia 1.7-1.8 timeframe, and you might start with trying to build such Julia (i.e. some that uses LLVM 14). If you hit success, it might do for you, or then I would try 1.8, 1.9 etc.
RISC-V isn’t yet an officially-supported platform, thus no official binaries, nor unofficial that I know of (i.e. under “General usage” maybe misleading, rather go under internals category?), so unless you really need it, or want to help with it working, why are you using it?
You usually do not have to build Julia from source. It’s only for advanced/developer use, not for beginner Julia users. Not saying you are, maybe you want to help with RISC-V.
RISC-V has no official support tier, not even tier 3, maybe that would have been appropriate at the time, I’m guessing now (unofficial) tier 4 (only 1.10 is now stable version, older no longer supported, 1.10 will become LTS, and then likely 1.6 dropped as LTS soon, I’m even unclear on if 1.6 ever ran RISC-V):
Tier 3: Julia may or may not build. If it does, it is unlikely to pass tests. Binaries may be available in some cases. When they are, they should be considered experimental. Ongoing support is dependent on community efforts.
Tier 4: Julia built at some point in the past, but is known not to build currently.
A significant part of it, yeah; compiling LLVM on my VisionFive2 is a real doozy! I’ve kicked off a binary-dist build now, with a more conservative rv64gc target, so I should be able to share that here… in a couple of days
A cross-compiler is probably faster; I didn’t bother setting one up (which is always a bit annoying since how Julia’s build system really expects the ability to execute binaries). It’s just chugging along in the background.
I’m trying to install your build on my VisionFive 2 board, but I’m encountering a GLIBC compatibility error. Here’s the output I’m getting:
$ ./julia --version
ERROR: Unable to load dependent library /home/user/julia-0a92fecc12/bin/../lib/julia/libstdc++.so.6
Message:/lib/riscv64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/user/julia-0a92fecc12/bin/../lib/ju
$ ldd --version
ldd (Debian GLIBC 2.36-6) 2.36
It seems that the version of GLIBC on my system is 2.36, while the build requires GLIBC 2.38. Could you please guide me on how to resolve this issue? Are there any specific versions of Julia that are compatible with GLIBC 2.36, or would it be better to compile Julia from source?
There’s no easy way to build for an older glibc version, so I won’t be able to easily provide a more compatible build. Even the cross-build environment I’ve just set-up using GitHub - riscv-collab/riscv-gnu-toolchain: GNU toolchain for RISC-V, including GCC is already using glibc 2.40. I’ll try downgrading glibc in there, but no guarantees.
Thank you for the update! Would it be possible for you to generate a compatible version of Julia that supports GLIBC version 2.36 in visionfive? That would be incredibly helpful for us, as compiling the source of Julia directly on the VisionFive 2 board takes more than two days.
Not easily; the build I attempted for glibc 2.36 doesn’t execute here on device, and I don’t have the time to debug this. You’ll probably have to build it yourself.
I cannot imagine that build working for you, at least not on a VisionFive2. The build of the JuliaSyntaxHighlighting stdlib (which gets loaded as soon as you start the REPL) contains instructions that are not supported on that device:
Well, the csrr as part of Zicsr is, but the vlenb CSR is only available with Rvv. I’m not sure where this comes from, as I’m building with -march and Julia’s -C set to rv64gc. Maybe we’re not correctly forwarding -C to some of the package image builds…