vdorie / treatSens

15 stars 5 forks source link

Unable to install V2.0 - compile errors #1

Closed ljw1 closed 8 years ago

ljw1 commented 9 years ago

When attempting to upgrade an R install on Ubuntu 14.04 the treatSens package will not compile. The install was run as the root user, so there should be no file permission problems.

> install_github("vdorie/treatSens")
Downloading github repo vdorie/treatSens@master
Installing treatSens
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore CMD  \
  INSTALL '/tmp/RtmpHDAFeW/devtools222b459cb938/vdorie-treatSens-6bd56b8'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package \u2018treatSens\u2019 ...
checking for gcc... gcc -std=gnu99
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 gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for gcc -std=gnu99 option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
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 for C/C++ restrict keyword... __restrict
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 whether byte ordering is bigendian... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking cstdint usability... no
checking cstdint presence... no
checking for cstdint... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for int64_t... yes
checking for uint64_t... yes
checking for gettimeofday... yes
checking for clock_gettime... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/config.hpp
config.status: creating src/external/config.h
** libs
g++ -I/usr/share/R/include -DNDEBUG -Iinclude -pthread  -I"/usr/local/lib/R/site-library/dbarts/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c R_interface.cpp -o R_interface.o
g++ -I/usr/share/R/include -DNDEBUG -Iinclude -pthread  -I"/usr/local/lib/R/site-library/dbarts/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c bartTreatmentModel.cpp -o bartTreatmentModel.o
g++ -I/usr/share/R/include -DNDEBUG -Iinclude -pthread  -I"/usr/local/lib/R/site-library/dbarts/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c guessNumCores.cpp -o guessNumCores.o
guessNumCores.cpp: In function \u2018bool {anonymous}::parseProcCPUInfo(std::vector<{anonymous}::Processor*>&)\u2019:
guessNumCores.cpp:212:58: warning: ignoring return value of \u2018char* strerror_r(int, char*, size_t)\u2019, declared with attribute warn_unused_result [-Wunused-result]
       strerror_r(errno, errorBuffer, ERROR_BUFFER_LENGTH);
                                                          ^
guessNumCores.cpp:243:58: warning: ignoring return value of \u2018char* strerror_r(int, char*, size_t)\u2019, declared with attribute warn_unused_result [-Wunused-result]
       strerror_r(errno, errorBuffer, ERROR_BUFFER_LENGTH);
                                                          ^
g++ -I/usr/share/R/include -DNDEBUG -Iinclude -pthread  -I"/usr/local/lib/R/site-library/dbarts/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c probitEMTreatmentModel.cpp -o probitEMTreatmentModel.o
g++ -I/usr/share/R/include -DNDEBUG -Iinclude -pthread  -I"/usr/local/lib/R/site-library/dbarts/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c probitTreatmentModel.cpp -o probitTreatmentModel.o
g++ -I/usr/share/R/include -DNDEBUG -Iinclude -pthread  -I"/usr/local/lib/R/site-library/dbarts/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c sensitivityAnalysis.cpp -o sensitivityAnalysis.o
make[1]: Entering directory `/tmp/RtmpHDAFeW/devtools222b459cb938/vdorie-treatSens-6bd56b8/src/glm'
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c glm.c -o glm.o
ar rv libglm.a glm.o
ar: creating libglm.a
a - glm.o
make[1]: Leaving directory `/tmp/RtmpHDAFeW/devtools222b459cb938/vdorie-treatSens-6bd56b8/src/glm'
make[1]: Entering directory `/tmp/RtmpHDAFeW/devtools222b459cb938/vdorie-treatSens-6bd56b8/src/external'
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c binaryIO.c -o binaryIO.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c io.c -o io.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c linearAlgebra.c -o linearAlgebra.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c moments.c -o moments.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c randomBase.c -o randomBase.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c randomNorm.c -o randomNorm.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c random.c -o random.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c stringWriter.c -o stringWriter.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../include -pthread  -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c thread.c -o thread.o
ar rv libexternal.a binaryIO.o io.o linearAlgebra.o moments.o randomBase.o randomNorm.o random.o stringWriter.o thread.o
ar: creating libexternal.a
a - binaryIO.o
a - io.o
a - linearAlgebra.o
a - moments.o
a - randomBase.o
a - randomNorm.o
a - random.o
a - stringWriter.o
a - thread.o
make[1]: Leaving directory `/tmp/RtmpHDAFeW/devtools222b459cb938/vdorie-treatSens-6bd56b8/src/external'
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o treatSens.so R_interface.o bartTreatmentModel.o guessNumCores.o probitEMTreatmentModel.o probitTreatmentModel.o sensitivityAnalysis.o -llapack -lblas -lgfortran -lm -lquadmath glm/libglm.a external/libexternal.a -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/treatSens/libs
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/lib/R/site-library/treatSens/libs/treatSens.so':
  /usr/local/lib/R/site-library/treatSens/libs/treatSens.so: undefined symbol: dtrtrs_
Error: loading failed
Execution halted
ERROR: loading failed
* removing \u2018/usr/local/lib/R/site-library/treatSens\u2019
* restoring previous \u2018/usr/local/lib/R/site-library/treatSens\u2019
Error: Command failed (1)
vdorie commented 9 years ago

Thanks. I ran into this a while back with another package, and the solution involved changing the link order. I don't have access to an Ubuntu install to test at the moment, but I applied the same changes here. Hopefully, it should install now.

Vince