Hi,

I'm getting the following error when trying to compile and install nloptr
in R for AIX (I manually compiled nlopt using GCC).  Spoke with the
maintainer of nloptr about the error, and he found this export symbol issue
on AIX (
http://stackoverflow.com/questions/27808779/make-aix-load-all-shared-symbols-at-run-time)
and suggested that it may be the culprit.

If I wanted to enable to -bexpfull option to be enabled for compilation of
nlopt using GCC, how would I go about specifying this in the 'configure' or
'make' steps?  Thank you.

> install.packages('nloptr')
trying URL '
http://cran.revolutionanalytics.com/src/contrib/nloptr_1.0.4.tar.gz'
Content type 'application/octet-stream' length 353942 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... /opt/freeware/bin/grep
checking for egrep... /opt/freeware/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
g++ -I/sas/outmva/opt/lib/R/include -DNDEBUG  -I/usr/local/include
 -g -O2  -c dummy.cpp -o dummy.o
gcc -std=gnu99 -I/sas/outmva/opt/lib/R/include -DNDEBUG
-I/usr/local/include  -mno-fp-in-toc    -g -O2  -c nloptr.c -o
nloptr.o
g++ -shared -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc
-L/usr/local/lib -o nloptr.so dummy.o nloptr.o -lm -lintl
installing to /sas/outmva/opt/lib/R/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
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/sas/outmva/opt/lib/R/library/nloptr/libs/nloptr.so':
  rtld: 0712-001 Symbol nlopt_create was referenced
      from module
/sas/outmva/opt/lib/R/library/nloptr/libs/nloptr.so(), but a runtime
definition
            of the symbol was not found.
rtld: 0712-001 Symbol nlopt_set_stopval was referenced
      from module
/sas/outmva/opt/lib/R/library/nloptr/libs/nloptr.so(), but a runtime
definition
            of the symbol was not found.
rtld: 0712-001 Symbol nlopt_set_ftol_rel was referenced
      from module
/sas/outmva/opt/lib/R/library/nloptr/libs/nloptr.so(), but a runtime
definition
            of the symbol was not found.
rtld: 0712-001 Symbol nlopt_set_ftol_abs was referenced
      from module
/sas/outmva/opt/lib/R/library/nloptr/libs/nloptr.so(), but a runtime
definition
            of the symbol was not found.
rtld: 0712-001 Symbol nlopt_set_xtol_rel was referenced
      from module
/sas/outmva/opt/lib/R/library/nloptr/libs/nloptr.so(), but a runtime
definition
            of the sy
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/sas/outmva/opt/lib/R/library/nloptr'

The downloaded source packages are in
        '/tmp/Rtmp5yvama/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("nloptr") :
  installation of package 'nloptr' had non-zero exit

-- Vinh
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to