Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundling sources #34

Closed
topepo opened this issue Jul 15, 2017 · 11 comments
Closed

bundling sources #34

topepo opened this issue Jul 15, 2017 · 11 comments

Comments

@topepo
Copy link

topepo commented Jul 15, 2017

I've repeatedly had issues with the sources at http://ab-initio.mit.edu/nlopt being unavailable. It seems to consistently break travis builds.

Is it possible to bundle the sources in the R package to avoid this? I'm sure that this has been thought of or previously discussed but lme4 and a few other widely downloaded packages depend on nloptr.

As an alternative, I might be able to get RStudio to host the sources so that we would have a more reliable link. Perhaps that could be a fallback download source in your build system.

@jspiewak
Copy link

I am actually looking into this right now.

The download URL should be updated to fetch from GitHub. I'll open a pull request here.

@topepo
Copy link
Author

topepo commented Jul 17, 2017

Thanks. Let me know if you need a hand with anything.

@jyypma
Copy link
Collaborator

jyypma commented Jul 18, 2017 via email

@topepo
Copy link
Author

topepo commented Jul 19, 2017

I have been hesitant to add the source code because (1) I
don't know how this would work with licensing, and (2) I don't want to
take credit for the NLopt code, since I did not write it.

I think that @jspiewak 's PR will solve the issue that I'm having. It's more about the lack of reliability of the current url.

@eddelbuettel
Copy link
Contributor

I've repeatedly had issues with the sources at http://ab-initio.mit.edu/nlopt being unavailable. It seems to consistently break travis builds.

There is a very easy fix: install libnlopt-dev under Travis, and nloptr will use it. Also speeds up the compilation tremendously as you no longer need to builds libnlopt's code.

@topepo
Copy link
Author

topepo commented Oct 9, 2017

There is a very easy fix: install libnlopt-dev under Travis, and nloptr will use it. Also speeds up the compilation tremendously as you no longer need to builds libnlopt's code.

I'll do that. However, I've had a lot of issues when I'm teaching a class to brand new R users. Either from binaries for nloptr not being available on the CRAN repos or the users not being able to build on OS X.

@eddelbuettel
Copy link
Contributor

eddelbuettel commented Oct 9, 2017

That's a slightly shifted goal post, but could you not pre-preare binaries and host a local repo if you desire binaries?

[ I don't disagree that macOS has issues with compiling package but that is a different can of worms. I just wanted to point out that for Travis the issue is indeed very easily fixable. ]

@topepo
Copy link
Author

topepo commented Oct 9, 2017

Not a problem... I didn't really say anything originally about the binaries.

It looks like a moot point. From #35

In the previous commits, I have included the NLopt source code as subdirectory of src. If no pre-installed NLopt version can be found on the system during the configuration of nloptr, the included NLopt code is configured and compiled. NLopt is no longer downloaded during configuration which solves the issue raised in this pull request.

@jyypma Should I close this?

topepo added a commit to tidymodels/tidyposterior that referenced this issue Oct 25, 2017
@topepo
Copy link
Author

topepo commented Oct 25, 2017

It failed again on travis

trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Error in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz", :
 cannot open URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Execution halted

I'll try Dirk's suggestion

@eddelbuettel
Copy link
Contributor

eddelbuettel commented Oct 25, 2017

There are two main advantages to it (and I so need to blog on this):

  • a binary saves you time from compiling
  • a binary can make installation easier

Both hold here for nloptr after we mod'ed the configure script to use it.

Of course, this mostly only helps those on platform rich enough to actually have lots of binaries (in decent shape). An under-appreciated feature of Travis is its Ubuntu basis: there are over 25k binary packages in the distro alone, a bunch of very useful PPAs (ie when you need or want newest g++ or clang) --- and in the R case the 5k r-cran-* binary packages provided by Michael Rutter.

@jyypma
Copy link
Collaborator

jyypma commented Dec 22, 2018

Closed by f8cba33

@jyypma jyypma closed this as completed Dec 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants