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

Compiling on Mac OS X #2

Open
ontologiae opened this issue May 16, 2012 · 1 comment
Open

Compiling on Mac OS X #2

ontologiae opened this issue May 16, 2012 · 1 comment

Comments

@ontologiae
Copy link

Hello, I have an issue when I try to compile it on Mac OS X 10.7
It still an issue with Dynlink. I even applyed the dynlink patch on Ocaml, so I have Dynlink libs
-rw-r--r-- 1 root admin 26K 8 mar 16:18 dynlink.a
-rw-r--r-- 1 root admin 137K 5 avr 04:33 dynlink.cma
-rw-r--r-- 1 root admin 1,8K 5 avr 04:33 dynlink.cmi
-rw-r--r-- 1 root admin 3,1K 8 mar 16:18 dynlink.cmx
-rw-r--r-- 1 root admin 1,1K 8 mar 16:18 dynlink.cmxa
-rw-r--r-- 1 root admin 6,0K 5 avr 04:33 dynlink.mli

After a lot of warnings, like

  • ocamlfind ocamlopt -c -g -package findlib -package dynlink -I src -I src/utils -I src/typing -I src/toplevel -I src/parsing -I src/jitcomp -I src/bytecomp -I src/asmcomp -o src/ocamlnat.cmx src/ocamlnat.ml
    findlib: [WARNING] Interface toploop.cmi occurs in several directories: /opt/local/lib/ocaml, src/toplevel
    findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /opt/local/lib/ocaml, src/toplevel
    findlib: [WARNING] Interface topmain.cmi occurs in several directories: /opt/local/lib/ocaml, src/toplevel
  • /opt/local/bin/ocamlmklib -o src/ocamlnat src/jitcomp/natjit.o
    ld: warning: -read_only_relocs cannot be used with x86_64

I have

  • ocamlfind ocamlopt -g -linkpkg -package findlib -package dynlink src/asmcomp/arch.cmx src/utils/misc.cmx src/parsing/linenum.cmx src/utils/terminfo.cmx src/utils/warnings.cmx src/parsing/location.cmx src/parsing/longident.cmx src/typing/ident.cmx src/typing/path.cmx src/typing/primitive.cmx src/typing/types.cmx src/typing/btype.cmx src/typing/predef.cmx src/typing/datarepr.cmx src/utils/tbl.cmx src/typing/subst.cmx src/utils/config.cmx src/utils/clflags.cmx src/utils/consistbl.cmx src/typing/env.cmx src/bytecomp/lambda.cmx src/asmcomp/debuginfo.cmx src/asmcomp/clambda.cmx src/asmcomp/compilenv.cmx src/bytecomp/switch.cmx src/asmcomp/closure.cmx src/asmcomp/cmm.cmx src/asmcomp/reg.cmx src/asmcomp/mach.cmx src/utils/ccomp.cmx src/asmcomp/proc.cmx src/asmcomp/cmmgen.cmx src/asmcomp/coloring.cmx src/asmcomp/comballoc.cmx src/asmcomp/linearize.cmx src/asmcomp/emitaux.cmx src/asmcomp/interf.cmx src/asmcomp/interval.cmx src/asmcomp/linscan.cmx src/asmcomp/printcmm.cmx src/asmcomp/printmach.cmx src/asmcomp/liveness.cmx src/asmcomp/printlinear.cmx src/asmcomp/reloadgen.cmx src/asmcomp/reload.cmx src/asmcomp/schedgen.cmx src/asmcomp/scheduling.cmx src/typing/ctype.cmx src/typing/oprint.cmx src/typing/printtyp.cmx src/typing/typedtree.cmx src/typing/stypes.cmx src/bytecomp/simplif.cmx src/asmcomp/selectgen.cmx src/asmcomp/selection.cmx src/asmcomp/spill.cmx src/asmcomp/split.cmx src/bytecomp/printlambda.cmx src/bytecomp/typeopt.cmx src/typing/parmatch.cmx src/bytecomp/matching.cmx src/bytecomp/translobj.cmx src/bytecomp/translcore.cmx src/bytecomp/translclass.cmx src/typing/mtype.cmx src/bytecomp/translmod.cmx src/jitcomp/jitlink.cmx src/jitcomp/jitaux.cmx src/jitcomp/jit.cmx src/jitcomp/jitgen.cmx src/parsing/syntaxerr.cmx src/parsing/parser.cmx src/parsing/lexer.cmx src/parsing/parse.cmx src/parsing/printast.cmx src/toplevel/genprintval.cmx src/typing/includeclass.cmx src/typing/includecore.cmx src/typing/includemod.cmx src/typing/typetexp.cmx src/typing/typecore.cmx src/typing/typedecl.cmx src/typing/typeclass.cmx src/typing/typemod.cmx src/toplevel/toperrors.cmx src/typing/unused_var.cmx src/toplevel/toploop.cmx src/toplevel/topfind.cmx src/toplevel/topdirs.cmx src/toplevel/topmain.cmx src/ocamlnat.cmx src/libocamlnat.a -o src/ocamlnat.native
    File "none", line 1, characters 0-1:
    Error: No implementations provided for the following modules:
    Dynlink referenced from src/jitcomp/jitlink.cmx,
    src/toplevel/toploop.cmx
    Command exited with code 2.
    Compilation unsuccessful after building 383 targets (0 cached) in 00:00:14.
    E: Command '/opt/local/bin/ocamlbuild src/ocamlnat.native -tag debug' terminated with error code 10

Interestingly, when I type :
ocamlfind ocamlopt -verbose -g -linkpkg -package "findlib,dynlink"

Effective set of compiler predicates: pkg_findlib,pkg_dynlink,autolink,native

  • ocamlopt.opt -verbose -g -I /opt/local/lib/ocaml/site-lib/findlib /opt/local/lib/ocaml/site-lib/findlib/findlib.cmxa
  • as -arch x86_64 -o '/var/folders/nh/pbvym9z90wj_9kt95s16p_3h0000gn/T/camlstartupd19616.o' '/var/folders/nh/pbvym9z90wj_9kt95s16p_3h0000gn/T/camlstartupdfab25.s'
  • /usr/bin/llvm-gcc-4.2 -o 'a.out' '-L/opt/local/lib/ocaml/site-lib/findlib' '-L/opt/local/lib/ocaml' '/var/folders/nh/pbvym9z90wj_9kt95s16p_3h0000gn/T/camlstartupd19616.o' '/opt/local/lib/ocaml/std_exit.o' '/opt/local/lib/ocaml/site-lib/findlib/findlib.a' '/opt/local/lib/ocaml/stdlib.a' '/opt/local/lib/ocaml/libasmrun.a'
@bmeurer
Copy link
Owner

bmeurer commented May 16, 2012

Looks like findlib did not pick up the availability of the native dynlink packages.

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