Re: compiling pgadmin on OS X

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Frank McGeough <fmcgeough(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: compiling pgadmin on OS X
Date: 2013-09-25 13:17:25
Message-ID: CA+OCxoz+5hp5DKYrYd58Sb2CJ1smQja2=HJM-YHuQr1F-E2WxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Wed, Sep 25, 2013 at 2:07 PM, Frank McGeough <fmcgeough(at)gmail(dot)com> wrote:
> Looking for suggestions on how to proceed.
>
> I've begun the process of compiling pgadmin on OS X (in this case its 10.7.5). It does seem to be problematic to compile this code on this platform. Currently I'm stuck on wxWidgets.
>
> wxWidgets 2.8.x requires the 10.6 SDK. Apple doesn't provide separate installs of their SDK. The SDK's are bundled with their XCode installs. The 10.6 SDK is in 3.2.6 installer. I downloaded this from Apple's dev web site and manually extracted the SDK and copied into the new XCode location (under /Applications). I could then compile wxWidgets and their demos and samples using configure like this :
>
> arch_flags="-arch i386"
> ./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-unicode --enable-debug --disable-shared --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6
>
> The pgadmin/INSTALL doc suggests to configure wxWidgets like this :
>
> ./configure --with-mac --enable-gtk2 --enable-unicode
>
> This definitely doesn't work on this platform. It yields :
>
> ./src/common/intl.cpp:2060: error: ‘smScriptLang’ was not declared in this scope
> ./src/common/intl.cpp:2060: error: ‘GetScriptVariable’ was not declared in this scope
>
> the arch_flags needs to be used or it does a 64-bit compile and gets that error. This is referenced in the wxWidgets web site : http://wiki.wxwidgets.org/Development:_wxMac (under Building under 10.6 Snow Leopard).
>
> I passed in the following to configure :
>
> ./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --with-mac --enable-gtk2 --enable-unicode --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6
>
> This gets wxWidgets to compile OK but yields the following when trying to make pgadmin3.

I use the attached script usually - that gets me a complete set of
wxWidgets builds so I can test static vs. dynamic and debug vs.
release. It should also avoid most causes of the error below.

> configure: error: Your wxWidgets installation cannot support pgAdmin in the selected configuration. This may be because it was configured without the --enable-unicode option, or the combination of dynamic/static linking and debug/non-debug libraries selected did not match any installed wxWidgets libraries.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
build-wxmac application/octet-stream 1.9 KB

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2013-09-25 14:20:20 Re: Slony Issue Fix in pgAdmin
Previous Message Frank McGeough 2013-09-25 13:07:43 compiling pgadmin on OS X