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

Markus Neteler neteler at osgeo.org
Thu Sep 3 16:32:13 EDT 2009


On Thu, Sep 3, 2009 at 10:09 PM, P Kishor<punk.kish at gmail.com> wrote:
> On Thu, Sep 3, 2009 at 3:04 PM, Markus Neteler<neteler at osgeo.org> wrote:
>> 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 compiled PROJ.4 with the standard instructions, nothing fancy at
> all. It has worked fine with MapServer, PostGIS, GDAL and GEOS
> installations so far. GRASS is the only one choking up with the "file
> is not of required architecture" message, so I am loath to tinker with
> what works with 4 other programs just so it can possibly work with one
> other program, and possibly break the other four.
>
> could it be because I first did the following
>
> export CFLAGS="-arch x86_64 -Os"
> export CXXFLAGS="-arch x86_64 -Os"
>
> I will try again without those flags and report back.

They are apparently wrong: In you last mail I saw

../dist.i386-apple-darwin9.8.0/

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

so this applies also here: You seem tro try to build 64bit GRASS
with (partially?) 32bit libraries.

Please don't mix...

Markus


More information about the grass-user mailing list