[Qgis-user] Postgres dependency on mac build

William Kyngesburye woklist at kyngchaos.com
Sun Apr 20 12:12:52 PDT 2008


Qgis won't be 64bit on OSX until Qt is 64bit.  Currently Qt depends on  
Carbon (which is 32bit-only), but there is work to shift away from  
Carbon in Qt 4.4.

On Apr 20, 2008, at 1:59 PM, John Abraham wrote:

> Looks like that might have done it, thanks.  -D POSTGRES_CONFIG=/usr/ 
> local/pgsql/bin/pg_config to cmake.
>
> I'm off an running.  Looks like it's not 64bit.  Is it  
> multithreaded?  I have a new Mac Pro.
>
> --
> John
>
>
> On 20-Apr-08, at 12:21 PM, William Kyngesburye wrote:
>
>> Puzzling why it's not finding Postgres without any options.
>>
>> But, the CONFIG option should point to a file (pg_config), not a  
>> folder. (Same goes for library options, but not for include dir  
>> options)
>>
>> I've noticed that the "Found ..." feedback is not always correct,  
>> or you just have to read more into what it says.  Like your  
>> Postgres response: it says "it's a directory", which can mean "it's  
>> not supposed to be a directory".
>>
>> Also, when reconfiguring, make sure to clean first, or it may  
>> remember the previous configuration.  Cleaning is not thorough in  
>> cmake, so the easiest way is to build outside the source.  ie:
>>
>> in the qgis source dir,
>>
>> mkdir build-osx
>> cd build-osx
>> cmake [your options] ..
>>
>> (note the .. instead of . for the source dir option)  Then you can  
>> just trash the contents on build-osx to clean, before reconfiguring.
>>
>> On Apr 20, 2008, at 12:58 PM, John Abraham wrote:
>>
>>> Thanks for the hint.  I can't see a difference (svn diff) between  
>>> the two cmake directories.
>>>
>>> I tried deleting my build directory, and redoing the cmake command  
>>> with -D POSTGRES_CONFIG=/usr/local/pgsql/  and it responded
>>>
>>> -- Found PostgreSQL: sh: /usr/local/pgsql: is a directory/ 
>>> libpq.dylib
>>>
>>> but then I got the same error (below) when I ran make :(
>>>
>>> --
>>> John
>>>
>>> [ 43%] Building CXX object src/app/CMakeFiles/qgis.dir/qgisapp.o
>>> In file included from /Users/jabraham/Development/qgis/src/src/app/ 
>>> qgisapp.cpp:168:
>>> /Users/jabraham/Development/qgis/src/src/app/qgsdbsourceselect.h: 
>>> 27:22: error: libpq-fe.h: No such file or directory
>>> /Users/jabraham/Development/qgis/src/src/app/qgsdbsourceselect.h: 
>>> 112: error: ‘PGconn’ has not been declared
>>> /Users/jabraham/Development/qgis/src/src/app/qgsdbsourceselect.h: 
>>> 118: error: ‘PGconn’ has not been declared
>>> /Users/jabraham/Development/qgis/src/src/app/qgsdbsourceselect.h: 
>>> 141: error: ISO C++ forbids declaration of ‘PGconn’ with no type
>>> /Users/jabraham/Development/qgis/src/src/app/qgsdbsourceselect.h: 
>>> 141: error: expected ‘;’ before ‘*’ token
>>> make[2]: *** [src/app/CMakeFiles/qgis.dir/qgisapp.o] Error 1
>>> make[1]: *** [src/app/CMakeFiles/qgis.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>> On 20-Apr-08, at 10:34 AM, William Kyngesburye wrote:
>>>
>>>> I think there was a fix for this recently in trunk, and maybe  
>>>> it's not in the diagram branch.  The release tag works fine.  You  
>>>> could try grabbing cmake/FindPostgres.cmake from trunk to replace  
>>>> what you have in the diagram branch.
>>>>
>>>> On Apr 20, 2008, at 11:03 AM, John Abraham wrote:
>>>>
>>>>> I'm trying to build the "diagram" branch on MacOSX Leopard.  I  
>>>>> followed the instructions in the docs, and did get it compiled  
>>>>> and running.  I'm pretty proud of myself since I haven't  
>>>>> programmed in C for a decade or so (java programmer now.)
>>>>>
>>>>> Except there is one problem.  The Postgres stuff wasn't found by  
>>>>> cmake, so there was no Postgis support in my build.
>>>>>
>>>>> So I tried to set up cmake to find my postgres.  I found the  
>>>>> file FindPostgres.cmake and found that it uses environment  
>>>>> variables, so tried to set those using -D options to cmake.  Now  
>>>>> it won't compile at all, with the following error.  I do have a  
>>>>> libpq-fe.h in /usr/local/pgsql/include.  I didn't make Postgres  
>>>>> from source, just installed it.
>>>>>
>>>>> Thanks for any help,
>>>>> --
>>>>> John Abraham
>>>>> jabraham at ucalgary.ca
>>>>
>>>> -----
>>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>>> http://www.kyngchaos.com/
>>>>
>>>> Earth: "Mostly harmless"
>>>>
>>>> - revised entry in the HitchHiker's Guide to the Galaxy
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>>
>> "We are at war with them. Neither in hatred nor revenge and with no  
>> particular pleasure I shall kill every ___ I can until the war is  
>> over. That is my duty."
>>
>> "Don't you even hate 'em?"
>>
>> "What good would it do if I did? If all the many millions of people  
>> of the allied nations devoted an entire year exclusively to hating  
>> the ____ it wouldn't kill one ___ nor shorten the war one day."
>>
>> <Ha, ha> "And it might give 'em all stomach ulcers."
>>
>> - Tarzan, on war
>>
>>
>

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the  
past isn't a fiction designed to account for the discrepancy between  
my immediate physical sensations and my state of mind?"

- The Ruler of the Universe





More information about the Qgis-user mailing list