Package Details: r-nloptr 2.1.1-1

Git Clone URL: https://aur.archlinux.org/r-nloptr.git (read-only, click to copy)
Package Base: r-nloptr
Description: R Interface to NLopt
Upstream URL: https://cran.r-project.org/package=nloptr
Licenses: LGPL
Submitter: taekyung
Maintainer: BioArchLinuxBot
Last Packager: BioArchLinuxBot
Votes: 3
Popularity: 0.049130
First Submitted: 2019-07-11 21:16 (UTC)
Last Updated: 2024-06-25 12:03 (UTC)

Latest Comments

1 2 Next › Last »

dviktor commented on 2021-12-08 18:15 (UTC)

Further maintenance and support for this package has been moved there. You can install pre-built packages from my repo

japhir commented on 2021-12-08 15:24 (UTC) (edited on 2021-12-08 15:25 (UTC) by japhir)

Yeah it's not working again, but it does if I change the shebang in configure to #!/bin/bash.

I filed an issue upstream, but was not able to narrow it down to what is different on my system from all the tests the developer ran for me. Any ideas here?

keiichiiownsu12 commented on 2021-05-28 17:30 (UTC) (edited on 2021-05-28 17:31 (UTC) by keiichiiownsu12)

@japhir can confirm a similar issue is present even 6 mo later.

I.e. with /usr/bin/sh -> /usr/bin/dash, nlopt threw the same error reported last year ("unable to find pkg-config"). Changing it to /usr/bin/sh -> /usr/bin/bash fixes the issue...

japhir commented on 2020-11-05 10:18 (UTC) (edited on 2021-12-08 15:28 (UTC) by japhir)

So it looks like it's an issue with the package. Since this also occurred with another package, I posted about it to CRAN's R-devel list

dviktor commented on 2020-11-05 10:01 (UTC)

Could you please check where /bin/sh points to?

japhir commented on 2020-11-05 09:08 (UTC)

The default shell is bash, but I installed dash for speed increases and it seems that some of these R packages use non-POSIX-compliant bashisms in their #! /bin/sh scripts

dviktor commented on 2020-11-05 09:04 (UTC)

What is the default shell for your system?

japhir commented on 2020-11-05 09:02 (UTC) (edited on 2020-11-05 09:05 (UTC) by japhir)

I had a similar issue with installing ncdf4 recently, it seems that there's a bashism in the configure file. Changing the top line to #! /usr/bin/bash (or simply #! /bin/bash fixes the issue for me!

Probably because at some point I decided to use dash as a shell?

dviktor commented on 2020-11-05 08:45 (UTC)

Very strange, I'm able to build it on my machine even without clean chroot. @japhir, look once more through your log - something wrong with ./configure step. This is the output of my build:

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++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=gnu++11 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... /usr/bin/grep
checking for egrep... /usr/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: Now testing for NLopt version 2.4.0 or greater.
configure: Suitable NLopt library found.
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/PkgFlags.R

And in your output I see the following lines:

...
./configure: 2974: test: x: unexpected operator
...
configure: Now testing for NLopt version 2.4.0 or greater.
./configure: 3272: test: xyes: unexpected operator
configure: WARNING: Could not test version of NLopt because pkg-config is not installed. Make sure the version number of NLopt is 2.4.0 or greater. Otherwise nloptr can not be used.
...

Try to sort out these issues first and build once again

japhir commented on 2020-11-04 14:18 (UTC) (edited on 2020-11-04 14:20 (UTC) by japhir)

I have the same problem, it appears

> paru -Syu r-lme4
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Looking for AUR upgrades
warning: v8-r: ignoring package upgrade (8.8.166-1 => 8.8.211-1)
:: Looking for devel upgrades
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...
:: Packages not in the AUR: r-hexbin  r-plotly
:: Marked out of date: anyconnect-client  gmt  nautilus-nextcloud  r-httr  r-pracma
:: Orphans: phantomjs

Aur (2) r-nloptr-1.2.2.2-1  r-lme4-1.1.25-1

:: Proceed to review? [Y/n]:

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
:: Proceed with installation? [Y/n]:
fetching devel info...
==> Making package: r-nloptr 1.2.2.2-1 (Wed 04 Nov 2020 03:19:48 PM CET)
==> Retrieving sources...
  -> Found nloptr_1.2.2.2.tar.gz
==> Validating source files with md5sums...
    nloptr_1.2.2.2.tar.gz ... Passed
==> Making package: r-nloptr 1.2.2.2-1 (Wed 04 Nov 2020 03:19:49 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found nloptr_1.2.2.2.tar.gz
==> Validating source files with md5sums...
    nloptr_1.2.2.2.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting nloptr_1.2.2.2.tar.gz with bsdtar
==> Sources are ready.
r-nloptr-1.2.2.2-1: parsing pkg list...
==> Making package: r-nloptr 1.2.2.2-1 (Wed 04 Nov 2020 03:19:51 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
** using staged installation
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++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=gnu++11 accepts -g... (cached) yes
checking for pkg-config... yes
./configure: 2974: test: x: unexpected operator
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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: Now testing for NLopt version 2.4.0 or greater.
./configure: 3272: test: xyes: unexpected operator
configure: WARNING: Could not test version of NLopt because pkg-config is not installed. Make sure the version number of NLopt is 2.4.0 or greater. Otherwise nloptr can not be used.
configure: Suitable NLopt library found.
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/PkgFlags.R
** libs
g++ -std=gnu++11 -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c dummy.cpp -o dummy.o
gcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c init_nloptr.c -o init_nloptr.o
gcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c nloptr.c -o nloptr.o
g++ -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o nloptr.so dummy.o init_nloptr.o nloptr.o -L/usr/lib64/R/lib -lR
installing to /tmp/makepkg/r-nloptr/src/00LOCK-nloptr/00new/nloptr/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘nloptr’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/tmp/makepkg/r-nloptr/src/00LOCK-nloptr/00new/nloptr/libs/nloptr.so':
  /tmp/makepkg/r-nloptr/src/00LOCK-nloptr/00new/nloptr/libs/nloptr.so: undefined symbol: nlopt_algorithm_name
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/tmp/makepkg/r-nloptr/src/nloptr’
* restoring previous ‘/tmp/makepkg/r-nloptr/src/nloptr’
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'r-nloptr-1.2.2.2-1':