简体   繁体   中英

Building the R package, "later," generates undefined symbol

Updating installed packages for R-3.5.2 (in Slackware-14.2) the "later" package fails to load because of this error:

/usr/lib/R/library/later/libs/later.so: undefined symbol: __atomic_fetch_add_8,

Web searches and folks on the r-help mail list were not able to resolve this issue.

Earlier versions of "later" had no problems installing and updating.

All suggestions will be followed up.

Issue #73 on github discusses that on some platforms, one needs to add a flag -latomic even though std::atomic is part of the C++11 standard library.

Assuming you have C++11 installed on your Slackware 14.2, you should be able to:

git clone https://github.com/r-lib/later.git
nano later/src/Makevars # or whatever editor you prefer
# Change `PKG_LIBS = -pthread` to `PKG_LIBS = -pthread -latomic`
sudo R CMD INSTALL later

Update December 2019:

With the latest version of later, it now is:

git clone https://github.com/r-lib/later.git
nano later/src/Makevars.in # or whatever editor you prefer
# Change `PKG_LIBS = -pthread @extra_pkg_libs@` to `PKG_LIBS = -pthread -latomic @extra_pkg_libs@`
sudo R CMD INSTALL later

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM