Bug 168290 - New port: math/ipopt
Summary: New port: math/ipopt
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-24 06:20 UTC by Pedro F. Giffuni
Modified: 2014-09-01 18:10 UTC (History)
3 users (show)

See Also:


Attachments
file.shar (6.95 KB, text/plain)
2012-05-24 06:20 UTC, Pedro F. Giffuni
no flags Details
ipopt-shar.txt (6.40 KB, text/plain)
2012-06-05 17:41 UTC, Pedro F. Giffuni
no flags Details
Update to version 3.11.8 (6.43 KB, application/x-shellscript)
2014-08-07 19:42 UTC, Pedro F. Giffuni
no flags Details
port tarball for math/ipopt (2.44 KB, application/octet-stream)
2014-08-25 21:03 UTC, Pedro F. Giffuni
no flags Details
port as a shar file (6.38 KB, text/plain)
2014-08-25 21:21 UTC, Pedro F. Giffuni
no flags Details
Fixed ipopt shar file (6.35 KB, text/plain)
2014-09-01 02:55 UTC, Pedro F. Giffuni
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro F. Giffuni 2012-05-24 06:20:01 UTC
Ipopt (Interior Point OPTimizer) is a software package library for large-scale ​nonlinear optimization. It is part of the COIN-OR initiative.

This port requires a linear solver and I chose to use mumps as it is the only one that is available without restrictions. Unfortunately it was not possible to make configure accept the prepackaged versions so we are using the distribution provided script to download the source tarballs. Both libraries are statically linked so there is no major consequence.

The patches were submitted upstream: they teach the scripts to use fetch(1) when wget is not available.

Fix: Patch attached with submission follows:
Comment 1 Pedro F. Giffuni 2012-05-24 06:32:53 UTC
A minor issue:=0A- The pkg-plist starts with a newline (should be easy to f=
ix).=0A=0AI was getting rusty about creating new ports ;).=0A
Comment 2 Wen Heping freebsd_committer freebsd_triage 2012-05-24 08:56:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wen
Comment 3 b. f. 2012-05-28 01:40:26 UTC
>Unfortunately it was not possible to make configure accept the prepackaged versions so >we are using the distribution provided script to download the source tarballs. Both >libraries are statically linked so there is no major consequence.

... other than a swollen library that uses more memory and disk space
than it ought to, and a longer build.  I plan on updating mumps and
metis in the next few weeks, is the incompatibility solely due to
version mismatches with the current ports?  I'd prefer to use the
in-tree dependencies if possible.


>The patches were submitted upstream: they teach the scripts to use fetch(1) when wget >is not available.

We cannot be adding more defective ports that require network access
in build stages other than "fetch", especially since there is an
effort underway to remove them, to complement hardening work on the
build cluster and pkgng.  The needed files (if they are really needed)
and their checksums should be checked and added to DISTFILES, so that
they may be downloaded normally with the usual safeguards.  A
post-extract target can then be used to position them for the build.
If necessary, we can place some of them on FreeBSD mirrrors.

b.

b.
Comment 4 Pedro F. Giffuni 2012-05-28 01:57:30 UTC
=0A=0A--- Dom 27/5/12, b. f. <bf1783@googlemail.com> ha scritto:=0A=0A> >Un=
fortunately it was not possible to make configure=0A> > accept the prepacka=
ged versions so we are using the=0A> > distribution provided script to down=
load the source=0A> > tarballs. Both >libraries are statically linked so=0A=
> > there is no major consequence.=0A> =0A> ... other than a swollen librar=
y that uses more memory and=0A> disk space than it ought to, and a longer b=
uild.=0A=0AThat's unavoidable anyways :(=0A=0A> I plan on updating mumps an=
d metis in the next few weeks,=0A> is the incompatibility solely due to ver=
sion mismatches=0A> with the current ports?=0A=0AThere is no incompatibilit=
y: the configure script is broken=0Aso we just have to unpack the distfiles=
 the build system=0Awants. Configure does a fine job for blas and lapack th=
