PgAdmin3 on OSX 10.4.1 w/ gcc4 - Mailing list pgadmin-hackers

From OpenMacNews
Subject PgAdmin3 on OSX 10.4.1 w/ gcc4
Date
Msg-id 5D535CC12DC6E5C88FCB44FC@tiedgar
Whole thread Raw
List pgadmin-hackers
hi all,

well this took awhile (not including getting trapped in Yosemite flooding ...);
userland Tiger is problem free (4 me), but DEV-space is a whole other issue ...
lots of little prereq issues.  sigh.

anyway, short story:  PGADMIN3 builds ok as a OSX 10.4.1 appbundle using gcc
4.0.  oe little 'gotcha' i the configure stmt kept me busy for awhile (see
below).

but, now i have a dubl-clikable executable (again) ...


here are my details:


my ENV:

    Mac OSX 10.4.1
    TclTkAquaBI-8.4.9.1.dmg
    Berkeley-DB v4.3.28 w/ strong crypto
    % perl -V
        Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
          Platform:
            osname=darwin, osvers=8.1.0, archname=darwin-thread-multi-2level
            uname='darwin devbox 8.1.0 darwin kernel version 8.1.0: tue may 10 18:16:08
pdt 2005; root:xnu-792.1.5.obj~4release_ppc power macintosh powerpc '

        Characteristics of this binary (from libperl):
          Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
          Built under darwin
          Compiled at May 18 2005 22:18:53
    %gcc --version
        powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc.
build 4061)
    % glibtool --version
        ltmain.sh (GNU libtool) 1.5.18 (1.1220.2.245 2005/05/16 08:55:27)
    % automake --version
        automake (GNU automake) 1.9.5
    % autoconf --version
        autoconf (GNU Autoconf) 2.59
    % openssl version
        OpenSSL 0.9.7g 11 Apr 2005
    % postmaster --version
        postmaster (PostgreSQL) 8.0.3

and, libreadline (v5.0) picked up from my external build:
    -r-xr-xr-x  1 root staff 416616 May 18 11:12
/usr/local/lib/libreadline.5.0.dylib
    lrwxr-xr-x  1 root staff     21 May 18 11:12 /usr/local/lib/libreadline.dylib
-> libreadline.5.0.dylib

rather than from Tiger's native link to libedit:
    lrwxr-xr-x  1 root wheel 13 May 10 09:40 /usr/lib/libreadline.dylib ->
libedit.dylib


building a SHARED wxwidgets from cvs:

    % login devbox (<-- NON-root user)
    % cd /usr/ports/wxwidgets

    @ 5/20/05 09:56:18

    % cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
    % password: anoncvs
    % cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets co -d
wxwidgets_cvs_dyn wxWidgets

    % sudo chown -R devbox:wheel /usr/ports/wxwidgets

    % mkdir -p /usr/ports/wxwidgets/wxwidgets_cvs_dyn/macosx-build
    % cd /usr/ports/wxwidgets/wxWidgets_cvs_dyn/macosx-build

    % unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL
LANG LINGUAS

    % ../configure \
    --prefix=/usr/local/wxwidgets_cvs_dyn \
    --with-mac \
    --enable-shared \
    --disable-debug \
    --enable-unicode \
    --enable-intl \
    --with-regex

    % make
    % sudo make install

    % cd /usr/ports/wxwidgets/wxwidgets_cvs_dyn/macosx-build/contrib/src/stc
    % make
    % sudo make install

    % cd /usr/ports/wxwidgets/wxwidgets_cvs_dyn/macosx-build/contrib/src/ogl
    % make
    % sudo make install

    % cd /usr/ports/wxwidgets/wxwidgets_cvs_dyn/macosx-build/contrib/src/gizmos
    % make
    % sudo make install

successfully results in:

    % /usr/local/wxwidgets_cvs_dyn/bin/wx-config --list
        Default config is mac-unicode-release-static-2.6

    % otool -L /usr/local/wxwidgets_cvs_dyn/bin/wxrc-2.6
        wxrc-2.6:
                /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 47.0.0)
                /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility
version 1.0.0, current version 271.0.0)
                /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 128.0.0)
                /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility
version 1.0.0, current version 11.0.0)
                /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
88.0.0)
                /usr/local/wxwidgets_cvs_dyn/lib/libwx_base_carbonu_xml-2.6.0.dylib
