[Libpqxx-general] pqxx::connection crash under libpqxx 2.6.9 and 3.0.0, OSX Leopard

Jeroen Vermeulen jtv at xs4all.nl
Mon Jul 14 19:16:59 UTC 2008


Matthew Fanto wrote:
> 
> So I just discovered something interesting. If I build the project in 
> Release mode, it works fine and I am able to create the connection 
> object. If it is Debug mode, I still get the same crash. Here are the 
> visibility warnings I am seeing:
> 
> Do I need to also build the libpq libraries in a Debug flavor? Or 
> libpqxx and specify different libraries for Debug/Release? Release gives 
> about 7 other visibility warnings, different then the ones below. 

Release and Debug mode?  I don't know what it means in terms of the 
actual underlying gcc, but if it's anything like the modes in Visual C++ 
then yes, you'd probably need to build everything the same way.


> There are no project specific differences between debug and release. 
> Meaning, I do not have GCC options enabled in one and not the other 
> (other than was Xcode uses by default). 
> 
> /ld: warning pqxx::connect_direct::~connect_direct()has different 
> visibility (2) in 
> /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libpqxx.a(connection.o) and 
> (1) in /Users/mfanto/Programming/test_project/XCode 
> Project/build/test_project.build/Debug/test_project.build/Objects-normal/i386/sql.o/
> 
> /ld: warning __ZN4pqxx14connect_directD1Ev.eh has different visibility 
> (2) in 
> /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libpqxx.a(connection.o) and 
> (1) in /Users/mfanto/Programming/test_project/XCode 
> Project/build/test_project.build/Debug/test_project.build/Objects-normal/i386/sql.o/

Oh, that looks pretty harmless: the compiler is generating an implicit 
destructor for connect_direct in your object file, and that one has 
different visibility than the one in the libpqxx header.  At least 
that's how I read this.  I don't have much hope that it reveals anything 
about the problem.


Jeroen



More information about the Libpqxx-general mailing list