Hi, I’m trying to figure out how best to troubleshoot this issue, but I’d like to use PackageCompiler to create a relocatable binary for collaborators. I upgraded PackageCompiler to v1.7.0 (on Julia v1.6.3) and that took care of one error (AssertionError: 0 < tid <= length(THREAD_RNGs) during compilation with PackageCompiler) but now I’m hitting another set (please see below). Due to the “error: undefined reference to ‘ceil’” errors I suspect it has something to do with access to gcc on my cluster, but I’ve certainly loaded gcc 8.2.0. It is also complicated by my desire to incorporate a python package using PyCall which throws a warning that it might not be relocatable, so I realize that could be related and I have some troubleshooting ahead of me.
Given these issues, I also tried compiling locally on my mac and a vagrant ubuntu VM. Both compiled the app just fine but both resulted in segmentation faults (first three lines of error pasted further below) when I tried to run them. Running the MyApp example from PackageCompiler was informative: it fails for the same reasons on the cluster (“undefined reference to ‘ceil’” and the like) but works just fine on my Vagrant VM
I’m probably dealing with at least two different issues, but I’d appreciate if anyone had any suggestions!
Error from slurm cluster:
julia> create_app(".julia/dev/myapp", "Compiledmyapp", force = true)
┌ Warning: Package PyCall has a build script, this might indicate that it is not relocatable
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:734
┌ Warning: Package Conda has a build script, this might indicate that it is not relocatable
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:734
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
[ Info: PackageCompiler: creating system image object file, this might take a while...
┌ Info: Compiling bit-parallel GC counter for LongSequence{<:NucleicAcidAlphabet}
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:9
┌ Info: Compiling bit-parallel mismatch counter for LongSequence{<:NucleicAcidAlphabet}
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:26
┌ Info: Compiling bit-parallel match counter for LongSequence{<:NucleicAcidAlphabet}
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:46
┌ Info: Compiling bit-parallel ambiguity counter...
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:73
┌ Info: For a single LongSequence{<:NucleicAcidAlphabet}
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:74
┌ Info: For a pair of LongSequence{<:NucleicAcidAlphabet}s
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:88
┌ Info: Compiling bit-parallel certainty counter for LongSequence{<:NucleicAcidAlphabet}
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:119
┌ Info: Compiling bit-parallel gap counter for LongSequence{<:NucleicAcidAlphabet}
└ @ BioSequences $HOME/.julia/packages/BioSequences/k4j4J/src/longsequences/counting.jl:140
../lib/julia/sys.so: error: undefined reference to 'ceil'
../lib/julia/sys.so: error: undefined reference to 'floor'
../lib/julia/sys.so: error: undefined reference to 'fma'
../lib/julia/sys.so: error: undefined reference to 'fmaf'
../lib/julia/sys.so: error: undefined reference to 'fmod'
../lib/julia/sys.so: error: undefined reference to 'pow'
../lib/julia/sys.so: error: undefined reference to 'rint'
../lib/julia/sys.so: error: undefined reference to 'rintf'
../lib/julia/sys.so: error: undefined reference to 'trunc'
collect2: error: ld returned 1 exit status
ERROR: failed process: Process(`gcc '-DJULIAC_PROGRAM_LIBNAME="../lib/julia/sys.so"' -m64 -march=x86-64 -o myapp $HOME/.julia/packages/PackageCompiler/r1Ahd/src/embedding_wrapper.c ../lib/julia/sys.so -O2 '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/../lib/julia' -std=gnu99 -I$HOME/julia-1.6.3/include/julia -fPIC -L$HOME/julia-1.6.3/lib -L$HOME/julia-1.6.3/lib/julia -Wl,--export-dynamic -Wl,-rpath-link,$HOME/julia-1.6.3/lib -Wl,-rpath-link,$HOME/julia-1.6.3/lib/julia -ljulia -ljulia-internal`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error
@ ./process.jl:525 [inlined]
[2] run(::Cmd; wait::Bool)
@ Base ./process.jl:440
[3] run
@ ./process.jl:438 [inlined]
[4] run_compiler(cmd::Cmd)
@ PackageCompiler ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:128
[5] create_executable_from_sysimg(; sysimage_path::String, executable_path::String, c_driver_program_path::String)
@ PackageCompiler ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:1102
[6] (::PackageCompiler.var"#17#19"{String, String})()
@ PackageCompiler ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:1086
[7] cd(f::PackageCompiler.var"#17#19"{String, String}, dir::String)
@ Base.Filesystem ./file.jl:106
[8] _create_app(package_dir::String, dest_dir::String, name::Nothing, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, audit::Bool, force::Bool, cpu_target::String; library_only::Bool, c_driver_program::String, julia_init_c_file::Nothing, header_files::Vector{String}, version::Nothing, compat_level::String, include_lazy_artifacts::Bool, sysimage_build_args::Cmd, include_transitive_dependencies::Bool)
@ PackageCompiler ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:1083
[9] #create_app#13
@ ~/.julia/packages/PackageCompiler/r1Ahd/src/PackageCompiler.jl:819 [inlined]
[10] top-level scope
@ REPL[2]:1
Segmentation fault (first three lines) after compiling locally:
signal (11): Segmentation fault
in expression starting at none:0
memcpy at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)