(compatibility version 2.6.0, current version 2.6.0)
                /usr/local/lib/libexpat.0.dylib (compatibility version 6.0.0, current
version 6.0.0)
                /usr/local/wxwidgets_cvs_dyn/lib/libwx_base_carbonu-2.6.0.dylib
(compatibility version 2.6.0, current version 2.6.0)
                /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.2)
                /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version
5.0.0)
                /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
7.3.0)
                /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
                /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)


moving on to build pgadminIII

    % login root

    % cd /usr/ports/pgadmin3
    % svn co svn://svn.pgadmin.org/trunk/pgadmin3 pgadmin3dyn_wxdyn
        Checked out revision 4229.

    % chown -R devbox:admin /usr/ports/pgadmin3


    % unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL
LANG LINGUAS
    % setenv CFLAGS "-no-cpp-precomp"
    % setenv CPPFLAGS "-I/usr/local/ssl/include"
    % setenv LDFLAGS "-ldl -L/usr/local/ssl/lib -lssl -lcrypto -L/usr/local/lib
-lexpat -lpng -ljpeg -ltiff -lintl -lgettextlib -lz"

    % cd /usr/ports/pgadmin3/pgadmin3dyn_wxdyn
    % sh bootstrap

    % ./configure \
    --enable-appbundle \
    --with-wx=/usr/local/wxwidgets_cvs_dyn \
    --with-wx-config=wx-config \
    --with-pgsql=/usr/local/pgsql \
    --with-pgsql-include=/usr/local/pgsql/include \
    --disable-debug

    % make all
    % make install

all OK!

###########################
## NOTE:
#
i simply stumbled on to this one ...
for 'make' to work, you MUST NOT include '--enable-static' or
'--disable-static' in the configure statement.  if you DO, make WILL fail with
LOTS of UDEFINED SYMBOL errors re: wxWidgets ... i have NOT tracked down WHY
this happes as yet ...


now, checking:


    % ls -al
/usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3
        -rwxr-xr-x  1 root admin 98022312 May 21 11:00
/usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3

it's THERE, and it executes properly (yay!), but STILL not properly stripped
... so,

    % strip
/usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3

then,

    % ls -alls -al
/usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3
        -rwxr-xr-x  1 root admin 3534828 May 21 11:20
/usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3

and,

% otool -L
/usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3
    /usr/ports/pgadmin3/pgadmin3dyn_wxdyn/pgAdmin3.app/Contents/MacOS/pgAdmin3:
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
88.0.0)
            @executable_path/../Frameworks/libssl.0.9.7.dylib (compatibility version
0.9.0, current version 0.9.7)
            @executable_path/../Frameworks/libcrypto.0.9.7.dylib (compatibility version
0.9.0, current version 0.9.7)
            @executable_path/../Frameworks/libexpat.0.dylib (compatibility version
6.0.0, current version 6.0.0)
            @executable_path/../Frameworks/libpng.3.dylib (compatibility version 3.0.0,
current version 3.0.0)
            @executable_path/../Frameworks/libjpeg.62.dylib (compatibility version
63.0.0, current version 63.0.0)
            @executable_path/../Frameworks/libtiff.3.dylib (compatibility version
11.0.0, current version 11.2.0)
            @executable_path/../Frameworks/libintl.3.dylib (compatibility version 8.0.0,
current version 8.3.0)
            @executable_path/../Frameworks/libgettextlib-0.14.4.dylib (compatibility
version 0.0.0, current version 0.0.0)
            /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.2)
            @executable_path/../Frameworks/libpq.4.dylib (compatibility version 4.0.0,
current version 4.0.0)
            /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 47.0.0)
            /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility
version 1.0.0, current version 271.0.0)
            /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility
version 2.0.0, current version 128.0.0)
            /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility
version 1.0.0, current version 11.0.0)
            @executable_path/../Frameworks/libwx_macu_xrc-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_macu_qa-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_macu_html-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_macu_adv-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_macu_core-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_base_carbonu_xml-2.6.0.dylib
(compatibility version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_base_carbonu_net-2.6.0.dylib
(compatibility version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_base_carbonu-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_macu_stc-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            @executable_path/../Frameworks/libwx_macu_ogl-2.6.0.dylib (compatibility
version 2.6.0, current version 2.6.0)
            /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version
7.3.0)
            /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
            /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)


HTH, and feel free to ask any Q's as needed!

cheers,

richard

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r4229 - in trunk/pgadmin3/xtra/pgagent: . include
Next
From: Raphaël Enrici
Date:
Subject: pgAgent usage string should be reviewed