ough.=0A=0A=0A> The needed files (if they are really needed)=0A> and their =
checksums should be checked and added to=0A> DISTFILES, so that they may be=
 downloaded normally=0A> with the usual safeguards.=0A=0AI can do that, yes=
: the files are absolutely necessary.=0A=0Acheers,=0A=0APedro.
Comment 5 Brendan Fabeny freebsd_committer freebsd_triage 2012-05-30 20:23:06 UTC
Responsible Changed
From-To: wen->bf

I'll take it.
Comment 6 Pedro F. Giffuni 2012-06-05 17:41:29 UTC
I am attaching a new version of the port that includes the
required versions of mumps and metis in the distfiles and
then arranges to post-extract them.

best regards,

Pedro.
Comment 7 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-05-30 04:16:00 UTC
Responsible Changed
From-To: bf->freebsd-ports-bugs

Re-assign to pool. 
This now needs staging support BTW.
Comment 8 John Marino freebsd_committer freebsd_triage 2014-06-19 06:58:58 UTC
Pedro, 
Why not just take this PR yourself?  It's your submission.

One request, however:
Please use ${TAR} instead of ${EXTRACT_CMD} (and ideally hardcode the values of EXTRACT_BEFORE_ARGS and EXTRACT_AFTER_ARGS instead of using the variables)
Comment 9 John Marino freebsd_committer freebsd_triage 2014-08-07 15:21:50 UTC
Assigning it to Pedro (who submitted it and can commit it).  He should fix it or close the PR.
Comment 10 John Marino freebsd_committer freebsd_triage 2014-08-07 16:41:42 UTC
So Pedro is not a ports committer, so resetting the PR.
However, either he needs to provide an updated (and tested) port, somebody else does (which hasn't happened in in many months but to be fair bf@ was hoarding it), or we just close the PR.  2+ years is a long time to carry this.
Comment 11 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-08-07 19:42:40 UTC
Created attachment 145478 [details]
Update to version 3.11.8

Hmm...
The ports tree has change somewhat so it required some effort to update the patch.
Unfortunately configure is not able to figure out how to link a fortran program on FreeBSD 10!
Comment 12 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-08-25 21:03:12 UTC
Created attachment 146272 [details]
port tarball for math/ipopt

OK, I updated the port to support staging.
Comment 13 John Marino freebsd_committer freebsd_triage 2014-08-25 21:07:13 UTC
hi Pedro, any chance to get a shar per https://www.freebsd.org/doc/en/books/porters-handbook/porting-submitting.html ?

gzipped ports aren't expected and we can't review on the web either.
Comment 14 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-08-25 21:21:19 UTC
Created attachment 146274 [details]
port as a shar file

The ports handbook needs to an update: In the send-pr days it made sense to submit everything as text files but Bugzilla knows better.
Comment 15 John Marino freebsd_committer freebsd_triage 2014-08-25 21:26:04 UTC
shars are still preferred.

BZ has a 1Mb limit per attachment.  There's no reason to gzip anything smaller and people browsing PRs don't want to fix to a unix system just to see the contents.
Comment 16 John Marino freebsd_committer freebsd_triage 2014-08-25 21:28:13 UTC
Normally, this is where I request poudriere or redports test logs, but I will cut you a break. :)  

It visually looks fine, moving to patch-ready.
Comment 17 Kurt Jaeger freebsd_committer freebsd_triage 2014-08-28 20:05:59 UTC
(In reply to John Marino from comment #16)
> Normally, this is where I request poudriere or redports test logs, but I
> will cut you a break. :)  

I tested it on my reference host (where it worked fine) and
using poudriere, there is an issue with pkg-config, see

http://people.freebsd.org/~pi/misc/math__ipopt-10a.txt

http://people.freebsd.org/~pi/misc/math__ipopt-91a.txt

