Package Details: r-nloptr 1.2.2.2-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: LGPL3
Submitter: taekyung
Maintainer: dviktor
Last Packager: dviktor
Votes: 0
Popularity: 0.000000
First Submitted: 2019-07-11 21:16
Last Updated: 2020-07-06 14:36

Dependencies (7)

Required by (1)

Sources (1)

Latest Comments

japhir commented on 2020-11-05 10:18

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

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

japhir commented on 2020-11-05 09:08

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

What is the default shell for your system?

japhir commented on 2020-11-05 09:02

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

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

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':

dviktor commented on 2020-10-28 20:30

@keiichiiownsu12 can you please provide the whole output of makepkg? also please tell me pacman -Ql results

keiichiiownsu12 commented on 2020-10-28 19:43

Hate to beat a dead horse, but I am having a similar issue as referenced in a stackoverflow post here.

I.e.

** 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 '/home/$USER/.cache/yay/r-nloptr/src/00LOCK-nloptr/00new/nloptr/libs/nloptr.so':
  /home/$USER/.cache/yay/r-nloptr/src/00LOCK-nloptr/00new/nloptr/libs/nloptr.so: undefined symbol: nlopt_algorithm_name

Would this be fixed by removing/reinstalling nlopt? (asking because it's a dependency for another package that I can't remove at the moment)