build system should support setting a prefix

Bug #1085461 reported by Lucas Nussbaum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ocamlbricks
New
Undecided
Unassigned

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,

Related branches

Revision history for this message
Lucas Nussbaum (lucas) wrote :

From #debian-ocaml:
19:21 < lucas> I'm looking at ocamlbricks, which uses a custom build system that does not support setting
               DESTDIR or a prefix. if upstream agreed to change build system, what would you recommend?
19:33 < mehdi> something using oasis could do it
19:33 < olasd> oasis is well supported
19:34 < mehdi> the user writes up an _oasis file (something that looks like a debian/control file) and oasis
               generates build and install script out of it
20:02 < lucas> the user = the upstream dev, in that case?
20:05 < olasd> yes
20:06 < mehdi> you can also contribute an _oasis file for ocamlbricks :)

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

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. ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.