Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with "Path.Local.parent called on the root" #28

Closed
rnml opened this issue Mar 15, 2017 · 5 comments
Closed

Build fails with "Path.Local.parent called on the root" #28

rnml opened this issue Mar 15, 2017 · 5 comments

Comments

@rnml
Copy link

rnml commented Mar 15, 2017

After I got the most basic hello world program running from the quick start guide, I then tried to build a program that depends on Core. It failed with the error message mentioned in the issue title.

More concretely, this bash snippet

set -x
cat hello_world.ml
cat jbuild
cat jbuild-workspace
jbuilder build hello_world.exe || echo FAILED
cat _build/log

yields

+ cat hello_world.ml
open Core.Std

let command =
  let open Command.Let_syntax in
  Command.basic' ~summary:"say hello to the world"
    [%map_open
     let () = return ()
     in
     fun () ->
       print_endline "Hello, world!"
    ]
+ cat jbuild
;; -*- mode: lisp -*-

(jbuild_version 1)

(executables
 ((names (hello_world))
  (libraries (core))))
+ cat jbuild-workspace
;; -*- mode: lisp -*-
(context (
 (switch system)
 (merlin false)
))
+ jbuilder build hello_world.exe
Workspace root: /home/nathan/pill/src/hello-world
Running[0]: /usr/local/bin/opam config var root > /tmp/jbuild1cabf7.output
Running[1]: /usr/local/bin/opam config env --root /home/nathan/.opam --switch system --sexp > /tmp/jbuildb8308b.output
Running[2]: /usr/bin/ocamlc -config > /tmp/jbuild733b0a.output
Running[3]: /usr/bin/ocamlfind printconf path > /tmp/jbuildaf51b3.output
Running[4]: /usr/local/bin/opam config var lib > /tmp/jbuild796e42.output
Actual targets:
- _build/system/hello_world.exe
Internal error, please report upstream including the contents of _build/log.
Description: Path.Local.parent called on the root
Backtrace:
Raised at file "src/import.ml", line 20, characters 43-65
Called from file "src/lib_db.ml", line 19, characters 43-60
Called from file "src/lib_db.ml", line 19, characters 16-60
Called from file "src/lib_db.ml", line 19, characters 16-60
Called from file "src/lib_db.ml" (inlined), line 24, characters 14-45
Called from file "src/lib_db.ml", line 28, characters 8-42
Called from file "src/lib_db.ml", line 123, characters 43-68
Called from file "src/build_system.ml", line 201, characters 8-16
Called from file "src/build_system.ml", line 214, characters 16-24
Called from file "src/build_system.ml", line 201, characters 8-16
Called from file "src/build_system.ml", line 201, characters 8-16
Called from file "src/build_system.ml", line 231, characters 17-38
Called from file "src/build_system.ml", line 314, characters 27-53
Called from file "src/future.ml", line 93, characters 8-12
+ echo FAILED
FAILED
+ cat _build/log
# jbuilder build hello_world.exe
$ /usr/local/bin/opam config var root > /tmp/jbuild1cabf7.output
$ /usr/local/bin/opam config env --root /home/nathan/.opam --switch system --sexp > /tmp/jbuildb8308b.output
$ /usr/bin/ocamlfind printconf path > /tmp/jbuildaf51b3.output
$ /usr/local/bin/opam config var lib > /tmp/jbuild796e42.output
$ /usr/bin/ocamlc -config > /tmp/jbuild733b0a.output
# Jbuilder context:
#  ((name system)
#   (kind ((root /home/nathan/.opam) (switch system)))
#   (merlin false)
#   (for_host ())
#   (build_dir _build/system)
#   (toplevel_path (/home/nathan/.opam/system/lib/toplevel))
#   (ocaml_bin /usr/bin)
#   (ocaml /usr/bin/ocaml)
#   (ocamlc /usr/bin/ocamlc)
#   (ocamlopt (/usr/bin/ocamlopt))
#   (ocamldep /usr/bin/ocamldep)
#   (ocamllex /usr/bin/ocamllex)
#   (ocamlyacc /usr/bin/ocamlyacc)
#   (ocamlmklib /usr/bin/ocamlmklib)
#   (env
#    ((CAML_LD_LIBRARY_PATH
#      /home/nathan/.opam/system/lib/stublibs:/usr/lib/ocaml/stublibs)
#     (MANPATH :/home/nathan/.opam/system/man)
#     (OCAML_TOPLEVEL_PATH /home/nathan/.opam/system/lib/toplevel)
#     (OPAMSWITCH system)
#     (PATH
#      /home/nathan/.opam/system/bin:/home/nathan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
#     (PERL5LIB /home/nathan/.opam/system/lib/perl5)))
#   (findlib_path
#    (/usr/lib/ocaml/METAS
#     /usr/lib/ocaml
#     /usr/local/lib/ocaml/4.02.3
#     /home/nathan/.opam/system/lib))
#   (arch_sixtyfour true)
#   (natdynlink_supported true)
#   (opam_vars ((lib /home/nathan/.opam/system/lib) (root /home/nathan/.opam)))
#   (ocamlc_config
#    ((architecture amd64)
#     (asm as)
#     (asm_cfi_supported true)
#     (ast_impl_magic_number Caml1999M016)
#     (ast_intf_magic_number Caml1999N015)
#     (bytecomp_c_compiler
#      "gcc -O  -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O -fPIC")
#     (bytecomp_c_libraries "-lm  -ldl -lcurses -lpthread")
#     (cc_profile -pg)
#     (ccomp_type cc)
#     (cma_magic_number Caml1999A011)
#     (cmi_magic_number Caml1999I017)
#     (cmo_magic_number Caml1999O010)
#     (cmt_magic_number Caml2012T004)
#     (cmx_magic_number Caml1999Y014)
#     (cmxa_magic_number Caml1999Z013)
#     (cmxs_magic_number Caml2007D002)
#     (default_executable_name a.out)
#     (exec_magic_number Caml1999X011)
#     (ext_asm .s)
#     (ext_dll .so)
#     (ext_lib .a)
#     (ext_obj .o)
#     (host x86_64-pc-linux-gnu)
#     (model default)
#     (native_c_compiler "gcc -O  -D_FILE_OFFSET_BITS=64 -D_REENTRANT")
#     (native_c_libraries "-lm  -ldl")
#     (native_pack_linker "ld -r --hash-style=both --as-needed --build-id -o ")
#     (os_type Unix)
#     (ranlib ranlib)
#     (standard_library /usr/lib/ocaml)
#     (standard_library_default /usr/lib/ocaml)
#     (standard_runtime /usr/bin/ocamlrun)
#     (system linux)
#     (systhread_supported true)
#     (target x86_64-pc-linux-gnu)
#     (version 4.02.3)
#     (with_frame_pointers false)))
#   (which ((ocamlc (/usr/bin/ocamlc)) (ocamlfind (/usr/bin/ocamlfind)))))

@bmillwood
Copy link

Same symptoms as #15 -- are you using a jbuilder that includes the fix for that?

@ghost
Copy link

ghost commented Mar 16, 2017

1.0+beta3 was released yesterday and includes the fix for #15 BTW

@rnml
Copy link
Author

rnml commented Mar 19, 2017

Sweet, this worked for me. Thank you.

@rnml rnml closed this as completed Mar 19, 2017
@rnml
Copy link
Author

rnml commented Mar 19, 2017 via email

@ghost
Copy link

ghost commented Mar 20, 2017

With the development version of JS packages (stable release coming soon), (preprocess (pps (ppx_jane))) should just work. In the meantime, this should work: (preprocess (ppx (ppx_jane ppx_driver.runner)))

rgrinberg pushed a commit to rgrinberg/jbuilder that referenced this issue Jan 6, 2022
* nojb-master:
  configure: minimum libcurl version 7.28.0 (for curl_multi_wait)
  Multi.wait: fix
  Add optional argument ?timeout_ms
  Fix
  Bind to curl_multi_wait instead of curl_multi_fdset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants