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

NLOpt no longer installing #40

Closed
ganesh-krishnan opened this issue Oct 7, 2017 · 49 comments
Closed

NLOpt no longer installing #40

ganesh-krishnan opened this issue Oct 7, 2017 · 49 comments

Comments

@ganesh-krishnan
Copy link

Installation of nloptr is failing on Ubuntu (and probably other platforms), because the NLOpt package has moved permanently.

Note the curl -I output below:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
HTTP/1.1 301 Moved Permanently
Date: Sat, 07 Oct 2017 03:06:45 GMT
Server: Apache/2.4.10 (Debian)
Location: https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz
Content-Type: text/html; charset=iso-8859-1

This can be fixed by changing the URL at this line:

Alternatively, you can add the method="curl" and extra=-L options to download.files to fix this. If you do that line 120 in the above file will read:

${R_HOME}/bin/Rscript" --vanilla -e "download.file(
            url='http://ab-initio.mit.edu/nlopt/nlopt-${NLOPT_VERSION}.tar.gz', 
            destfile='nlopt-${NLOPT_VERSION}.tar.gz', 
            method='curl', extra='-L')
@jyypma
Copy link
Collaborator

jyypma commented Oct 7, 2017 via email

@jyypma
Copy link
Collaborator

jyypma commented Oct 7, 2017 via email

@ganesh-krishnan
Copy link
Author

ganesh-krishnan commented Oct 7, 2017

@jyypma Thanks. I have continuous deployment scenario, which I've got working for now by forking the repo and using the download.file hack above. These other options are interesting as well and I might directly install from the main GitHub repo, instead of the fork.

Feel free to close the issue. Just wanted to file an issue, because this took me a good 3-4 hours to figure out (mainly because of the continuous deployment scenario), so wanted any others facing this issue to be able to get to a solution quickly.

@pitla1
Copy link

pitla1 commented Oct 9, 2017

While trying to download nloptr in R version 3.3.3, I get the following error:

Warning in download.file(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 download all files

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
Warning message:
In untar(tarfile = "nlopt-2.4.2.tar.gz") :
'/bin/tar -xf 'nlopt-2.4.2.tar.gz'' returned error code 2
configure: Starting to install library to /tmp/RtmpefC7ok/R.INSTALLe06636f3d11/nloptr/nlopt-2.4.2
./configure: line 3325: cd: nlopt-2.4.2: No such file or directory

Any assistance would be highly appreciated.

@eddelbuettel
Copy link
Contributor

On Ubuntu, you do not need to rely on the external library:

~> dpkg -l | grep nlopt           # ie nlopt from Ubuntu
ii  libnlopt-dev        2.4.2+dfsg-2bu amd64          nonlinear optimization library -- developmen
ii  libnlopt0:amd64     2.4.2+dfsg-2bu amd64          nonlinear optimization library
~> install.r nloptr               # install.r is a helper from littler
trying URL 'https://cran.rstudio.com/src/contrib/nloptr_1.0.4.tar.gz'
Content type 'application/x-gzip' length 353957 bytes (345 KB)
==================================================
downloaded 345 KB

* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for pkg-config... yes
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... yes
checking nlopt.h presence... yes
checking for nlopt.h... yes
configure: Suitable NLopt library found.
configure: creating ./config.status
config.status: creating src/Makevars
** libs
ccache g++ -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe -Wno-unused  -march=native -c dummy.cpp -o dummy.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe  -Wno-unused -std=gnu99 -march=native -c nloptr.c -o nloptr.o
ccache g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o nloptr.so dummy.o nloptr.o -lnlopt -lm -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/nloptr/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (nloptr)

The downloaded source packages are in
	‘/tmp/downloaded_packages’
~> 

Fast, easy, reliable.

@pitla1
Copy link

pitla1 commented Oct 9, 2017

Hi Dirk, Thanks for your response.. what version of R did you use when trying to install nloptr_1.0.4.tar.gz?Sorry, if I missed those details in your post..

@pitla1
Copy link

pitla1 commented Oct 9, 2017

Please ignore my previous comments..
I was able to successfully install nloptr_1.0.4.tar.gz in Ubuntu.. as Jyypma and Dirk pointed out, it needs libnlopt-dev.

Thanks a ton!

@pitla1
Copy link

pitla1 commented Oct 9, 2017

Hi Jyympma and Steven GJ (authors of nloptr and nlopt)..
"nloptr" seems to b edependent on "libnlopt-dev". when is thee final version of nloptr is expected to be ready? Would the final version of "nloptr" continue to depend on "libnlopt-..."?

Would the new version of "nloptr" be then called "nlopt"? How would this name change impact the downstream packages. What changes to the installation downstream packages need to be made to account for the name change?

@eddelbuettel
Copy link
Contributor

You. Misunderstand. How. This. Works.

-dev simply means "compile against" as opposed to run-time. It has nothing to do with mature, immature, development, production, ... or other code labels.

@pitla1
Copy link

pitla1 commented Oct 10, 2017

Thanks, Dirk, for the clarifications! :)

