&引用-fdebug前缀映射;R3.6.1配置中缺少
我想使用&引用-fdebug前缀映射;R3.6.1配置中缺少,r,gdb,rcpp,R,Gdb,Rcpp,我想使用gdb调试基于Rcpp的包,但我的R配置缺少-fdebug prefix map,这似乎是调试器无法找到错误行的原因。如何配置此选项 # etc/Makeconf. Generated from Makeconf.in by configure. # # ${R_HOME}/etc/Makeconf # # R was configured using the following call # (not including env. vars and site configuratio
gdb
调试基于Rcpp的包,但我的R配置缺少-fdebug prefix map
,这似乎是调试器无法找到错误行的原因。如何配置此选项
# etc/Makeconf. Generated from Makeconf.in by configure.
#
# ${R_HOME}/etc/Makeconf
#
# R was configured using the following call
# (not including env. vars and site configuration)
# configure '--prefix=/usr' '--with-cairo' '--with-jpeglib' '--with-readline' '--with-tcltk' '--with-system-bzlib' '--with-system-pcre' '--with-system-zlib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share/R/share' '--includedir=/usr/share/R/include' '--with-blas' '--with-lapack' '--enable-R-profiling' '--enable-R-shlib' '--enable-memory-profiling' '--without-recommended-packages' '--build' 'x86_64-linux-gnu' 'build_alias=x86_64-linux-gnu' 'R_PRINTCMD=/usr/bin/lpr' 'R_PAPERSIZE=letter' 'TAR=/bin/tar' 'R_BROWSER=xdg-open' 'LIBnn=lib' 'JAVA_HOME=/usr/lib/jvm/default-java' 'R_SHELL=/bin/bash' 'CC=gcc -std=gnu99' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=' 'FC=gfortran' 'FCFLAGS=-g -O2 -fstack-protector-strong' 'CXX=g++' 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g'
下面是我的包编译消息
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I"/home/sasa/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -ggdb3 -Og -march=native -flto -Wall -Werror -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c train.cpp -o train.o
g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o fast.beta.train.so RcppExports.o train.o -ggdb3 -Og -march=native -flto -Wall -Werror -L/usr/lib/R/lib -lR```
你也可以
- 编辑
(可能首选)或~/.R/Makevars
- 在R自己的
(以下etc/
)中编辑文件$RHOME
,或Makeconf
- “对于未发布的包”,直接编辑
src/Makevars
- 编辑
(可能首选)或~/.R/Makevars
- 在R自己的
(以下etc/
)中编辑文件$RHOME
,或Makeconf
- “对于未发布的包”,直接编辑
src/Makevars
设置这个。没有编程方式,而且策略不鼓励您将其添加到每个包文件中,因此您无法在CRAN包中执行第三个选项。谢谢。我计划将其添加到
~/.R/Makevars
。我见过这样的配置选项,比如-fdebug-prefix-map=/build/r-base-VjHo9C/r-base-3.6.0=.
和-fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=代码>在其他人的etc/R/Makeconf
文件中。标签是特定于版本还是特定于用户?我不知道在我的计算机上哪里可以找到这个标签。我重新输入了R,现在我有了-fdebug prefix map=/build/R-base-uuRxut/R-base-3.6.1=。
在我的Makeconf文件中,我把它添加到~/.R/Makevars
。谢谢。我计划将其添加到~/.R/Makevars
。我见过这样的配置选项,比如-fdebug-prefix-map=/build/r-base-VjHo9C/r-base-3.6.0=.
和-fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=代码>在其他人的etc/R/Makeconf
文件中。标签是特定于版本还是特定于用户?我不知道在我的计算机上哪里可以找到这个标签。我重新输入了R,现在我在Makeconf文件中有了-fdebug prefix map=/build/R-base-uuRxut/R-base-3.6.1=。
,然后我将它添加到~/.R/Makevars
。我重新输入了R,现在我有了-fdebug prefix map=/build/R-base-uuRxut/R-base-3.6.1=。
在我的Makeconf
文件中,我将它添加到~/.R/Makevars
。此外,我还需要将gdb
中的源路径设置为my\R\u package/src
以定位源文件(使用gdb命令设置目录“my\R\u package/src”
)。默认源路径对我不起作用。我重新初始化了R,现在我有了-fdebug prefix map=/build/R-base-uuRxut/R-base-3.6.1=。
在我的Makeconf
文件中,我将它添加到~/.R/Makevars
。此外,我还需要将gdb
中的源路径设置为my\R\u package/src
以定位源文件(使用gdb命令设置目录“my\R\u package/src”
)。默认的源路径对我不起作用。