Install fails 2
Closed this issue · 6 comments
dpo commented
On one of my servers, building CUTEst.jl
fails with the message
ln: failed to create symbolic link ‘../usr/lib/libgfortran.so’: File exists
Any idea?
abelsiqueira commented
Can you run ldconfig -p | grep gfortran
and post the result?
abelsiqueira commented
If there is a locate
command on the distribution, try locate libgfortran.so
also.
dpo commented
I get
$ ldconfig -p | grep gfortran
libgfortran.so.3 (libc6,x86-64) => /lib64/libgfortran.so.3
[BLADES:dorban@frontal22:~]$ locate libgfortran.so
-bash: locate: command not found
but note that I installed gfortran with Linuxbrew. I think the sure way to get the correct location of libgfortran is
$ gfortran --print-file libgfortran.so
/home/dorban/.linuxbrew/Cellar/gcc/5.5.0_4/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../../libgfortran.so
so that the gfortran
that appears in the PATH
is picked up.
abelsiqueira commented
gfortran --print-file
is so much better than what I have. I'm updating to use it.
dpo commented
If I install CUTEst outside of Julia, I still get an error:
julia> Pkg.build("CUTEst")
INFO: Building CUTEst
INFO: External CUTEst installation found
julia> Pkg.test("CUTEst")
INFO: Computing test dependencies for CUTEst...
INFO: No packages to install, update or remove
INFO: Testing CUTEst
Testing interfaces on problem brownden
ld: cannot find /home/dorban/.julia/v0.6/CUTEst/src/../deps/usr/lib/libgfortran.so: No such file or directory
This resolves it for me when using an external installation of CUTEst:
diff --git a/src/CUTEst.jl b/src/CUTEst.jl
index 8224283..d5c2ec8 100644
--- a/src/CUTEst.jl
+++ b/src/CUTEst.jl
@@ -21,7 +21,7 @@ end
const funit = convert(Int32, 42);
@static is_apple() ? (const linker = "gfortran") : (const linker = "ld")
@static is_apple() ? (const sh_flags = ["-dynamiclib", "-undefined", "dynamic_lookup"]) : (const sh_flags = ["-shared"]);
-@static is_apple() ? (const libgfortran = []) : (const libgfortran = [joinpath(@__DIR__, "..", "deps", "usr", "lib", "libgfortran.so")])
+@static is_apple() ? (const libgfortran = []) : (const libgfortran = [strip(readstring(`gfortran --print-file libgfortran.so`)])
type CUTEstException <: Exception
info :: Int32
abelsiqueira commented
Should be fixed after JuliaLang/METADATA.jl#14233