Giter Site home page Giter Site logo

Comments (11)

dcegielka avatar dcegielka commented on July 23, 2024
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.

dcegielka avatar dcegielka commented on July 23, 2024

...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.

radfordneal avatar radfordneal commented on July 23, 2024

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.

dcegielka avatar dcegielka commented on July 23, 2024
  1. version: pqR version 2.15.1 (2019-01-25)
  2. Mojave MacOS
  3. gcc-8.2 from MacPorts.
  4. 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.

dcegielka avatar dcegielka commented on July 23, 2024

Here you have old xts version 0.6-8:

https://github.com/joshuaulrich/xts/tree/8f75b75dbea55ad7ddc1c99056b947f41a55f53a

https://github.com/joshuaulrich/xts/blob/8f75b75dbea55ad7ddc1c99056b947f41a55f53a/src/add_class.c#L24

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.

radfordneal avatar radfordneal commented on July 23, 2024

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.

dcegielka avatar dcegielka commented on July 23, 2024

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.

dcegielka avatar dcegielka commented on July 23, 2024

@radfordneal

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.

radfordneal avatar radfordneal commented on July 23, 2024

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.

dcegielka avatar dcegielka commented on July 23, 2024

Of course, copying headers solves the problem.
btw. I'm surprised how little memory pqR consumes.
Thx

from pqr.

radfordneal avatar radfordneal commented on July 23, 2024

This is now fixed in a new release, pqR-2019-02-19.

from pqr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.