@mattyjkelly
Copy link

Note the above instructions will work on ubuntu but require pkg-config to be installed
To successfully install on ubuntu 16 i needed to
run
sudo apt-get install pkg-config libnlopt-dev

@yonicd
Copy link

yonicd commented Nov 20, 2017

this issue is causing downstream problems in other packages that depend on nloptr, for example in ggeffects.

@eddelbuettel
Copy link
Contributor

eddelbuettel commented Nov 20, 2017

Please clarify what "this" is. A package not installing will by definition cause problem for its dependencies.

@yonicd
Copy link

yonicd commented Nov 20, 2017

sorry for the obvious statement

@eddelbuettel
Copy link
Contributor

Ok, can you clarify what in particular happens to ggeffects? I am still confused what particular aspect you are trying to stress. I am probably just extra-dense. Monday and all...

@yonicd
Copy link

yonicd commented Nov 20, 2017

ggeffects imports effects which imports lme4 which imports nloptr. The number of pkgs that import lme4 is large, so ggeffects is just an example in the domain.

@eddelbuettel
Copy link
Contributor

Sure.

R> library(tools)
R> db <- CRAN_package_db()
R> revdeps <- package_dependencies("nloptr", db=db, recursive=TRUE, reverse=TRUE)
R> length(revdeps[[1]])
[1] 507
R> 

@strengejacke
Copy link

strengejacke commented Nov 20, 2017

If there is a problem with downstream dependencies, shouldn't this be recognized by CRAN? The check results are all ok: https://cran.r-project.org/web/checks/check_results_ggeffects.html

@xbeta
Copy link

xbeta commented Apr 20, 2018

Is there really no fix for this? I am still facing this issue. I mean I just try to install a package and have no idea why I need to understand how I will get 403

* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for pkg-config... yes
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... no
checking nlopt.h presence... no
checking for nlopt.h... no
configure: Need to download and build NLopt
trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Warning in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  "internal" method cannot handle https redirection to: 'https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz'
switching to method = "libcurl" because of redirection to https
downloaded 0 bytes

Warning in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  URL 'https://github-production-release-asset-2e65be.s3.amazonaws.com/12412122/5dd09f0a-6d59-11e7-9685-af3ea1aac9be?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180420%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180420T063122Z&X-Amz-Expires=300&X-Amz-Signature=68e2b3ccb31c2420e90c76a9710dac1fdea39c0a48273d6ec5ccb98dd2cabc91&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnlopt-2.4.2.tar.gz&response-content-type=application%2Foctet-stream': status was '403 Forbidden'
Error in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  cannot download all files
Execution halted
/bin/tar: This does not look like a tar archive

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
Warning message:
In untar(tarfile = "nlopt-2.4.2.tar.gz") :
  '/bin/tar -xf 'nlopt-2.4.2.tar.gz'' returned error code 2
