Comments (11)
diff -urN pqR.orig/src/include/Rinternals.h pqR/src/include/Rinternals.h
--- pqR.orig/src/include/Rinternals.h 2019-02-13 22:17:53.000000000 +0100
+++ pqR/src/include/Rinternals.h 2019-02-13 22:18:57.000000000 +0100
@@ -81,8 +81,9 @@
#ifndef NEED_SGGC_FUNCTIONS
#define SGGC_NO_FUNCTIONS
-#endif
+#else
#include <R_ext/sggc-app.h>
+#endif
#define ConstExtern extern /* Used for variables defined in const-objs.c */
from pqr.
...it need a correct designation where SGGC is used:
x86_64-apple-darwin18-gcc-8.2.0 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include -I/usr/local/include -fPIC -march=haswell -pipe -s -O3 -march=native -mtune=native -ffp-contract=off -fno-stack-protector -DNDEBUG -c add_class.c -o add_class.o
In file included from add_class.c:2:
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:197:9: error: unknown type name 'sggc_cptr_t'
typedef sggc_cptr_t SEXP32;
^~~~~~~~~~~
/Library/Frameworks/R.framework/Resources/include/Rinternals.h: In function 'LOGICAL':
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:502:26: error: 'SGGC_DATA_ALIGNMENT' undeclared (first use in this function); did you mean 'DATAPTR_WITH_ALIGNMENT'?
(DATAPTR(x), SGGC_DATA_ALIGNMENT, SGGC_DATA_ALIGNMENT_OFFSET)
^~~~~~~~~~~~~~~~~~~
(...)
from pqr.
Could you tell me some details of what you're doing? I gather that this is a problem that arose when you tried to install the "xts" package. Is that right? What version of pqR were you using? The most recent stable one, pqR-2019-01-25? You seem to be on a mac, but which version of macOS are you running? Are you trying to use clang or a gcc installed from homebrew (or somewhere else?)? Are you just running bin/R from the build directory, or did you try to install pqR as the system default R, and after that use it to install xts?
I've tried pqR-2019-01-25 on an El Capitan system, using gcc-8 from homebrew, running in the build directory (not installing on the system), and had no problem installing "xts". So it's not a general pqR problem...
from pqr.
- version: pqR version 2.15.1 (2019-01-25)
- Mojave MacOS
- gcc-8.2 from MacPorts.
- R CMD INSTALL xts
xts uses Rinternals.h
https://github.com/joshuaulrich/xts/blob/master/src/add_class.c#L24
https://github.com/joshuaulrich/xts/blob/master/src/any.c#L24
If the header R_ext/sggc-app.h
is not available, we simply have an error. I noticed that CGGC is used to compress pointers (in pqR only).
from pqr.
Here you have old xts version 0.6-8:
https://github.com/joshuaulrich/xts/tree/8f75b75dbea55ad7ddc1c99056b947f41a55f53a
I'm pretty sure you'll get a error even for this old version: R_ext/sggc-app.h
header is not available in /Library/Frameworks/R.framework/Resources/include/R_ext/
.
from pqr.
From the references to /Library/Frameworks/R, I assume you must have done a "make install" to install pqR as the "system" R, and are then running it as that. Have you tried instead just running bin/R in the build directory? And just running it interactively and then typing install.packages("xts")? I'm not clear on where you've gotten the xts package from. In pqR, install.packages will get it from the pqR repository. That's what works for me.
My best guess at the moment is that the problem relates to setup for paths to find include files when pqR is installed as the system R, but I won't have time to check that out until later tonight.
from pqr.
Yes, install.packages("xts")
works from pqR build dir, but it fails from system pqR (after make install
).
> install.packages("xts")
also installing the dependency ‘zoo’
trying URL 'ftp://price.utstat.utoronto.ca/src/contrib/zoo_1.7-10.tar.gz'
ftp data connection made, file length 813020 bytes
opened URL
==================================================
downloaded 793 Kb
trying URL 'ftp://price.utstat.utoronto.ca/src/contrib/xts_0.9-4.tar.gz'
ftp data connection made, file length 459849 bytes
opened URL
==================================================
downloaded 449 Kb
* installing *source* package ‘zoo’ ...
** package ‘zoo’ successfully unpacked and MD5 sums checked
** libs
x86_64-apple-darwin18-gcc-8.2.0 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -march=haswell -pipe -s -O3 -march=native -mtune=native -ffp-contract=off -fno-stack-protector -DNDEBUG -c coredata.c -o coredata.o
In file included from coredata.c:24:
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:85:10: fatal error: R_ext/sggc-app.h: No such file or directory
#include <R_ext/sggc-app.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [coredata.o] Error 1
ERROR: compilation failed for package ‘zoo’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/zoo’
ERROR: dependency ‘zoo’ is not available for package ‘xts’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/xts’
from pqr.
My best guess at the moment is that the problem relates to setup for paths to find include files when pqR is installed as the system R
sggc headers are not installed, so CFLAGS+=-Ipath
will not help here.:
# system pqR: /Library/Frameworks/R.framework/Versions/2.15
# find /Library/Frameworks/R.framework/ -name sggc-app.h
# and in build dir:
# find . -name sggc-app.h
./pqR/src/extra/sggc/test-sggc4/sggc-app.h
./pqR/src/extra/sggc/test-sggc3/sggc-app.h
./pqR/src/extra/sggc/interp/sggc-app.h
./pqR/src/extra/sggc/test-sggc2/sggc-app.h
./pqR/src/extra/sggc/test-sggc5/sggc-app.h
./pqR/src/extra/sggc/test-sggc7/sggc-app.h
./pqR/src/extra/sggc/test-sggc6/sggc-app.h
./pqR/src/extra/sggc/test-sggc1/sggc-app.h
./pqR/src/extra/sggc/sggc-app.h
./build/include/R_ext/sggc-app.h
./build/src/include/R_ext/sggc-app.h
from pqr.
Yes, the sggc and sbset header files are not in the R_ext subdirectory for the installed version. As you may guess, I usually run pqR from the build directory, since I'm often running various different versions of both pqR and R Core implementations, and switching around is more convenient that way.
I'll need to fix "make install" to copy these files correctly to the install directory. In the meantime, it seems that the following workaround is sufficient: After doing "sudo make install", change to the include/R_ext subdirectory of the build directory, and issue the command
sudo cp sbset*.h sggc*.h /Library/Frameworks/R.framework/Headers/R_ext
After doing this, install.packages("xts") works for me. This is on a Mojave system.
Thanks for reporting this problem. Please let me know if the workaround doesn't fix it for you.
from pqr.
Of course, copying headers solves the problem.
btw. I'm surprised how little memory pqR consumes.
Thx
from pqr.
This is now fixed in a new release, pqR-2019-02-19.
from pqr.
Related Issues (20)
- What is preventing the merge of pqR into R? HOT 1
- pqR side by side with GNU-R HOT 8
- T and F don't work with mat_mult_with_BLAS configuration argument
- Docker image for pqR HOT 3
- No window version available HOT 1
- Incompatible library version HOT 3
- Will pqR code be merged to R? HOT 9
- Proposal of new feature: native 64 bit integers support HOT 2
- R/time.R - filename restricted? HOT 5
- Update formula does not work as expected HOT 6
- make error: multiple definitions HOT 6
- segfault when using attributes HOT 1
- buffer overflow when using attributes on a recursive function HOT 2
- floating point exception
- pqR aborted when using plot
- Problems with installation ubuntu 20.04 HOT 5
- Pqr and running Rstudio on mac
- Installation fails on Slackware 15.0 HOT 13
- Slow pqR loops vs R (CRAN)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pqr.