-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenBSD: undefined symbol '_tthread_timespec_get' #115
Comments
It looks like this is how it gets defined. If
In short:
Also note that tinycthread itself is C code, and compiled with Now, as for OpenBSD, it looks like there was a recent change to time.h, where it defines #if __ISO_C_VISIBLE >= 2011
#define TIME_UTC 1 /* time elapsed since epoch */
int timespec_get(struct timespec *_ts, int _base);
#endif I suspect that what's happening is that when later's C++ code is compiled, It looks like So to summarize: I believe the link error is happening because the C++ code is being compiled with one C standard, and the C code is being compiled with a different C standard. If I'm right, compiling the C++ code with It's possible that if you create a personal ~/.R/Makevars file, one or more of the following lines will make it work:
|
Hello, I also have this issue on OpenBSD 6.6 with a clean R install. I added the lines suggested above to the ~/.R/Makevars file with no difference unfortunately:
session info below:
Though based off the output
it doesn't see like it's actually respecting those set compiler flags? I even tried off the R installation and administration manual setting the |
@tmward I see it's trying to install to /usr/local/lib/R/library/00LOCK-later/00new/later/libs. Are you installing as root? You may need to make sure the |
@wch I'm installing as a user but have made those directories readable/writeable by my user. The install fails with the same error if I also use my home directory for the R packages. (The reason I installed in /usr/local (which is what R defaults to for OpenBSD), is that /usr/local is the only file mount that allows for processes to ask for writeable and executable and wanted to be sure this was not contributing to the problem). I checked |
I'm at a loss about why it's not reading your Makevars file. Maybe ask on StackOverflow? |
I was able to install under openbsd with these makevars (thanks to @wch and this thread):
You can find default values in |
Changing my Makevars to what @semio listed worked perfect. Thanks everyone for the help. |
A follow-up: it looks like with C, However, with C++, So OpenBSD 6.6 appears to be doing things according to spec, thought it's the only platform we've heard about that is this strict about |
Let me know if I should open a new Issue I'm facing a similar problem installing on Termux on a Chromebook. The suggested fixes (edit Makeconf) don't seem to be working when even installing the latest dev version
|
@ChiWPak Yes, please open a new issue. If you're familiar with Docker, it would help if you could supply a Dockerfile that produces the issue. I think you may be able to base it off of this: https://github.com/xeffyr/termux-docker |
Sorry for the late response. Thanks @wch, I'll start a new issue and try to figure out Docker. |
…_UTC, otherwise by default uses CXX11. Fixes r-lib#115
I recently upgraded from OpenBSD 6.5 to 6.6, which also triggered an upgrade from R 3.5.3 to 3.6.1. Starting with a clean Rlibs, I am unable to install (compile) later, which throws an error about an undefined symbol, _tthread_timespec_get. Online references to this symbol are minimal. All output is below. Otherwise, R was working fine on OpenBSD 6.3-6.5. Please advise on a fix.
** package ‘later’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c RcppExports.cpp -o RcppExports.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c callback_registry.cpp -o callback_registry.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c debug.cpp -o debug.o
cc -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c init.c -o init.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c later.cpp -o later.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c later_posix.cpp -o later_posix.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c later_win32.cpp -o later_win32.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c timer_posix.cpp -o timer_posix.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c timestamp_unix.cpp -o timestamp_unix.o
c++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c timestamp_win32.cpp -o timestamp_win32.o
cc -I"/usr/local/lib/R/include" -DNDEBUG -pthread -DSTRICT_R_HEADERS -I"/home/sbaig14/Documents/local/share/Rlibs/Rcpp/include" -I"/home/sbaig14/Documents/local/share/Rlibs/BH/include" -I/usr/local/include -fpic -O2 -pipe -c tinycthread.c -o tinycthread.o
c++ -std=gnu++11 -shared -L/usr/local/lib/R/lib -L/usr/local/lib -Wl,-R/usr/local/lib/R/lib -o later.so RcppExports.o callback_registry.o debug.o init.o later.o later_posix.o later_win32.o timer_posix.o timestamp_unix.o timestamp_win32.o tinycthread.o -pthread -L/usr/local/lib/R/lib -lR
installing to /home/sbaig14/Documents/local/share/Rlibs/00LOCK-later/00new/later/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
R:/home/sbaig14/Documents/local/share/Rlibs/00LOCK-later/00new/later/libs/later.so: undefined symbol '_tthread_timespec_get'
Error: package or namespace load failed for ‘later’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/sbaig14/Documents/local/share/Rlibs/00LOCK-later/00new/later/libs/later.so':
Cannot load specified object
Error: loading failed
Execution halted
ERROR: loading failed
The downloaded source packages are in
‘/tmp/Rtmpz4Nqfe/downloaded_packages’
Warning message:
In install.packages("later") :
installation of package ‘later’ had non-zero exit status
The text was updated successfully, but these errors were encountered: