<div dir="ltr">Hi Dirk <div><br></div><div>I appreciate the help.<br><br>> <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">You have the hardest possibe deployment option here it requires temporary</span><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">root to make a library a system library -- and R CMD ... does not have that.<br></span><br>I think I was able to sidestep this. <br><br>After installing bamdb without 'sudo make install'/root privileges, I was able to hack the Makevars to install bambi on Linux<br><br>```<br><div>CXX_STD = CXX11</div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">PKG_CPPFLAGS += -I../inst/include/</span><br></div><div>PKG_LIBS= -lhts -L/nfs/sw/htslib/htslib-1.7 -llmdb -L/usr/local/lib -lbamdb -L/blah/blah/bamdb/build</div>```<div><br></div><div><div>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`<br><br>If this would work, the unsolved problem would be using the Makevars to accomplish the `cmake .. && make` step....<br><br>Does this sound crazy? <br><br><br></div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 3, 2018 at 6:38 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 3 May 2018 at 16:19, Evan Biederstedt wrote:<br>
| Working with Linux first, is it common to compile a C library (i.e. bamdb)<br>
| within /src, and then use extern? My understanding is that I will have to<br>
| change the R package's Makevars to compile the C library first, and then<br>
| link to this.<br>
| <br>
| If there are any examples on github which you would be able to recommend,<br>
| that might be best. Then I can close this thread :)<br>
<br>
</span>You have the hardest possibe deployment option here it requires temporary<br>
root to make a library a system library -- and R CMD ... does not have that.<br>
<br>
You need to change your plan. Using external libraries is hard. There are no<br>
freebies.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
-- <br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
</div></div></blockquote></div><br></div>