configure: Starting to install library to /tmp/RtmpObz3OE/R.INSTALLda4863c21247/nloptr/nlopt-2.4.2
./configure: line 3325: cd: nlopt-2.4.2: No such file or directory
./configure: line 3325: ed: command not found
./configure: line 3327: ed: command not found
./configure: line 3331: ed: command not found

@jyypma
Copy link
Collaborator

jyypma commented Apr 20, 2018 via email

@xbeta
Copy link

xbeta commented Apr 20, 2018

@jyypma

Awesome! Thanks!

@pitla1
Copy link

pitla1 commented Apr 21, 2018 via email

@eddelbuettel
Copy link
Contributor

Wrong place for the question. Try the r-package-devel list.

@xbeta
Copy link

xbeta commented Apr 23, 2018

@jyypma Any update on this?

@jyypma
Copy link
Collaborator

jyypma commented Apr 23, 2018 via email

@xbeta
Copy link

xbeta commented Apr 23, 2018

@jyypma Thanks! Mind to share the fix? So we can help test it out? We are on Ubuntu/Debian Linux on AWS if that helps.

@jyypma
Copy link
Collaborator

jyypma commented Apr 23, 2018 via email

@xbeta
Copy link

xbeta commented Apr 23, 2018

@jyypma

I don't think it works

[21:46:41.41.559][info] Attempting to install the following packages: https://github.com/jyypma/nloptr
trying URL 'http://cran.at.r-project.org/src/contrib/nloptr_1.0.4.tar.gz'
Content type 'application/x-gzip' length 353957 bytes (345 KB)
==================================================
downloaded 345 KB

* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for pkg-config... yes
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... no
checking nlopt.h presence... no
checking for nlopt.h... no
configure: Need to download and build NLopt
trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Warning in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  "internal" method cannot handle https redirection to: 'https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz'
switching to method = "libcurl" because of redirection to https
downloaded 0 bytes

Warning in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  URL 'https://github-production-release-asset-2e65be.s3.amazonaws.com/12412122/5dd09f0a-6d59-11e7-9685-af3ea1aac9be?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180423%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180423T214649Z&X-Amz-Expires=300&X-Amz-Signature=54cd3113a617626f6267e81e011c3877fec5f4d1a8c72ce2a1943e86b666e233&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnlopt-2.4.2.tar.gz&response-content-type=application%2Foctet-stream': status was '403 Forbidden'
Error in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  cannot download all files
Execution halted
/bin/tar: This does not look like a tar archive

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
Warning message:
In untar(tarfile = "nlopt-2.4.2.tar.gz") :
  '/bin/tar -xf 'nlopt-2.4.2.tar.gz'' returned error code 2
configure: Starting to install library to /tmp/RtmpvN2HBw/R.INSTALLb0ba7450f452/nloptr/nlopt-2.4.2

@eddelbuettel
Copy link
Contributor

You used

URL 'http://cran.at.r-project.org/src/contrib/nloptr_1.0.4.tar.gz'

because you missed the part where Jelmer clearly stated

The latest development version on GitHub

@xbeta
Copy link

xbeta commented Apr 23, 2018

@eddelbuettel Thanks for pointing that out.

I just follow this line to install it:

    library(devtools)
    devtools::install_github("jyypma/nloptr")

Am I missing something? (I am very new to R and helping my team to fix this issue.)

@eddelbuettel
Copy link
Contributor

See my October 9, 2017, comment above. "Works for me" but then I also take care of things by making sure the underlying nlopt library is installed and can be used for development (ie -dev package installed).

@xbeta
Copy link

xbeta commented Apr 23, 2018

@eddelbuettel
Thanks! Maybe my installation script has some issues then, I will figure that out. Thanks!

@xbeta
Copy link

xbeta commented Apr 23, 2018

Ahh. I know why it doesn't work for me. Because I have transitive dependency. Why can't we just publish the latest development code here to CRAN ?

@eddelbuettel
Copy link
Contributor

No, each package is independent. I urge to calm down, not send a message every few minutes but maybe re-read this ticket as well as other that may have gotten closed. They all contain information.

