ropensci / redland-bindings

Redland librdf language bindings
http://librdf.org/bindings/
Other
17 stars 3 forks source link

Compiling with support for BDB, mysql, postgresql backends #61

Open cboettig opened 6 years ago

cboettig commented 6 years ago

@jeroen @gothub Any thoughts on whether it might be possible to get Redland bindings to compile with support for the --with-bdb, --with-mysql, --with-sqlite etc options for configure, if available, as described here: http://librdf.org/INSTALL.html ? I think these could be pretty useful.

Thanks!

cboettig commented 6 years ago

okay, I see that I should probably just be passing these as config.args when I call install, and then if I have the libraries installed this should just work

cboettig commented 6 years ago

hmm, I can get bdb storage to work once I've installed libdb-dev (on debian), I think this works out of the box without manually specifying the option in --configure-args. But I've had no luck with mysql, postgresql or sqlite with config args (though I believe I have the devel libraries installed). The storage constructor just tells me these aren't found. Any ideas?

cboettig commented 6 years ago

Silly me, need to rebuild the redland C library from source with the necessary optional dependencies for this to work instead of just installing librdf0-dev and compiling the R package from source (though the latter strategy is good enough to pick up BDB support).

Got this working in a docker container after custom compiles. Would still be very nice if there was a way to get a more feature-rich librdf built into the binaries for MacOS and Windows on CRAN (though sqlite might work out of the box? it seems to do so on travis even though that also uses librdf0-dev). Virtuoso support seems particularly useful.

gothub commented 6 years ago

@cboettig Is there any chance we could get the compiler settings you used incorporated into the redland build that is use for the win-32 libraries?

cboettig commented 6 years ago

Sorry, meant that I've only gotten it compiled on Debian so far (e.g. Dockerfile, or more basic version). Spoke with @jeroen a bit about this at our Vancouver meeting and he might be able to get us started on the binaries for the other cases.

jeroen commented 6 years ago

@cboettig yes you should tell us which config you used on debian and then we can try to build a similar one on windows. Is there something of a config status summary after running autogen?

cboettig commented 6 years ago

@jeroen good idea. Below are uploads of the config.status and config.log I see after building on debian. As you see in my Dockerfile recipe, I'm just going with the default configuration that autogen.sh creates after I've pre-installed the relevant dev libraries (in particular, libpq-dev, libdb-dev, libiodbc2-dev, libsqlite3-dev, libmariadbclient-dev, librdf-storage-virtuoso).

config.status.log config.log

cboettig commented 6 years ago

Just a note that I'm switching from libiodbc2-dev to unixodbc-dev, since that's what odbc package and RStudio recommend folks install on Debian. hopefully this avoids some possible incompatibilities.