Skip to content

Rcpp 1.1.1 could not be installed on FreeBSD #1442

@jszhao

Description

@jszhao

I have R 4.5.2 installed on FreeBSD 15.0, and when I install Rcpp 1.1.1 using C++ compiler: ‘FreeBSD clang version 19.1.7, it gives the following error message:

/opt/R/library/00LOCK-Rcpp/00new/Rcpp/libs/Rcpp.so: Undefined symbol "backtrace"

If I install Rcpp 1.1.1 using C++ compiler: ‘g++14 (FreeBSD Ports Collection) 14.2.0’, it gives the following error message:

/opt/R/library/00LOCK-Rcpp/00new/Rcpp/libs/Rcpp.so: Undefined symbol "backtrace_symbols"

It seems that the configure of Rcpp 1.1.1 does not find libexecinfo, which is a system library, and provides the backtrace library on FreeBSD system. So on the FreeBSD system, I have to install Rcpp 1.1.1 in R with

Sys.setenv("PKG_LIBS" = "-lexecinfo")
install.packages("Rcpp")

I also installed libbacktrace package, however, I could not make Rcpp to link the libbacktrace.so in /usr/local/lib

> sessionInfo()
R version 4.5.2 (2025-10-31)
Platform: amd64-portbld-freebsd15.0
Running under: FreeBSD pc 15.0-RELEASE-p1 FreeBSD 15.0-RELEASE-p1 releng/15.0-n280999-7bceec30b351 GENERIC amd64

Matrix products: default
LAPACK: /usr/local/lib/R/lib/libRlapack.so;  LAPACK version 3.12.1

locale:
[1] C.UTF-8/C.UTF-8/C.UTF-8/C/C.UTF-8/C.UTF-8

time zone: Asia/Chongqing
tzcode source: system (FreeBSD)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.5.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions