caml-list - the Caml user's mailing list
 help / Atom feed
* [Caml-list] ocamlbuild(0.14) -> core(v0.12.0) -> fails at runtime
@ 2019-03-08 23:09 Papa Tango
  2019-03-11 11:18 ` Jeremie Dimino
  0 siblings, 1 reply; 2+ messages in thread
From: Papa Tango @ 2019-03-08 23:09 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]

I believe there may be a bug in ocamlbuild when attempting to build
projects that require Jane Street's Core and related packages. Or perhaps
the error lies with Core, but I am no judge. Or perhaps my use of
ocamlbuild is flawed.

I started a simple project from scratch and with just 2 modules, and one of
them merely being dedicated to command line parsing, I could not get the
program to work with the most recent versions of OCaml (4.07.1), Core
(v.0.12.0), and ocamlbuild (0.14) available through opam (v2.0.0), all on a
Debian box. The project compiles but at runtime I get an error:

Fatal error: cannot load shared library dllcore_stubs
Reason: /<home_path>/.opam/4.07.1/lib/stublibs/dllcore_stubs.so: undefined
symbol: caml_exn_Invalid_argument

I double checked my environment variables. And this was not within an emacs
shell. In my Makefile I was passing -pkgs to ocamlbuild a list including
core, and I experimented with adding base and core_kernel, but that didn't
help. I slowly stripped away dependencies of anything related to Core, but
the error persisted until I completely removed Core. I was not even using
Core for command line parsing, nor in the module dedicated to command line
parsing. Compilation was always successful, however.

Finally, I gave up and downgraded to Ocaml 4.06.0 and Core 0.11.3 and the
same project compiles and runs just fine while including Core. Considering
that my version of ocamlbuild did not downgrade, I suspect something
changed over at Core...but still...it would be nice to support building
with Core even if the error lies there.   Has anyone else seen this issue?

Thank you.

-Paul

[-- Attachment #2: Type: text/html, Size: 1869 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] ocamlbuild(0.14) -> core(v0.12.0) -> fails at runtime
  2019-03-08 23:09 [Caml-list] ocamlbuild(0.14) -> core(v0.12.0) -> fails at runtime Papa Tango
@ 2019-03-11 11:18 ` Jeremie Dimino
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremie Dimino @ 2019-03-11 11:18 UTC (permalink / raw)
  To: Papa Tango; +Cc: caml-list

Could you open a ticket on github.com/janestreet/core? That's the
right place to report such errors.

Additionally, could you try to reproduce the error with dune rather
than ocamlbuild? Building an application using Core with ocamlbuild
should work, however it is not being tested.

Thanks,

Jeremie

On Fri, Mar 8, 2019 at 11:09 PM Papa Tango <papatango.nyc@gmail.com> wrote:
>
> I believe there may be a bug in ocamlbuild when attempting to build projects that require Jane Street's Core and related packages. Or perhaps the error lies with Core, but I am no judge. Or perhaps my use of ocamlbuild is flawed.
>
> I started a simple project from scratch and with just 2 modules, and one of them merely being dedicated to command line parsing, I could not get the program to work with the most recent versions of OCaml (4.07.1), Core (v.0.12.0), and ocamlbuild (0.14) available through opam (v2.0.0), all on a Debian box. The project compiles but at runtime I get an error:
>
> Fatal error: cannot load shared library dllcore_stubs
> Reason: /<home_path>/.opam/4.07.1/lib/stublibs/dllcore_stubs.so: undefined symbol: caml_exn_Invalid_argument
>
> I double checked my environment variables. And this was not within an emacs shell. In my Makefile I was passing -pkgs to ocamlbuild a list including core, and I experimented with adding base and core_kernel, but that didn't help. I slowly stripped away dependencies of anything related to Core, but the error persisted until I completely removed Core. I was not even using Core for command line parsing, nor in the module dedicated to command line parsing. Compilation was always successful, however.
>
> Finally, I gave up and downgraded to Ocaml 4.06.0 and Core 0.11.3 and the same project compiles and runs just fine while including Core. Considering that my version of ocamlbuild did not downgrade, I suspect something changed over at Core...but still...it would be nice to support building with Core even if the error lies there.   Has anyone else seen this issue?
>
> Thank you.
>
> -Paul



-- 
Jeremie

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 23:09 [Caml-list] ocamlbuild(0.14) -> core(v0.12.0) -> fails at runtime Papa Tango
2019-03-11 11:18 ` Jeremie Dimino

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox