Skip site navigation (1) Skip section navigation (2)

Re: wxWidgets alert at start

From: Jyrki Wahlstedt <jyrki(dot)wahlstedt(at)hut(dot)fi>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: wxWidgets alert at start
Date: 2007-08-01 11:23:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
On 1.8.2007, at 13.24, Dave Page wrote:

> Jyrki Wahlstedt wrote:
>> On 1.8.2007, at 12.31, Dave Page wrote:
>>> Can you attach gdb/xcode at that point and get a backtrace?
>> You mean something like this:
> ...
>> #17 0x00224ecb in isPgApp (app=(at)0xbffff5f4) at ./utils/misc.cpp:1090
>> #18 0x00009948 in pgAdmin3::InitPaths (this=0x18d2b990) at
>> ./pgAdmin3.cpp:766
>> #19 0x000105ea in pgAdmin3::OnInit (this=0x18d2b990) at ./ 
>> pgAdmin3.cpp:206
>> #20 0x002dfa22 in wxAppConsole::CallOnInit (this=0x18d2b990) at
>> /opt/local/include/wx-2.8/wx/app.h:76
>> #21 0x17d68a46 in wxEntry (argc=(at)0x17e60038, argv=0x18d292c0) at
>> ../src/common/init.cpp:433
>> #22 0x00007e60 in main (argc=2, argv=0xbffffc3c) at ./pgAdmin3.cpp: 
>> 104
>> after 'gdb pgAdmin3 pid'?
> Yup, exactly like that :-)
> It's dying when it checks for the PostgreSQL utilities (isPgApp()  
> runs a
> utility with the --version option to check that it's a PostgreSQL  
> util,
> and not an EDB version). In ~/Library/Preferences/pgadmin3  
> Preferences,
> do you have anything set for the PostgreSQLPath and EnterpriseDBPath
> options?
Portion of preferences:

> If so, is there a pg_dump executable in either location? What does it
> return if you run it with the --version option?
jwa(at)messiaen:MacOS> cd ../SharedSupport/helper/
jwa(at)messiaen:helper> ll
total 728
-rwxr-xr-x   2 root  admin  215632  1 Elo 12:11 pg_dump*
-rwxr-xr-x   2 root  admin   54892  1 Elo 12:11 pg_dumpall*
-rwxr-xr-x   2 root  admin   96532  1 Elo 12:11 pg_restore*
jwa(at)messiaen:helper> ./pg_dump --version
dyld: Library not loaded: @executable_path/../../Contents/Frameworks/ 
   Referenced from: /Applications/MacPorts/ 
   Reason: image not found
Trace/BPT trap

So, pg_dump exists, but doesnt return anything that makes sense (and  
it is not found anywhere else
> If those locations don't exist, it'll first look in the path for a
> pg_dump, and then in a bunch of known locations (straight from the  
> code):
The referenced library seems to exist, where it is supposed to be:
jwa(at)messiaen:Frameworks> ll
total 479752
-rwxr-xr-x   2 root  admin     454260  1 Elo 12:11 libSDL-1.2.0.dylib*
-rwxr-xr-x   2 root  admin    1394844  1 Elo 12:11 libcrypto. 
-rwxr-xr-x   2 root  admin    1053388  1 Elo 12:11 libiconv.2.dylib*
-rwxr-xr-x   2 root  admin     279152  1 Elo 12:11 libncurses.5.dylib*
-rwxr-xr-x   2 root  admin     116004  1 Elo 12:11 libpq.5.dylib*
-rwxr-xr-x   2 root  admin     452148  1 Elo 12:11 libreadline. 
-rwxr-xr-x   2 root  admin     283320  1 Elo 12:11 libssl.0.9.8.dylib*

The other pg_dump gives:
jwa(at)messiaen:Frameworks> /opt/local/lib/postgresql82/bin/pg_dump -- 
pg_dump (PostgreSQL) 8.2.4

Ok, I dug around a bit, and it seems that the use of pg_config is not  
totally proper in the configuration phase (I must admit that MacPorts  
PostgreSQL directory structure is not too simple either, but  
pg_config should be able to take care of that). Because of this I  
have made symbolic links in the build structure, but that shouldn't  
be needed, as pg_config should tell all necessary information. I  
tried to use purely pg_config, but could not configure, because no  
valid PostgreSQL installation was found. This comes from the lines in  
configure:6183: gcc -o conftest -O2 -I/opt/local/include -L/opt/local/ 
lib -L/opt/local/lib/postgresql82/lib conftest.c -lpq   >&5
/usr/bin/ld: warning -L: directory name (/opt/local/lib/postgresql82/ 
lib) does not exist
/usr/bin/ld: can't locate file for: -lpq
collect2: ld returned 1 exit status

For some reason it seems that 'lib' is attached to the directory name  
given by pg_config:
jwa(at)messiaen:pgAdmin3> pg_config --libdir
jwa(at)messiaen:pgAdmin3> ls $(pg_config --libdir)*                   libpq.a*               libpq.dylib@
bin/                  **  **            **    **             pgxs/*    **   **     ****     *
libecpg.5.2.dylib*    *
libecpg.5.dylib@      *
libecpg.a             *
libecpg.dylib@        *
libecpg_compat.a      *
libecpg_compat.dylib@ *
libpgport.a           *
libpgtypes.2.2.dylib* *
libpgtypes.2.dylib@   *
libpgtypes.a          *
libpgtypes.dylib@     *
libpq.5.0.dylib*      *
libpq.5.dylib@        *

Well, sorry for this long and confused mess, but one could say there  
is hope to find the solution.
> Regards, Dave

! Jyrki Wahlstedt
! Our life is no dream; but it ought to become one and perhaps will.
! PGP key ID: 0x139CC386 fingerprint: F355 B46F 026C B8C1 89C0  A780  
6366 EFD9 139C C386

In response to


pgadmin-hackers by date

Next:From: svnDate: 2007-08-01 12:35:00
Subject: SVN Commit by dpage: r6522 - trunk/pgadmin3
Previous:From: Dave PageDate: 2007-08-01 10:24:29
Subject: Re: wxWidgets alert at start

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group