[GRASS-user] error compiling GRASS "checking for pj_get_def in -lproj... no"

Markus Neteler neteler at osgeo.org
Thu Sep 3 16:04:24 EDT 2009


On Thu, Sep 3, 2009 at 9:27 PM, P Kishor<punk.kish at gmail.com> wrote:
> On Thu, Sep 3, 2009 at 2:23 PM, Markus Neteler<neteler at osgeo.org> wrote:
>> On Thu, Sep 3, 2009 at 2:58 PM, P Kishor<punk.kish at gmail.com> wrote:
>>> I am trying to compile GRASS on Mac OS X. For now, configure is
>>> failing to find libproj correctly. Here is what I get
>>>
>>> punkish at Lucknow ~/Projects/grass-6.4.0RC5$ ./configure \
>>> --with-proj-includes=/usr/local/include \
>>> --with-proj-libs=/usr/local/lib \
>>> --with-proj-share=/usr/local/share/proj \
>>> ..
>>> checking for location of External PROJ.4 includes... /usr/local/include
>>> checking for proj_api.h... yes
>>> checking External PROJ.4 version... 461
>>> checking for location of External PROJ.4 library... /usr/local/lib
>>> checking for pj_get_def in -lproj... no
>>> configure: error: *** Unable to locate External PROJ.4 library.
>>
>> In config.log (at bottom) some details should be shown why the
>> pj_get_def test fails.
>>
>
>
> Thanks Markus. This is what I have
>
> punkish at Lucknow ~/Projects/grass-6.4.0RC5$tail -20 config.log
> configure:7025: checking for location of External PROJ.4 library
> configure:7050: checking for pj_get_def in -lproj
> configure:7067: gcc -o conftest -arch x86_64 -Os    -L/usr/local/lib
> -arch x86_64 -arch x86_64 conftest.c -lproj   1>&5
> ld warning: in /usr/local/lib/libproj.dylib, file is not of required
> architecture

This will be the problem: "file is not of required architecture"

I have no clue about MacOSX, though. On Linux, it would be
a 32bit/64bit mixture...

Markus


> Undefined symbols:
>  "_pj_get_def", referenced from:
>      _main in ccjErGbn.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> configure: failed program was:
> #line 7056 "configure"
> #include "confdefs.h"
> /* Override any gcc2 internal prototype to avoid an error.  */
> /* We use char because int might match the return type of a gcc2
>    builtin and then its argument prototype would still apply.  */
> char pj_get_def();
>
> int main() {
> pj_get_def()
> ; return 0; }
>
>
>
> --
> Puneet Kishor
>


More information about the grass-user mailing list