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

ocamlmklib documentation is not accurate #5962

Closed
vicuna opened this issue Mar 26, 2013 · 1 comment
Closed

ocamlmklib documentation is not accurate #5962

vicuna opened this issue Mar 26, 2013 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Mar 26, 2013

Original bug ID: 5962
Reporter: vbmithr
Status: closed (set by @damiendoligez on 2014-07-30T18:47:35Z)
Resolution: fixed
Priority: normal
Severity: minor
OS: MacOSX
Version: 4.00.1
Target version: 4.02.0+dev
Category: documentation
Tags: junior_job

Bug description

The OCaml documentation (doc/ocaml/manual033.html#toc152) says that ocamlmklib performs

ocamlc -a -o zip.cma zip.cmo -dllib -lzip
-cclib -lzip -cclib -lz -ccopt -L/usr/local/zlib
ocamlopt -a -o zip.cmxa zip.cmx -cclib -lzip
-cclib -lzip -cclib -lz -ccopt -L/usr/local/zlib
gcc -shared -o dllzip.so zipstubs.o -lz -L/usr/local/zlib
ar rc libzip.a zipstubs.o

whereas on MacOSX, I have something like that:

MacBook-Pro-van-Harrie:_build vincent$ /usr/local/bin/ocamlmklib -o lib/tuntap_stubs lib/tuntap_stubs.o -v

  • cc -bundle -flat_namespace -undefined suppress -o lib/dlltuntap_stubs.so lib/tuntap_stubs.o
  • ar rc lib/libtuntap_stubs.a lib/tuntap_stubs.o; ranlib lib/libtuntap_stubs.a

The "gcc -shared ..." line is very different on the mac: -bundle is used instead of -shared, etc.

The doc should be clearer about that since some people might rely on it to write their own build systems. It should clearly specify that the commands that will be issued by ocamlmklib might differ according to the architecture/system used.

@vicuna
Copy link
Author

vicuna commented Jul 30, 2014

Comment author: @damiendoligez

Added a note in the docs (commit 15035).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant