<div dir="ltr">Hey all, I'm trying to compile GRASS on Mac 10.13.4 so I can compile and link to the GRASS libraries. I don't need most of the GIS features, just enough to create and run my own C++ modules. I'm having some troubles with <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">grass-7.4.0</span> and <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">grass-7.4.1RC1</span>. The first problem I'm having is an error linking <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">libgrass_gis.7.4.1RC1.dylib</span>. I get this error:<br><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Undefined symbols for architecture x86_64:</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  "_libiconv", referenced from:</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">      _print_escaped_for_xml in parser_interface.o</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  "_libiconv_close", referenced from:</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">      _print_escaped_for_xml in parser_interface.o</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  "_libiconv_open", referenced from:</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">      _print_escaped_for_xml in parser_interface.o</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">ld: symbol(s) not found for architecture x86_64</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div>I can rerun the command and manually add the correct linking path for iconv, and it works. I'm not sure why it wouldn't find iconv otherwise, but it is what it is. This is the initial configure command that I'm using:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">./configure --with-opengl=aqua --with-prefix=/usr/local --enable-shared</span></p></div><div><br></div><div>I've found that I can change the configure command and fix that problem:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">./configure --with-opengl=aqua --with-libs=/usr/local/lib --with-prefix=/usr/local --enable-shared</span></p></div><div><br></div><div>However, then it progresses and returns this error while compiling many modules:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">dyld: Library not loaded: /usr/local/grass-7.4.1RC1/lib/libgrass_gis.7.4.1RC1.dylib</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  Referenced from: /usr/local/grass/grass-7.4.1RC1/dist.x86_64-apple-darwin17.5.0/bin/g.parser</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  Reason: image not found</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">make: *** [d.correlate.tmp.html] Error 1</span></p></div><div><br></div><div>The dylib looks like it's been successfully compiled at <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">dist.x86_64-apple-darwin17.5.0/lib/libgrass_gis.7.4.1RC1.dylib</span> and just the linking path for the libraries is wrong. I can't seem to shake it with any of the online GRASS compiling instructions I've found. What might cause this? Are there any current instructions for getting the shared libraries compiled and installed?</div><div><br></div><div><br></div><div>Also, I'm able to install via homebrew, but then I have this problem when compiling my modules against GRASS:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>sources/CameraOptic.cpp:33:23: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)"><b>error: </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>use of undeclared identifier 'PACKAGE'</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">    G_verbose_message(_("(%5d) Camera optical adjustment..."),</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(52,188,38)"><span style="font-variant-ligatures:no-common-ligatures"><b>                      ^</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>/usr/local/opt/grass7/grass-base/include/grass/glocale.h:10:26: note: </b>expanded from macro '_'</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#define _(str) G_gettext(PACKAGE,(str))</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>I've never seen it before and can only guess that it would be fixed by a fresh install of GRASS from source. Identical code compiles fine under Ubuntu. Does anyone know what might be causing this? Or what might I do to fix it?</div><div><br></div><div>Thanks,</div><div>Seth</div><div><br></div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"></div></div></div></div></div></div>
</div>