rgonomic / rgo

R/Go integration
BSD 3-Clause "New" or "Revised" License
52 stars 3 forks source link

sexp: remove package #14

Closed kortschak closed 2 years ago

kortschak commented 2 years ago

This package was broken by the removal of undocumented API headers in the R distribution. Sadly this greatly diminishes the value of rgo since the performance of the documented approach requiring interchange via Cgo is significantly worse than the direct memory access that this package provided. It also great reduces the flexibility of operations that could be performed using rgo.

The change that breaks this is git-svn-id: https://svn.r-project.org/R/trunk@80644 00db46b3-68df-0310-9c12-caf00c1e9a41.

kortschak commented 2 years ago

Well. It looks like STDVEC_LENGTH is also not available. I may look into fixing this.

* installing *source* package ‘cca’ ...
** using staged installation
** libs
rm -f *.h
CGO_CFLAGS="-I"/usr/share/R/include" -DNDEBUG    " CGO_LDFLAGS="  -L"/usr/lib/R/lib" -lR" go build -o cca.so -buildmode=c-shared ./rgo
# github.com/rgonomic/rgo/examples/cca/src/rgo
/tmp/go-build3703019544/b001/_x003.o: In function `R_gostring':
cca.c:(.text+0x81): undefined reference to `STDVEC_LENGTH'
collect2: error: ld returned 1 exit status
# github.com/rgonomic/rgo/examples/cca/src/rgo
cca.c: In function ‘R_gostring’:
cca.c:17:33: warning: implicit declaration of function ‘STDVEC_LENGTH’; did you mean ‘SETLENGTH’? [-Wimplicit-function-declaration]
  GoString s = {(char*)CHAR(_s), STDVEC_LENGTH(_s)};
                                 ^~~~~~~~~~~~~
                                 SETLENGTH
Makevars:13: recipe for target 'go' failed
make: *** [go] Error 2
ERROR: compilation failed for package ‘cca’
* removing ‘/home/daniel/src/github.com/rgonomic/rgo/examples/cca.Rcheck/cca’