Am 02.07.2012 09:36:41 schrieb(en) Alan Schmitt:
Hello,

I'm need to build some caml programs that will be used in a lab for a class that I'll teach, and to simplify their installation I'm wondering if I can use godi in a relocatable way. What I want to do is:
- get everything compiled and installed in my ~/godi
- do a tar of this directory so that each user can fetch it and put it in their home dir - tell the users to add the ~/godi/bin and ~/godi/sbin directories in their path

Would this work, or are there places in godi where absolute paths are used? If so, is it possible to patch them after copying the directory?

So, here is the official answer: GODI is non-relocatable, but you may have luck.

The core problem here is not GODI itself (which could be made relocatable with little effort), but paths cooked into executables and libraries. Examples:

 - Bytecode executables compiled without -custom include the path
   to ocamlrun
 - The ocaml standard library is also a hardcoded path, but AFAIK you
   can override it even on Unix
 - Search paths for C libraries may be included in native executables
   and libraries (especially on non-Linux systems where libs are often
   not in /usr/lib). There is at least an environment variable to
   override this, LD_LIBRARY_PATH.
 - Some OCaml programs and libraries cook paths in. E.g. omake needs
   to know where the default scripts are. Sometimes there are env vars
   to override this.
 - In godi_console, the only cooked-in path is the directory where
   sys.mk can be found. All other paths only occur in config files
   and can be easily rewritten to a new location.

So, if you can exclude that you run into such a case, there are chances to make it work.

A probably safer way is to install GODI under a fixed path (/opt, or even /tmp or /var/tmp) and everybody makes a symlink to the real storage place.

Gerd

Thanks,

Alan
_______________________________________________
Godi-list mailing list
Godi-list@ocaml-programming.de
https://godirepo.camlcity.org/mailman/listinfo/godi-list





--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    g...@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------
_______________________________________________
Godi-list mailing list
Godi-list@ocaml-programming.de
https://godirepo.camlcity.org/mailman/listinfo/godi-list

Reply via email to