Cannot load required shared library dllcore_stubs.
ZWindL opened this issue · 12 comments
OS: ArchLinux
Ocaml packages' version:
- ocaml 4.07.0-1
- ocaml-compiler-libs 4.07.0-1
- opam2 2.0.0_rc4-1 (that package is from aur)
utop version:
- 2.2.0 (using OCaml version 4.07.0)!
$CAML_LD_LIBRARY_PATH:
/home/zwindl/.opam/ocaml-base-compiler/lib/stublibs:/home/zwindl/.opam/ocaml-base-compiler/lib/ocaml/stublibs:/home/zwindl/.opam/ocaml-base-compiler/lib/ocaml
I installed utop
with opam, and that's the .ocamlinit
file:
(* Added by OPAM. *)
#use "topfind";;
#thread;;
#require "core.top";;
#require "core.syntax";;
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
It runs normally but print this error message:
Cannot load required shared library dllcore_stubs.
Reason: /home/zwindl/.opam/ocaml-base-compiler/lib/stublibs/dllcore_stubs.so: /home/zwindl/.opam/ocaml-base-compiler/lib/stublibs/dllcore_stubs.so: undefined symbol: makedev.
And when I try to build some samples with corebuild
, it prints:
+ ocamlfind ocamlopt -linkpkg -g -thread -package core test.cmx -o test.native
/usr/bin/ld: /home/zwindl/.opam/ocaml-base-compiler/lib/core/libcore_stubs.a(unix_stubs.o): in function `unix_mknod_stub':
/home/zwindl/.opam/ocaml-base-compiler/.opam-switch/build/core.v0.11.2/_build/default/src/unix_stubs.c:281: undefined reference to `makedev'
collect2: 错误:ld 返回 1
File "caml_startup", line 1:
Error: Error during linking
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
I'm not sure these two issues have connection.
My guess is that something changed in the latest version of Archlinux, the glibc or some other package and this is causing this build failure. Personally, I don't know what changed or how to fix it and I don't know how to find the answer either. To make progress on this issue, someone needs to look into this further.
That's the ArchLinux official repo's build of glibc
And that's the build files diff tree
And all the build flags are here
hope it's useful.
From the look of the error message, it might be a glibc issue.
I'm also using ArchLinux and had similar issue before. This patch fixed the link error for me.
Hope it helps.
Thanks for the feedback. I prepared a minor release of core including #114 and #115. However, I'm having troubles submitting the new release to the opam repository (tarides/dune-release#63). I'll wait for the dune-release to be fixed, but if someone wants to manually submit core v0.11.3 to the opam-repository, you are welcome to.
OK, thanks a lot, all of you.
Is there any sort of timeline for when this fix will happen that's been discussed in private or something? The issue on github @diml referenced seems to have had no discussion on it and I'm getting concerned.
@Rageoholic The patch is merged into master, but the release is not pushed to opam-repository.
I'm trying to pin Core to github, but it fails to build with public library core_kernel.config_h not found
. Same with pinning a local clone of this repo. core_kernel
is installed normally. Running archlinux. This seems like it could be some simple issue?
@mwgkgk Maybe you have to pin core_kernel too?
@Rageoholic it also fails to build, with
The following dependencies couldn't be met:
- core_kernel -> base_quickcheck
Your request can't be satisfied:
- No package named base_quickcheck found.
which, the package, is not in opam, and also fails to build when pinning to github. I'm just probably doing something wrong, so far research failed me though.
Make sure to pin the v0.11 branch, not master as master is not expected to build against the standard opam repository.
I submitted a new release: ocaml/opam-repository#12604