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:
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
Responsible Changed From-To: freebsd-ports-bugs->wen
>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.
=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.
Responsible Changed From-To: wen->bf I'll take it.
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.
Responsible Changed From-To: bf->freebsd-ports-bugs Re-assign to pool. This now needs staging support BTW.
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)
Assigning it to Pedro (who submitted it and can commit it). He should fix it or close the PR.
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.
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!
Created attachment 146272 [details] port tarball for math/ipopt OK, I updated the port to support staging.
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.
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.
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.
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.
(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.
(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 :(
(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.
(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.
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.
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
Committed, thanks for your intensive work on this port.