[111271] trunk/dports/science/ocaml-mpi/Portfile
Eric A. Borisch
eborisch at macports.org
Wed Sep 18 20:34:37 PDT 2013
On Wed, Sep 18, 2013 at 10:14 PM, Ryan Schmidt <ryandesign at macports.org>wrote:
>
> On Sep 18, 2013, at 21:45, Eric A. Borisch wrote:
>
> >> > -depends_lib port:ocaml port:ocaml-findlib
> path:bin/mpicc:mpich
> >> > +depends_lib port:ocaml port:ocaml-findlib
> path:bin/mpicc-mp:mpich-default
> >
> >> > +if {[file exists ${prefix}/lib/mpich-mp]} then {
> >> > + build.env MPIINCDIR=${prefix}/include
> MPILIBDIR=${prefix}/lib/mpich-mp
> >> > +} else {
> >> > + build.env MPIINCDIR=${prefix}/include
> MPILIBDIR=${prefix}/lib/mpich-devel-mp
> >> > +}
> >>
> >> This is concerning, because it means the port builds differently
> depending on what ports the user already has installed. This won't work
> right if the user gets a pre-compiled package from the buildbot and is
> generally a bad idea.
> >
> > True, but the only people it will be any issue for are those that have
> intentionally installed mpich-devel-default, and for those, rev-upgrade
> will rebuild it locally (the libs are in different locations; no chance of
> something subtle slipping by.) The two potential satisfying ports conflict
> with each other, so only one can possibly be installed.
> >
> > These are people who have chosen to go off the beaten path intentionally.
> >
> > Your thoughts?
> > - Eric
>
> At the time that this code is evaluated:
>
> if {[file exists ${prefix}/lib/mpich-mp]} then {
> build.env MPIINCDIR=${prefix}/include
> MPILIBDIR=${prefix}/lib/mpich-mp
> } else {
> build.env MPIINCDIR=${prefix}/include
> MPILIBDIR=${prefix}/lib/mpich-devel-mp
> }
>
> the dependencies haven't necessarily been installed yet. If they haven't,
> then the code will set MPILIBDIR=${prefix}/lib/mpich-devel-mp, but the
> dependency path:bin/mpicc-mp:mpich-default will install mpich-default not
> mpich-devel-default.
>
> This will affect any users who haven't already installed mpich-default by
> the time they ask to install ocaml-mpi. That includes new users and the
> buildbots, and therefore also any users who get the precompiled binaries.
>
> I tried it just now and the build succeeded, but I don't know what effect
> the incorrect MPILIBDIR had.
>
> You could fix this by changing the if statement. Check for a file from
> mpich-devel-default (not mpich-default). If it's not there, assume either
> mpich-default is installed, or will automatically be.
>
>
Got it -- tripped up by when things are evaluated. Thanks for the subtle
catch!
Fixed in r111343.
- Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130918/e7f50647/attachment.html>
More information about the macports-dev
mailing list