[Ipopt] conda-forge recipe

Ted Ralphs ted at lehigh.edu
Tue Sep 20 10:52:58 EDT 2016

I'm not actually sure of the best approach here, but the discussion will
likely mirror those that have already taken place vis a vis packing for
various Linux distros, Homebrew packages for OS X, etc. In most cases, it
seems that the best approach for packing the optimization suite overall has
been to package each project separately and put in dependencies using the
appropriate dependency mechanism. I'm just getting up to speed on conda,
but I would assume that there is a mechanism for specifying dependencies.

With respect to dependencies, Ipopt itself is an easy case, sine it has no
COIN dependencies. Nevertheless, it would be great if we could have conda
recipes for all COIN projects developed in a common way. They all use the
same build system so building up a set of recipes together would make more
sense than building individual recipes in a vacuum. I mentioned Homebrew
recipes and this is perhaps a good example to go on. There, we are
similarly building up a set of recipes for all COIN projects using a common
approach. I assume that we could leverage the Homebrew recipes to make
similar conda recipes. Note that there is already one COIN project with a
conda recipe (Cbc) here:


I have already been discussing with Bill Hart (cc'd) about adding others.
I'd be happy to include you as much or as little as you want in the larger
discussion. If you only care about Ipopt, then we can probably work on that
together as a first step for me to learn the ropes, sine Ipopt is a natural
starting point.

In any case, I do have experience building Ipopt on many platforms,
although I am mostly building redistributable binaries using only open
source components. Let's take this conda discussion off-line and see where
we go. I'll keep the thread moving with respect to your questions about the
OSX build, though. I can probably help there.



On Mon, Sep 19, 2016 at 4:06 PM, St. John, Peter <Peter.STJohn at nrel.gov>

> Hi Ted,
> I’m more than happy to collaborate! Thanks for the offer to help. Conda’s
> build system is a bit particular, but I’m sure between the two of us we
> could figure it out. I’ve got the linux build/test running, mac builds
> correctly but fails on the test script (error below). Haven’t started
> windows, since I’m not very familiar with writing the .bat files conda
> wants.
> What do you think the best way to join forces would be? It looks like
> you’re trying to get binaries built for the entire coin-or optimization
> suite; I’m happy to abandon this PR if you think it would be better if
> there was a single conda recipe for everything.
> Here’s the error I’m getting for mac. This is separate from ‘make test’,
> which tests if the build completed successfully. Here’re we’re testing if
> you can link against the installed conda package. The ipopt binary works,
> but compiling the simple Cpp example seems to fail on execution:
> g++ -I/Users/travis/miniconda/envs/_test/include/coin  -c -o
> cpp_example.o cpp_example.cpp
> g++ -I/Users/travis/miniconda/envs/_test/include/coin  -c -o MyNLP.o
> MyNLP.cpp
> g++ -L/Users/travis/miniconda/envs/_test/lib -lipopt
> -I/Users/travis/miniconda/envs/_test/include/coin -o cpp_example
> cpp_example.o MyNLP.o
> +./cpp_example
> +grep -q 'Optimal Solution'
> dyld: Library not loaded: @rpath/libipopt.1.dylib
>   Referenced from: /Users/travis/miniconda/conda-
> bld/test-tmp_dir/Cpp_example/./cpp_example
>   Reason: image not found
> TESTS FAILED: ipopt-3.12.5-0
> --
> Peter St. John
> Postdoctoral Researcher | Biosciences Center
> National Renewable Energy Laboratory (NREL)
> 15013 Denver West Parkway | Golden, CO 80401
> 303-384-7969
> peter.stjohn at nrel.gov | www.nrel.gov
> From: Ted Ralphs <ted at lehigh.edu<mailto:ted at lehigh.edu>>
> Date: Monday, September 19, 2016 at 6:57 AM
> To: "Peter St. John" <peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov>>
> Cc: "Anthony D. Kelman" <kelman at berkeley.edu<mailto:kelman at berkeley.edu>>,
> ipopt <ipopt at list.coin-or.org<mailto:ipopt at list.coin-or.org>>
> Subject: Re: [Ipopt] conda-forge recipe
> Hi Peter,
> I build Ipopt on all three OS's regularly and maintain the .travis.yml and
> appveyor.yml files that you'll see in the repo. These power the automated
> build and test that I'm doing. I have automated deployment of binaries
> working for some other projects and have been thinking about deploying this
> for Ipopt. Seems we have similar goals so it might make sense to
> collaborate. If nothing else, I'm happy to share lessons learned in getting
> this set up.
> Cheers,
> Ted
> On Sun, Sep 18, 2016 at 3:42 PM, St. John, Peter <Peter.STJohn at nrel.gov
> <mailto:Peter.STJohn at nrel.gov>> wrote:
> Awesome thanks for the help!, it looked like the problem was in passing
> the environment variables, and ld complained about `-no-as-needed`. I
> pushed some changes that seem to work when I build it locally, we'll see
> how we do on the CI.
> --
> Peter St. John
> Postdoctoral Researcher | Biosciences Center
> National Renewable Energy Laboratory (NREL)
> 15013 Denver West Parkway | Golden, CO 80401
> 303-384-7969<tel:303-384-7969>
> peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov> | www.nrel.gov<
> http://www.nrel.gov>
> From: "Anthony D. Kelman" <kelman at berkeley.edu<mailto:kelman at berkeley.edu
> ><mailto:kelman at berkeley.edu<mailto:kelman at berkeley.edu>>>
> Date: Sunday, September 18, 2016 at 7:18 AM
> To: "Peter St. John" <peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov
> ><mailto:peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov>>>
> Cc: ipopt <ipopt at list.coin-or.org<mailto:ipopt at list.coin-or.org><mailto:
> ipopt at list.coin-or.org<mailto:ipopt at list.coin-or.org>>>
> Subject: Re: [Ipopt] conda-forge recipe
> You're going to need to look at the config.log to find the full error.
> On Sep 18, 2016 6:11 AM, "St. John, Peter" <Peter.STJohn at nrel.gov<mailto:
> Peter.STJohn at nrel.gov><mailto:Peter.STJohn at nrel.gov<mailto:P
> eter.STJohn at nrel.gov>>> wrote:
> I'm trying to get a conda recipe working for IPOPT; for those who aren't
> familiar, conda is a fairly generic package management system that compiles
> from source using continuous integration services, and then ships binaries
> when a user `conda install`'s something. In particular, its really nice for
> creating isolated environments (similar to python's virtual environments)
> using an environment.yml file, where you're able to simply list the
> libraries (and versions) of your dependencies. That way when sharing code
> with others or setting up on a new computer, you don't have to manually
> track down binary files or rebuild from source for each library your using.
> I've currently got it compiling against intel's MKL libraries on linux,
> but its not working on mac or windows. For Mac, I'm seemingly unable to get
> past the
> checking whether user supplied BLASLIB="-Wl,--no-as-needed -L$PREFIX/lib
> -Wl,-rpath,$PREFIX/lib -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread
> -liomp5 -lpthread -lm -ldl" works... no
> error during ./configure. (I was able to get it to take an openblas
> library, but it failed later during the build stage). I've got very little
> knowledge on building IPOPT on windows, so I'm currently just skipping that.
> I figured I'd reach out in case anyone might have more experience building
> IPOPT on various architectures and might be willing to lend advice as to
> why the builds might be failing. You can see the current recipe here:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.
> com_conda-2Dforge_staged-2Drecipes_pull_1607&d=CwICAg&c=Ngd-
> ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=en0_ydai4UPM8nLin0
> WTg5UWlOXuXT_rDA2W227v-no&m=af5bLJkK8YiI_83AdQeZRFDeRN3NWA
> ruVbJCjwRQ5S0&s=GmCTSHKGoAtptWbVsQo5TtWauFhAD-kWTI4B2Y2SmGU&e=
> Thanks!
> -Peter
> --
> Peter St. John
> Postdoctoral Researcher | Biosciences Center
> National Renewable Energy Laboratory (NREL)
> 15013 Denver West Parkway | Golden, CO 80401
> 303-384-7969<tel:303-384-7969><tel:303-384-7969<tel:303-384-7969>>
> peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov><mailto:p
> eter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov>> | www.nrel.gov<
> http://www.nrel.gov><https://urldefense.proofpo
> int.com/v2/url?u=http-3A__www.nrel.gov&d=CwICAg&c=Ngd-ta5yRY
> sqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g
> &m=F-mPbo_HW3CCtNq0GCZFXs1IV-tSfMtzzsmDNYBfhoI&s=bzaBz3XxnUf
> 4nv_Y2hfLlD04X-MwjLrvP5ffQw2XMUw&e= >
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org<mailto:Ipopt at list.coin-or.org><mailto:
> Ipopt at list.coin-or.org<mailto:Ipopt at list.coin-or.org>>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coi
> n-2Dor.org_mailman_listinfo_ipopt&d=CwICAg&c=Ngd-ta5yRYsqe
> UsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=en0_ydai4UPM8nLin0WTg5
> UWlOXuXT_rDA2W227v-no&m=af5bLJkK8YiI_83AdQeZRFDeRN3NWAruVbJCjwRQ5S0&s=
> o4AdF032QO5UCLYUWhL-3hPwqX70eJQpf7G23r-YexA&e=
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org<mailto:Ipopt at list.coin-or.org>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coi
> n-2Dor.org_mailman_listinfo_ipopt&d=CwICAg&c=Ngd-ta5yRYsqe
> UsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g
> &m=F-mPbo_HW3CCtNq0GCZFXs1IV-tSfMtzzsmDNYBfhoI&s=DcgN0FzLA73
> z9qxD2pxp-bxj2abjDrKxqewcAo4fU_E&e=
> --
> Dr. Ted Ralphs
> Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted<http://coral.ie.lehigh.edu/~ted>

Dr. Ted Ralphs
Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20160920/443e67d2/attachment.html>

More information about the Ipopt mailing list