Jelmer did fix this by embedding the sources. If you end up attempting (and failing) an nlopt downloading then ... you appear to be doing something wrong.

@xbeta
Copy link

xbeta commented Apr 24, 2018

@eddelbuettel Sorry about the message earlier. I am not sure whether there's a better way to communicate this. AFAIK, package nloptr is used by other packages, which I am also depending. And such transitive dependency is not something I can address on my own since I do not own those packages. I just want to know the reason why we cannot just simply publish it to CRAN with the proper fix.

@eddelbuettel
Copy link
Contributor

eddelbuettel commented Apr 24, 2018

Your suite of messages is really of somewhat sub-standard quality. Read eg something like this for SO.

So far you told us numerous times that things fail for you, often copying the same (basically irrelevant) lengthy error message. What you have not done is saying:

  • what OS
  • what version / release
  • what libraries
  • whether you understand what "install libnlopt-dev from your package management system" means

To repeat what I said many times before, what I do (based on something we added to nloptr years ago) is

  • ensure I have libnlopt-dev installed (Debian/Ubuntu name here, may be different for RHEL/CentOS/brew)
  • then when I install we see
checking nlopt.h usability... yes
checking nlopt.h presence... yes
checking for nlopt.h... yes
configure: Suitable NLopt library found.

Please note the Suitable NLopt librar found. That is important. Hence no download is attempted as none is needed. On top, the build is quicker as we only compile two files:

config.status: creating src/Makevars
** libs
ccache g++ -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe  -Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-deprecated-declarations -march=native -c dummy.cpp -o dummy.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe  -Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-deprecated-declarations -std=gnu99 -march=native -c nloptr.c -o nloptr.o
ccache g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o nloptr.so dummy.o nloptr.o -lnlopt -lm -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/nloptr/libs
** R

(I use ccache but that is orthogonal).

(And no, one does not "just upload to CRAN".)

Hth.

@eddelbuettel
Copy link
Contributor

And for completes, when installing from here rather than CRAN I see

checking nlopt.h usability... yes
checking nlopt.h presence... yes
checking for nlopt.h... yes
configure: Now testing for NLopt versison number.
configure: Suitable NLopt library found.
configure: creating ./config.status

and we now have three files compiled

** libs
ccache g++ -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe  -Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-deprecated-declarations -march=native -c dummy.cpp -o dummy.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe  -Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-deprecated-declarations -std=gnu99 -march=native -c init_nloptr.c -o init_nloptr.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O3 -Wall -pipe  -Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-deprecated-declarations -std=gnu99 -march=native -c nloptr.c -o nloptr.o
ccache g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o nloptr.so dummy.o init_nloptr.o nloptr.o -lnlopt -lm -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/nloptr/libs
** R

but it succeeds of course the same way.

@xbeta
Copy link

xbeta commented Apr 24, 2018

Thanks! @eddelbuettel You are right, I cannot treat this Github issue page as an IM.

I am using Ubuntu/Debian Linux:

Distributor ID:	Debian
Description:	Debian GNU/Linux 8.10 (jessie)
Release:	8.10
Codename:	jessie

Install libnlopt-dev is not an option for us as our base OS image is not controlled by my team. In fact, we have root or any security access to update the base OS image. What's our options here?

Thanks,
Sam.

@JoshRosen
Copy link

I am experiencing an issue which I believe is similar to others reported here: installation of nloptr is hanging indefinitely because the server hosting http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz is down. Specifically, I see the following error message in my build, followed by an indefinite hang:

configure: Need to download and build NLopt
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'
In addition: Warning message:
In download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz': status was 'Couldn't connect to server'
Execution halted
Error in file(con, "rb") : cannot open the connection
Calls: untar -> readBin -> file
In addition: Warning message:
In file(con, "rb") :
  cannot open file 'nlopt-2.4.2.tar.gz': No such file or directory
