[ocaml-platform] Getting a macports gmp to interact with opam

Louis Gesbert louis.gesbert at ocamlpro.com
Mon Apr 14 08:30:36 BST 2014


There is no proper way of handling external installations -- except for the system compiler itself -- at the moment. However, packages installation scripts don't usually rely on OPAM to find their dependencies, so it would probably work if you could set the proper path / library path variables.

Remains the issue that OPAM won't let you install because of a missing dependency. You can use the following workaround to make OPAM believe a package is installed:
```
opam pin gmp 4.4.3      # make sure OPAM won't try to upgrade the package on later upgrades
opam install gmp --fake # pretend to install it, but don't actually run the build instructions
```

Note that `--fake` is not a recommended feature, it was mainly designed for quicker testing. Yet, this is sometimes a useful hack. Should it make its way into the FAQ ?

Cheers,
Louis Gesbert


Le dimanche 13 avril 2014, 21:58:23 Watson Ladd a écrit :
> Dear all,
> 
> I have gmp living in /opt/local/include and /opt/local/lib, and it
> works. However, opam doesn't recognize it, and so I cannot install
> why3, without which frama-c is quite impoverished. How do I pass the
> location of other directories to search for prerequisites?
> 
> Thank you for your assistance.
> 
> Sincerely,
> Watson Ladd
> _______________________________________________
> Platform mailing list
> Platform at lists.ocaml.org
> http://lists.ocaml.org/listinfo/platform



More information about the Platform mailing list