vdorie / treatSens

15 stars 5 forks source link

Cannot build 2.1.3 package from CRAN archive #12

Open phmccarty opened 4 years ago

phmccarty commented 4 years ago

I am trying to build treatSens-2.1.3 on Clear Linux OS, but I run into the following compile error:

g++ -std=gnu++11 -I"/usr/lib64/R/include" -DNDEBUG -Iinclude -pthread -I"/usr/lib64/R/library/dbarts/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I/usr/local/include  -fpic  -g -O3 -feliminate-unused-debug-types  -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64  -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects  -fno-signed-zeros -fno-trapping-math  -fassociative-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -fvisibility-inlines-hidden -Wl,--enable-new-dtags  -O3 -flto -fno-semantic-interposition  -march=haswell -ftree-vectorize  -c bartTreatmentModel.cpp -o bartTreatmentModel.o
bartTreatmentModel.cpp: In function 'dbarts::Control* {anonymous}::createBARTControl(cibart::BARTTreatmentModel&)':
bartTreatmentModel.cpp:217:30: error: cannot convert 'ext_rng_algorithm_t' to 'dbarts::rng_algorithm_t' in assignment
  217 |     control->rng_algorithm = EXT_RNG_ALGORITHM_USER_UNIFORM;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              ext_rng_algorithm_t
bartTreatmentModel.cpp:218:35: error: cannot convert 'ext_rng_standardNormal_t' to 'dbarts::rng_standardNormal_t' in assignment
  218 |     control->rng_standardNormal = EXT_RNG_STANDARD_NORMAL_USER_NORM;
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   ext_rng_standardNormal_t

I tried to identify any relevant fixes from the master branch to cherry pick, but I'm not entirely sure which commit(s) are appropriate to resolve it. Any advice would be appreciated.

vdorie commented 4 years ago

The easiest thing to do is to install the latest dbarts off of CRAN or github and then install treatSens master. If you want to use the archived version (which I don't think differs too much from master), version 2.1.3 treatSens appears to work well with the old dbarts 0.9-8.