Execution halted
configure: Starting to install library to /tmp/RtmpspySgn/R.INSTALL3a747896656d/nloptr/nlopt-2.4.2
./configure: line 3325: cd: nlopt-2.4.2: No such file or directory
./configure: line 3325: ed: command not found
./configure: line 3327: ed: command not found
./configure: line 3331: ed: command not found

There is a previous report of this problem on the nlopt repository at stevengj/nlopt#119, where @stevengj suggested filing an issue against nloptr to update the download link to point to GItHub downloads at https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz instead of the old MIT link.

As of the current master commit, it looks like nloptr is still using the old download link: https://github.com/jyypma/nloptr/blob/8d5f62a1d2e2db8c62810f8462cc7fe72de8945c/src/Makevars.in#L120

Should the download link be updated to point directly to the GitHub download link? Or should the uptime of http://ab-initio.mit.edu be improved? I'm not experienced enough with the R packaging ecosystem to sure which answer is right. I'll also cross-post this question on the nlopt issue.

@jyypma
Copy link
Collaborator

jyypma commented Sep 20, 2018 via email

@JoshRosen
Copy link

Thank you for the clarification! Are there plans to publish an updated version to CRAN? It looks like the latest version available there (1.0.4) was published on 2017-08-22 and does not include the bundled nlopt sources.

If there are factors which would delay a larger feature release (such as additional testing requirements), would it be possible to publish a minor 1.0.5 release whose only change is to update the download URL with everything else remaining unchanged? That seems like it would be a quick and surgical fix for this download flakiness issue (which appears to be impacting multiple users based on the linked GitHub issues).

@JoshRosen
Copy link

To be clear, I'm no longer personally blocked by this issue (since I just installed libnlopt-dev with my package manager), but I'm reporting this issue because I suspect that it's a confusing stumbling block for other CRAN users.

@eddelbuettel
Copy link
Contributor

@jyypma Can you detail what is holding nloptr up at CRAN? Version 1.2.0 has been sitting in incoming for several weeks now. Is anything happening? Can we help? Should we place it another (eg drat-based) repo?

@jyypma
Copy link
Collaborator

jyypma commented Sep 20, 2018 via email

@eddelbuettel
Copy link
Contributor

Gosh, I should have asked you earlier. That is a copy and paste issue introduced by us in the example from RcppArmadillo that everybody copies. This has nothing to do with you.

See this file from minimaxdesign:

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CFLAGS)

It is two years old, and the values are static and not influenced at all by whatever you do. And that is the error: SHLIB_OPENMP_CXXFLAGS in one line, but SHLIB_OPENMP_CFLAGS in another. While I have never seen the actual value differ, CRAN now barks. No more, no less.

Are you sure there is nothing else going on?

@jyypma
Copy link
Collaborator

jyypma commented Sep 21, 2018 via email

@nzgwynn
Copy link

nzgwynn commented Oct 4, 2018

I also had problems installing lme4 in Ubuntu 16.04 and R version 3.4.4 (2018-03-15) b/c nloptr failed to install. I used

sudo apt-get install libnlopt-dev

which @eddelbuettel suggested, followed by

library(devtools)
devtools::install_github("jyypma/nloptr")

from @xbeta then installed lme4.

The original error message follows:

trying URL 'https://cloud.r-project.org/src/contrib/nloptr_1.0.4.tar.gz'
Error in download.file(url, destfile, method, mode = "wb", ...) : cannot open URL 'https://cloud.r-project.org/src/contrib/nloptr_1.0.4.tar.gz'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cloud.r-project.org/src/contrib/nloptr_1.0.4.tar.gz': HTTP status was '404 Not Found'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘nloptr’ failed
Error in base::library(pkg, character.only = TRUE) :
`there is no package called ‘nloptr’``

@pifparfait
Copy link

Does someone try to install it on mac?

@astamm
Copy link
Owner

astamm commented Feb 1, 2022

We just released v2.0.0. It should work on all platforms. The only platform where a download is still needed is windows-release.

@astamm astamm closed this as completed Feb 1, 2022
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