If someone has a fix for this, that would help.
Comment 18 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-08-28 20:55:27 UTC
(In reply to Kurt Jaeger from comment #17)
... 
> I tested it on my reference host (where it worked fine) and
> using poudriere, there is an issue with pkg-config, see
> 
> http://people.freebsd.org/~pi/misc/math__ipopt-10a.txt
> 
...
> 
> If someone has a fix for this, that would help.

I don't know much about pkg-config, but I think I have a hint:

The port's post-patch target (actually taken from the coinmp port) sets 
${PREFIX}/libdata/pkgconfig in Ipopt/Makefile.in

It looks like that has to be changed also in ipopt-uninstalled.pc.in

Changing the post-patch target to change every *.in file may work.
I can't run poudriere to test though :(
Comment 19 Kurt Jaeger freebsd_committer freebsd_triage 2014-08-29 07:44:18 UTC
(In reply to Pedro F. Giffuni from comment #18)
> The port's post-patch target (actually taken from the coinmp port) sets 
> ${PREFIX}/libdata/pkgconfig in Ipopt/Makefile.in
> 
> It looks like that has to be changed also in ipopt-uninstalled.pc.in

I tried it by changing popt-uninstalled.pc.in only, same problem.
Comment 20 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-08-29 15:28:10 UTC
(In reply to Kurt Jaeger from comment #19)
> (In reply to Pedro F. Giffuni from comment #18)
> > The port's post-patch target (actually taken from the coinmp port) sets 
> > ${PREFIX}/libdata/pkgconfig in Ipopt/Makefile.in
> > 
> > It looks like that has to be changed also in ipopt-uninstalled.pc.in
> 
> I tried it by changing popt-uninstalled.pc.in only, same problem.

Ugh.. looking deeper into this ...

This file:
${WRKSRC}/Ipopt/ipopt-uninstalled.pc

Includes the paths where the library was build.
In particular it sets this:
...
libdir=/usr/ports/math/ipopt/work/Ipopt-3.11.9/Ipopt/src/Interfaces
...

Looking at other (installed) *.pc files, this should be ${prefix}/lib

The Cflags also don't look right.

There is something wrong in the way this port uses pkgconfig.
Comment 21 Pedro F. Giffuni freebsd_committer freebsd_triage 2014-09-01 02:55:10 UTC
Created attachment 146624 [details]
Fixed ipopt shar file

Sorry for the delay ...

I noticed a silly bug: I had inverted the configure env with args. After fixing this the resulting *.pc files look much better.

If there are still problems there is a plan (b):
I found that there is a --without-pkg-config argument for configure.
We can just uncomment the extra configure arg and drop pkgconfig from the USES line.
Comment 22 commit-hook freebsd_committer freebsd_triage 2014-09-01 18:10:14 UTC
A commit references this bug:

Author: pi
Date: Mon Sep  1 18:09:43 UTC 2014
New revision: 366918
URL: http://svnweb.freebsd.org/changeset/ports/366918

Log:
  New port: math/ipopt

  Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a software
  package for large-scale nonlinear optimization.

  Ipopt is written in C++ and is released as open source code under the
  Eclipse Public License (EPL). It is available from the COIN-OR
  initiative. The code has been written by Carl Laird and Andreas W?chter,
  who is the COIN project leader for Ipopt.

  The Ipopt distribution can be used to generate a library that can be
  linked to one's own C++, C, or Fortran code, as well as a solver
  executable for the AMPL modeling environment. The package includes
  interfaces to CUTEr optimization testing environment, as well as the
  MATLAB and R programming environments. IPOPT can be used on Linux/UNIX,
  Mac OS X and Windows platforms.

  An excellent reference for this library can be found in:

  W?chter and L. T. Biegler, On the Implementation of a Primal-Dual Interior
  Point Filter Line Search Algorithm for Large-Scale Nonlinear Programming,
  Mathematical Programming 106(1), pp. 25-57, 2006

  WWW: https://projects.coin-or.org/Ipopt

  PR:		168290
  Submitted by:	Pedro F. Giffuni <pfg@FreeBSD.org>

Changes:
  head/math/Makefile
  head/math/ipopt/
  head/math/ipopt/Makefile
  head/math/ipopt/distinfo
  head/math/ipopt/pkg-descr
  head/math/ipopt/pkg-plist
Comment 23 Kurt Jaeger freebsd_committer freebsd_triage 2014-09-01 18:10:57 UTC
Committed, thanks for your intensive work on this port.