calling libgmsh from julia
Hi,
I managed to build gmsh
with -DENABLE_BUILD_DYNAMIC=1 ..
, and after installing the following files appeared in my /usr/local/lib
build > ll /usr/local/lib/*gmsh*
lrwxrwxrwx 1 root root 14 lug 31 09:45 /usr/local/lib/libgmsh.so -> libgmsh.so.4.9
lrwxrwxrwx 1 root root 16 lug 31 09:45 /usr/local/lib/libgmsh.so.4.9 -> libgmsh.so.4.9.0
-rw-r--r-- 1 root root 551M lug 30 16:57 /usr/local/lib/libgmsh.so.4.9.0
-rw-r--r-- 1 root root 260K lug 30 16:30 /usr/local/lib/gmsh.jl
-rw-r--r-- 1 root root 299K lug 30 16:30 /usr/local/lib/gmsh.py
but when I tried to launch one of the tutorials I got
julia> using gmsh
julia> include("/home/andrea/tmp/gmsh/tutorial/julia/t16.jl")
ERROR: LoadError: could not load symbol "gmshInitialize":
julia: undefined symbol: gmshInitialize
Stacktrace:
[1] initialize(::Array{String,1}, ::Bool) at /usr/local/lib/gmsh.jl:42
[2] initialize() at /usr/local/lib/gmsh.jl:41
[3] top-level scope at /home/andrea/tmp/gmsh/tutorial/julia/t16.jl:5
[4] include(::String) at ./client.jl:457
[5] top-level scope at REPL[16]:1
in expression starting at /home/andrea/tmp/gmsh/tutorial/julia/t16.jl:5
apparently julia cannot load the library I just compiled as I got
julia> Libdl.find_library(["libgmsh"], ["/usr/local/lib/"])
""
but it can load the library downloaded from gmsh.info, and I got
julia> Libdl.find_library(["libgmsh"], ["/home/andrea/tmp/gmsh/build/sdk/gmsh-4.8.4-Linux64-sdk/lib"])
"/home/andrea/tmp/gmsh/build/sdk/gmsh-4.8.4-Linux64-sdk/lib/libgmsh"
however. this library gives me the following error when trying to open the gui (gmsh.fltk.run()
)
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
which is why I tried to compile gmsh
from source
can you suggest anything I could try
many thanks in advance! Andrea
Edited by Andrea Vigliotti