You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To allow bootstrapping opam the dependency chain should be ocaml -> jbuilder -> "opam dependencies" -> opam. With current f267e3f the dependency chain (at least for make install) is ocaml -> "opam dependencies" -> opam -> jbuilder.
Maybe just another make(1) target should be added to copy the generated files to $RPM_BUILD_ROOT
That would be nice. I had hoped for some sort of "next generation oasis". Some packages switched to jbuilder (like the ones from "mjambon"), which means the default "make;make install" in rpm spec files can not be easily used anymore. No idea if there is a way to trick opam into installing into $RPM_BUILD_ROOT
For me it is not an issue at this point because the needed _oasis files are generated on the fly, I will continue with oasis as buildtool in rpm specfiles.
opam-installer has various options to select where to install things, e.g.
$ opam-installer --help
[...]
--docdir=PATH
Documentation dir. Relative to prefix or absolute. By default
$prefix/doc.
--help[=FMT] (default=pager)
Show this help in format FMT (pager, plain or groff).
-i, --install
Install the package (the default)
--libdir=PATH
OCaml lib dir. Relative to prefix or absolute. By default
$prefix/lib ; sometimes setting this to $(ocamlc -where) is
preferable.
--mandir=PATH
Manpages dir. Relative to prefix or absolute. By default
$prefix/man.
--name=NAME
Specify the package name. Used to set install directory under
`share/', etc. By default, basename of the .install file
--prefix=PREFIX (absent=/usr/local)
The prefix to install to. You can use eg '$PREFIX' to output a
relocatable script
--script
Don't execute the commands, but output a shell-script
(experimental)
--stubsdir=PATH
Stubs installation dir. Relative to prefix or absolute. By default
$libdir/stublibs.
--topdir=PATH
Toplevel install dir. Relative to prefix or absolute. By default
$libdir/toplevel.
-u, --uninstall, --remove
Remove the package
--version
Show version information.
@diml, I'm not sure --prefix is enough; rpm also put librairies in ocaml subdirectory (in fact only opam put them directly in lib directory it seems). More importantly it has not the same goal RPM_BUILD_ROOT is like DESTDIR a temporary directory where package creation should copy the files with the same hierarchy than when they will be installed. The --prefix should be /usr in this case. But perhaps @glondu could tell us how jbuilder could make code easy to package in debian (specially regarding where to install ocaml libraries, is OCAMLFIND_DESTDIR specified?).
With current f267e3f the dependency chain (at least for make install) is ocaml -> "opam dependencies" -> opam -> jbuilder.
@olafhering A working make; make install stanza is unfortunately not a priority for some designers. lpw25/namespaces#5. But I though that with #179 from which f267e3f is extracted, we were one step nearer a working make install with good default. You are right another step is to take into account debian DESTDIR and RPM_BUILD_ROOT.
@samoht#179 tried to fill automatically the multiple options of opam-installer. In my point of view, good default would have been simpler.
oasis has a --destdir option, which defines just an offset directory during make install. Similar to many Makefiles, which have "install myexe $(DESTDIR)$(BINDIR)".
Depending on which direction jbuilder wants to go one day, this should be considered. AFAIK opam has no concept of packaging something (like rpm), so DESTDIR support is not strictly required. findlib lacks that too, but thats another story.
Not sure what to do with this issue. If it should be a placeholder to add a standalone 'install' support one day, leave it open. Otherwise close it.
--prefix refers to the path at runtime, in case these are used by the binaries in some way to access files. --destdir/DESTDIR is just an offset at install time for packagers to avoid installing into /.
ghost added a commit that references this issue on Jul 27, 2017
--destdir can't be the same than --prefix regarding --libdir since it should just be contatenated before --libdir.
In fact usually prefix and libdir are usually given/computed during ./configure time, because tools sometimes need to know from where they would be finally used. And destdir is used only at the end. What is your idea on the usual configure time?
Activity
olafhering commentedon Jul 25, 2017
Looks like the entire concept depends on opam? I had hoped for another oasis like tool (setup/build/install).
olafhering commentedon Jul 26, 2017
That would be nice. I had hoped for some sort of "next generation oasis". Some packages switched to jbuilder (like the ones from "mjambon"), which means the default "make;make install" in rpm spec files can not be easily used anymore. No idea if there is a way to trick opam into installing into
$RPM_BUILD_ROOTFor me it is not an issue at this point because the needed _oasis files are generated on the fly, I will continue with oasis as buildtool in rpm specfiles.
samoht commentedon Jul 26, 2017
opam-installerhas various options to select where to install things, e.g.bobot commentedon Jul 27, 2017
@diml, I'm not sure
--prefixis enough; rpm also put librairies inocamlsubdirectory (in fact only opam put them directly in lib directory it seems). More importantly it has not the same goalRPM_BUILD_ROOTis likeDESTDIRa temporary directory where package creation should copy the files with the same hierarchy than when they will be installed. The--prefixshould be/usrin this case. But perhaps @glondu could tell us how jbuilder could make code easy to package in debian (specially regarding where to install ocaml libraries, isOCAMLFIND_DESTDIRspecified?).@olafhering A working
make; make installstanza is unfortunately not a priority for some designers. lpw25/namespaces#5. But I though that with #179 from which f267e3f is extracted, we were one step nearer a workingmake installwith good default. You are right another step is to take into account debianDESTDIRandRPM_BUILD_ROOT.@samoht #179 tried to fill automatically the multiple options of
opam-installer. In my point of view, good default would have been simpler.olafhering commentedon Jul 27, 2017
oasis has a --destdir option, which defines just an offset directory during make install. Similar to many Makefiles, which have "install myexe$(DESTDIR)$ (BINDIR)".
Depending on which direction jbuilder wants to go one day, this should be considered. AFAIK opam has no concept of packaging something (like rpm), so DESTDIR support is not strictly required. findlib lacks that too, but thats another story.
Not sure what to do with this issue. If it should be a placeholder to add a standalone 'install' support one day, leave it open. Otherwise close it.
olafhering commentedon Jul 27, 2017
--prefix refers to the path at runtime, in case these are used by the binaries in some way to access files. --destdir/DESTDIR is just an offset at install time for packagers to avoid installing into /.
Add --destdir + document --destdir, --prefix and --libdir
bobot commentedon Jul 27, 2017
--destdircan't be the same than--prefixregarding--libdirsince it should just be contatenated before--libdir.In fact usually
prefixandlibdirare usually given/computed during./configuretime, because tools sometimes need to know from where they would be finally used. Anddestdiris used only at the end. What is your idea on the usualconfiguretime?rgrinberg commentedon Jul 7, 2018
dune no longer uses opam-installer so this issue can be considered as resolved.