grimbough / Rhdf5lib

Distribution of the HDF5 library in an R package
https://bioconductor.org/packages/Rhdf5lib/
6 stars 14 forks source link

Rhdflib::pkgconfig("PKG_C_LIBS") double quotation trips up g++/clang #22

Closed jacobpwagner closed 4 years ago

jacobpwagner commented 4 years ago

This issue is pretty straightforward. After dbec92f4c839501a30ef8eca80212375c24884b3, Rhdflib::pkgconfig("PKG_C_LIBS") will now return a string of paths that themselves are quoted. That is, now we'll get this: '"/path/to/libhdf5.a" "/path/to/libsz.a" -lz' rather than this '/path/to/libhdf5.a /path/to/libsz.a -lz' I understand the motivation to handle paths with spaces, but nested quotation is causing issues for g++ in our package (https://github.com/RGLab/ncdfFlow/issues/49) and I suspect in another Bioconductor package, mzR, as well: https://github.com/sneumann/mzR/blob/master/src/Makevars. On our end, I can manage this by processing the string, but it seems like it may be better to implement a single consistent solution here.

jacobpwagner commented 4 years ago

To clarify, the internal quotation marks are not stripped, resulting in errors like the following:

g++: error: "/usr/local/lib/R/site-library/Rhdf5lib/lib/libhdf5.a": No such file or directory
g++: error: "/usr/local/lib/R/site-library/Rhdf5lib/lib/libsz.a": No such file or directory
jacobpwagner commented 4 years ago

Nevermind. I just updated the shell command based on what you used for rhdf5 (https://github.com/RGLab/ncdfFlow/commit/26912e172befbc79818d95f524f1dbda86ce8420). Sorry for the confusion.