<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">When various applications are split into modules (RHEL/CentOS environment-modules package), such that<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> module load R proj gdal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">is needed to make those applications and their pkg-config files available, the R<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> install.packages(‘rgdal’)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">fails because it assumes proj and gdal are in the same place, and omits the -L… link option for proj’s library path.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">An easy workaround until this is fixed is<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> export proj_lib_path=`pkg-config proj --libs | awk '{print $1}'`<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">before you start R, then “install.packages(‘rgdal’)” works as expected.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The author of the package is working on a real fix, so this workaround may not be needed for long.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Ric<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-- <o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="color:black">Ric Anderson</span></b><span style="color:black">| <b>Systems Administrator</b> <img width="15" height="15" style="width:.1562in;height:.1562in" id="Picture_x0020_2" src="cid:image001.png@01D58B12.853653E0" alt="Description: Description: Description: Description: Description: Description: Description: http://redbar.web.arizona.edu/logos/images/thumb_pawprints.gif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Research And Discovery Tech | HPC Large Systems Support</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">XSEDE Campus Champion</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><u><span style="font-size:11.0pt;color:black"><a href="mailto:Ric@email.arizona.edu"><span style="color:#0563C1">ric@email.arizona.edu</span></a> </span></u><u><span style="font-size:11.0pt;color:#AFABAB">(V): +1-520-626-1642</span></u><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black"><img border="0" width="160" height="39" style="width:1.6666in;height:.4062in" id="Picture_x0020_1" src="cid:image002.png@01D58B12.853653E0" alt="cid:image005.png@01D01593.CF7DFA60"></span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>