C compilation flags from R

前端 未结 3 571
别跟我提以往
别跟我提以往 2021-01-05 02:54

Can you set R\'s C and C++ flags at compilation time when installing from R CMD INSTALL (essentially, in this particular case I want to turn off compiler optimi

3条回答
  •  自闭症患者
    2021-01-05 03:21

    Dirk - very helpful discussion (as always) and definitly pointed me in the right direction. For my specific issue, it turned out in addition to the Makevars file I had to pass arguments through to configure. I have no idea why this is the case (and reading around doesn't seem to be the norm, so maybe I've done something wrong somewhere), but if anyone else has the same problem, using a ~/.R/Makevars combined with the following arguments for configure/INSTALL worked for me.

    R CMD INSTALL --configure-args="CFLAGS=-g CXXFLAGS=-g" package.tar.gz
    

提交回复
热议问题