JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.4k stars 5.46k forks source link

Build from source had failed (similar to #39293) #51264

Open alibayeh opened 12 months ago

alibayeh commented 12 months ago

Julia version: 1.9.3 - installed via released package from Julia website (I tried older versions and I got same error) OS: Linux 6.5.2 (with zen kernel) Arch: x86 Glibc version: 2.38 Output:

» julia
┌ Warning: CHOLMOD version incompatibility
│
│ Julia was compiled with CHOLMOD version 3.0.14. It is
│ currently linked with version 4.0.4.
│ This might cause Julia to terminate when working with
│ sparse matrix factorizations, e.g. solving systems of
│ equations with \.
│
│ It is recommended that you use Julia with the same major
│ version of CHOLMOD as the one used during the build, or
│ download the generic binaries from www.julialang.org,
│ which ship with the correct versions of all dependencies.
└ @ SparseArrays.CHOLMOD /opt/julia/share/julia/stdlib/v1.9/SparseArrays/src/solvers/cholmod.jl:198
[1]    175797 segmentation fault (core dumped)  julia

Moreover I got this error when I tried to build Julia from source with/without USE_BINARYBUILDER=0,

» gcc --version                                                                                                                                                                               1 ↵
gcc (GCC) 12.3.0
»
» git status
HEAD detached at v1.9.3
nothing to commit, working tree clean
»
» make -j8
.
.
.
    LINK usr/lib/libjulia-internal.so.1.9
    LINK usr/lib/libjulia-internal.so.1
    LINK usr/lib/libjulia-internal.so
    LINK usr/lib/libjulia-codegen.so.1.9
    LINK usr/lib/libjulia-codegen.so.1
    LINK usr/lib/libjulia-codegen.so
    JULIA usr/lib/julia/corecompiler.ji
make[1]: *** [sysimage.mk:61: /tmp/julia/usr/lib/julia/corecompiler.ji] Error 135
make: *** [Makefile:84: julia-sysimg-ji] Error 2
»
» ls /tmp/julia/usr/lib/julia/corecompiler.ji                                                                                                                                                 2 ↵
ls: cannot access '/tmp/julia/usr/lib/julia/corecompiler.ji': No such file or directory
oscardssmith commented 12 months ago

this sounds like a possible ld_preload issue

alibayeh commented 12 months ago

this sounds like a possible ld_preload issue

» ls /opt/julia/lib/julia/libcholmod.so.3.0.14
/opt/julia/lib/julia/libcholmod.so.3.0.14
» export LD_PRELOAD=$LD_PRELOAD:/opt/julia/lib/julia/; julia                                                                                                                                139 ↵
ERROR: ld.so: object '/opt/julia/lib/julia' from LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
ERROR: ld.so: object '/opt/julia/lib/julia' from LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
ERROR: ld.so: object '/opt/julia/lib/julia/' from LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
┌ Warning: CHOLMOD version incompatibility
│
│ Julia was compiled with CHOLMOD version 3.0.14. It is
│ currently linked with version 4.0.4.
│ This might cause Julia to terminate when working with
│ sparse matrix factorizations, e.g. solving systems of
│ equations with \.
│
│ It is recommended that you use Julia with the same major
│ version of CHOLMOD as the one used during the build, or
│ download the generic binaries from www.julialang.org,
│ which ship with the correct versions of all dependencies.
└ @ SparseArrays.CHOLMOD /opt/julia/share/julia/stdlib/v1.9/SparseArrays/src/solvers/cholmod.jl:198
[1]    179981 segmentation fault (core dumped)  julia
oscardssmith commented 12 months ago

I probably should have been more specific. The problem is likely that there is something in the path, not the lack of something (as in https://github.com/JuliaLang/julia/issues/48647 for example). Specifically, see if launching with LD_LIBRARY_PATH="" or LD_PRELOAD="" fixes it.

alibayeh commented 12 months ago

I probably should have been more specific. The problem is likely that there is something in the path, not the lack of something (as in #48647 for example). Specifically, see if launching with LD_LIBRARY_PATH="" or LD_PRELOAD="" fixes it.

Thank you. The problem is solved. Do you have any idea about the build error?

oscardssmith commented 12 months ago

not at all. That's really weird.

alibayeh commented 12 months ago

I found similar solved issue #39293 for Arm32bit Arch.

M-S-Jacobs2727 commented 8 months ago

Same thing happened to me; compiling v1.9.4 on Fedora 39 with gcc 13.2.1 I got the error

    ...
    JULIA usr/lib/julia/corecompiler.ji
make[1]: *** [sysimage.mk:61: /home/jacobs/software/julia/usr/lib/julia/corecompiler.ji] Error 139
make: *** [Makefile:84: julia-sysimg-ji] Error 2

Running again with LD_LIBRARY_PATH="" make allowed the build to complete (LD_PRELOAD="" make did not).

Additionally, when running make testall, I got the following output:

Whitespace check found no issues.
cp /home/jacobs/software/julia/usr/lib/julia/sys.so /home/jacobs/software/julia/local.so
/home/jacobs/software/julia/usr/bin/julia -J /home/jacobs/software/julia/local.so -e 'true'
rm /home/jacobs/software/julia/local.so
    JULIA test/all
make[1]: *** [Makefile:25: all] Segmentation fault (core dumped)
make: *** [Makefile:601: testall] Error 2

and again running LD_LIBRARY_PATH="" make testall fixed it. I'll update this comment if I find something similar.

Update: As I thought, once the installation and tests were completed, I tried installing a package in the REPL with

julia> ]add JuliaFormatter
Segmentation fault (core dumped)

but running the REPL with LD_LIBRARY_PATH="" julia installed it correctly. I'll make an alias as a workaround, but any other advice would be appreciated.