<div dir="ltr">@Ralf<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">I had not installed the necessary C library, so unsurprisingly the compilation step already failed. What I find interesting is that in my case "-std=gnu++11“ and "-I../inst/include/" are present in the command line options for clang++. These are also missing from what you quoted and are also a consequence of src/Makevars. It almost looks as if this file got lost on your macOS box …<br><br>Interesting....I'm not sure what to make of this of course, but it would be interesting if it was only happening on this macbook. Perhaps OS version or brew could be to blame? I'm not sure what else would be "special" about this macbook....</span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 30, 2018 at 5:33 PM, Ralf Stubner <span dir="ltr"><<a href="mailto:ralf.stubner@r-institute.com" target="_blank">ralf.stubner@r-institute.com</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>
> Am 30.04.2018 um 21:01 schrieb Evan Biederstedt <<a href="mailto:evan.biederstedt@gmail.com">evan.biederstedt@gmail.com</a>>:<br>
> @Ralf<br>
> <br>
> > You can change the used compiler for *your* system via ~/.R/Makevars, though. From my point of view that is a (short-time) workaround only. You have to figure out why clang does not like your package/library.<br>
> <br>
> I've yet to test changing the compiler in ~/.R/Makevars. However, it's not clear to me why this would be a short-term solution. Could you clarify why using g++ instead of clang would be a problem gong forwards?<br>
<br>
</span>Because clang is the default compiler for R on MacOS. So you would make it difficult for other people (let alone CRAN) to make use of the package. However, I think there is something wrong about your macOS machine. I have just tried to compile your package on a macOS machine that I have access to, and I got quite different results:<br>
<br>
$ R CMD INSTALL bambi_1.0.tar.gz <br>
<span class="">* installing to library ‘/Library/Frameworks/R.<wbr>framework/Versions/3.4/<wbr>Resources/library’<br>
* installing *source* package ‘bambi’ ...<br>
** libs<br>
</span>/usr/local/clang4/bin/clang++ -std=gnu++11 -I/Library/Frameworks/R.<wbr>framework/Resources/include -DNDEBUG -I../inst/include/ -I"/Library/Frameworks/R.<wbr>framework/Versions/3.4/<wbr>Resources/library/Rcpp/<wbr>include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o<br>
/usr/local/clang4/bin/clang++ -std=gnu++11 -I/Library/Frameworks/R.<wbr>framework/Resources/include -DNDEBUG -I../inst/include/ -I"/Library/Frameworks/R.<wbr>framework/Versions/3.4/<wbr>Resources/library/Rcpp/<wbr>include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c bambi.cpp -o bambi.o<br>
bambi.cpp:7:14: fatal error: 'bam_lmdb.h' file not found<br>
    #include "bam_lmdb.h"<br>
             ^~~~~~~~~~~~<br>
1 error generated.<br>
make: *** [bambi.o] Error 1<br>
ERROR: compilation failed for package ‘bambi’<br>
* removing ‘/Library/Frameworks/R.<wbr>framework/Versions/3.4/<wbr>Resources/library/bambi’<br>
<br>
I had not installed the necessary C library, so unsurprisingly the compilation step already failed. What I find interesting is that in my case "-std=gnu++11“ and "-I../inst/include/" are present in the command line options for clang++. These are also missing from what you quoted and are also a consequence of src/Makevars. It almost looks as if this file got lost on your macOS box …<br>
<br>
Greetings<br>
<span class="HOEnZb"><font color="#888888">Ralf<br>
<br>
</font></span></blockquote></div><br></div>