Comment 2 for bug 1085461

Revision history for this message
Jean-Vincent Loddo (loddo) wrote : Re: [Bug 1085461] [NEW] build system should support setting a prefix

Hi Lucas,

Yes, this was actually a bug of our build system. Thanks for reporting.
I have fixed it in the trunk revno 339 introducing the variable
`ocaml_libraryprefix' (the location of libraries *used* by the project).
The value of this variable may be different from `libraryprefix', that
represents the location where we want to install the libraries *built*
by the project.

Sorry for the delay of our reaction: we were very busy these two last
week by the evaluation of our laboratory (by the AERES, you are a MCF
and you can easily imagine the stress ;-)).

Here an example of a CONFIGME suitable, I think, for debian packaging :

% cat CONFIGME
ocaml_libraryprefix=$(ocamlc -where || exit -1)
ocaml_sources=${ocaml_libraryprefix}/caml
prefix=${DESTDIR:-debian/tmp}
libraryprefix=${prefix}/${ocaml_libraryprefix}
configurationprefix=$prefix/etc
documentationprefix=$prefix/share/doc
localeprefix=$prefix/share/locale

Thanks,
Jean-Vincent

On Sat, 01 Dec 2012 18:19:56 -0000, Lucas Nussbaum wrote:
> Public bug reported:
>
> Hi,
>
> The way Debian packages builds work is that "make install" is run
> with a
> custom prefix or DESTDIR variable, so that files are installed in the
> debian/tmp subdirectory. That is usually implemented by specifying a
> prefix during the configure phase, or by setting a variable.
>
> The custom build system in ocamlbricks does not allow to do that. If
> you
> override libraryprefix in CONFIGME and set it to
> debian/tmp/usr/lib/ocaml, 'make' then fails to find lablgtk2, because
> it
> looks for it in debian/tmp/usr/lib/ocaml/lablgtk2/
>
> It would be better to move away from the custom build system, and use
> something more standard. Since I'm not usually involved in ocaml
> packaging, I cannot make a recommandation, but if needed, I could ask
> the right people.
>
> Alternatively, this could be worked-around using dirty hacks in the
> package building process, but:
> (1) these will be very dirty hacks
> (2) it would only fix the problem for Debian
> Generally, it is much easier to improve the build system, since it
> benefits everybody.
>
> Thanks,
>
> ** Affects: ocamlbricks
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of
> Marionnet
> drivers, which is subscribed to ocamlbricks.
> https://bugs.launchpad.net/bugs/1085461
>
> Title:
> build system should support setting a prefix
>
> Status in ocamlbricks - a library of ocaml components:
> New
>
> Bug description:
> Hi,
>
> The way Debian packages builds work is that "make install" is run
> with
> a custom prefix or DESTDIR variable, so that files are installed in
> the debian/tmp subdirectory. That is usually implemented by
> specifying
> a prefix during the configure phase, or by setting a variable.
>
> The custom build system in ocamlbricks does not allow to do that.
> If
> you override libraryprefix in CONFIGME and set it to
> debian/tmp/usr/lib/ocaml, 'make' then fails to find lablgtk2,
> because
> it looks for it in debian/tmp/usr/lib/ocaml/lablgtk2/
>
> It would be better to move away from the custom build system, and
> use
> something more standard. Since I'm not usually involved in ocaml
> packaging, I cannot make a recommandation, but if needed, I could
> ask
> the right people.
>
> Alternatively, this could be worked-around using dirty hacks in the
> package building process, but:
> (1) these will be very dirty hacks
> (2) it would only fix the problem for Debian
> Generally, it is much easier to improve the build system, since it
> benefits everybody.
>
> Thanks,
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ocamlbricks/+bug/1085461/+subscriptions
>
> !DSPAM:97,50ba4bb2301711564113414!