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

Install cmake when nloptr is a dependency #328

Closed
nextpagesoft opened this issue May 5, 2022 · 6 comments
Closed

Install cmake when nloptr is a dependency #328

nextpagesoft opened this issue May 5, 2022 · 6 comments
Assignees

Comments

@nextpagesoft
Copy link

@nextpagesoft nextpagesoft commented May 5, 2022

Hello,

Package nloptr depends on cmake which seems to be missing:

[2022-05-05T11:28:16.816344469+0000] Building R package: nloptr (2.0.1)
/mnt/packages/build /mnt
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 the compiler supports GNU C++... yes
checking whether g++ -std=gnu++14 accepts -g... yes
checking for g++ -std=gnu++14 option to enable C++11 features... none needed
checking how to run the C++ preprocessor... g++ -std=gnu++14 -E
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ -std=gnu++14 accepts -g... (cached) yes
checking for g++ -std=gnu++14 option to enable C++11 features... (cached) none needed
checking for pkg-config... /usr/bin/pkg-config
checking if pkg-config knows NLopt... no
checking for cmake... no

------------------ CMAKE NOT FOUND --------------------

CMake was not found on the PATH. Please install CMake:

 - sudo yum install cmake          (Fedora/CentOS; inside a terminal)
 - sudo apt install cmake          (Debian/Ubuntu; inside a terminal).
 - sudo pacman -S cmake            (Arch Linux; inside a terminal).
 - sudo brew install cmake         (MacOS; inside a terminal with Homebrew)
 - sudo port install cmake         (MacOS; inside a terminal with MacPorts)

Alternatively install CMake from: <https://cmake.org/>

-------------------------------------------------------

Warning: Warning: unknown option--vanilla* installing to library/opt/R/4.2.0/lib/R/library* installing *source* packagenloptr...
** packagenloptrsuccessfully unpacked and MD5 sums checked
** using staged installation
ERROR: configuration failed for packagenloptr* removing/opt/R/4.2.0/lib/R/library/nloptrError: Error: Unhandled Exception: Child Task 1147753487 failed: Error building image: Error building nloptr (2.0.1). Build exited with non-zero status: 1
################################# End Task Log ################################# 
Execution halted
Error: Process completed with exit code 1.

Authors of nloptr see no reason for them to contact you (astamm/nloptr#113) thus instead let me please ask politely for your support on this.

@nextpagesoft nextpagesoft changed the title Install cmake with nloptr is a dependency Install cmake when nloptr is a dependency May 5, 2022
@cath-parkinson
Copy link

@cath-parkinson cath-parkinson commented May 6, 2022

I am having the same issue, trying to publish an app with nloptr 2.0.0. I believe system libraries cmake and libnlopt-dev are required.

@kippandrew
Copy link
Contributor

@kippandrew kippandrew commented May 6, 2022

This looks like a significant behavior change with the most recent version of nloptr. We will look at what is required to add CMake support to the shinyapps.io base images. However, another approach might be to add an install script to this repo for nloptr that installs libnlopt-dev.

@mbaynton
Copy link

@mbaynton mbaynton commented Jun 6, 2022

Because nloptr requires nlopt >= 2.7.0, but only 2.6.x is readily available in our Ubuntu Focal based environment, we can't solve this by installing libnlopt-dev.

We've opted to resolve this outside of this repository by adding cmake to our base environments. That will provide a more complete build environment so other projects requiring it might be spared this snag in future. We'll still leave this issue open until that change has made its way to production.

@Rafaelsoler13
Copy link

@Rafaelsoler13 Rafaelsoler13 commented Jun 27, 2022

I am having the same problem, with cmake version 3.16.3, libnlopt-dev 2.6.1 and nloptr 2.0.3 in R 4.0.3

------------------ CMAKE NOT FOUND --------------------

...

ERROR: configuration failed for package 'nloptr'
* removing '/opt/R/4.0.3/lib/R/library/nloptr'
################################# End Task Log ################################# 
Error: Unhandled Exception: Child Task 1176973985 failed: Error building image: Error building nloptr (2.0.3). Build exited with non-zero status: 1

@mbaynton
Copy link

@mbaynton mbaynton commented Jun 27, 2022

Sorry for the delay here! The solution to this problem required a new version of our base environment for shinyapps.io, and there are constraints on how frequently we can deploy new versions of those.

The good news is this has been rolled out to production earlier this afternoon. Please post feedback here to verify, we'll keep this issue open until we get some positive feedback. Thanks!

@mbaynton
Copy link

@mbaynton mbaynton commented Aug 1, 2022

In hopes that the lack of additional comments is an indicator that nobody is continuing to have issues, I'm closing this. Please reopen if you believe the issue is not resolved.

@mbaynton mbaynton closed this as completed Aug 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

5 participants