Hi Dirk I appreciate the help.
> You have the hardest possibe deployment option here it requires temporary root to make a library a system library -- and R CMD ... does not have that. I think I was able to sidestep this. After installing bamdb without 'sudo make install'/root privileges, I was able to hack the Makevars to install bambi on Linux ``` CXX_STD = CXX11 PKG_CPPFLAGS += -I../inst/include/ PKG_LIBS= -lhts -L/nfs/sw/htslib/htslib-1.7 -llmdb -L/usr/local/lib -lbamdb -L/blah/blah/bamdb/build ``` Given the R package structure, I was thinking it would be possible to link to the C library (not installed with 'sudo make install') via the `-L` flag, maybe `-L/something/src/bamdb/build` If this would work, the unsolved problem would be using the Makevars to accomplish the `cmake .. && make` step.... Does this sound crazy? On Thu, May 3, 2018 at 6:38 PM, Dirk Eddelbuettel <e...@debian.org> wrote: > > On 3 May 2018 at 16:19, Evan Biederstedt wrote: > | Working with Linux first, is it common to compile a C library (i.e. > bamdb) > | within /src, and then use extern? My understanding is that I will have to > | change the R package's Makevars to compile the C library first, and then > | link to this. > | > | If there are any examples on github which you would be able to recommend, > | that might be best. Then I can close this thread :) > > You have the hardest possibe deployment option here it requires temporary > root to make a library a system library -- and R CMD ... does not have > that. > > You need to change your plan. Using external libraries is hard. There are > no > freebies. > > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org >
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel