[Libpqxx-general] pqxx::connection crash under libpqxx 2.6.9 and 3.0.0, OSX Leopard
Matthew Fanto
mfanto at gmail.com
Mon Jul 14 13:49:13 UTC 2008
On Mon, Jul 14, 2008 at 2:51 AM, Jeroen Vermeulen <jtv at xs4all.nl> wrote:
>
>
> This code should work, of course. And it does for me, even if I cause the
> connection to fail. What I don't understand is why the code seems to be
> cleaning up an iterator on the connection's map of prepared statements.
> That map is empty, and I have no idea where an iterator could have come
> from!
>
> When errors get this weird, my first guess is that there may be another
> version of libpqxx installed somewhere where the compiler, the linker, or
> the loader can find it. Or the library may be compiled with a different
> compiler version than the program.
I have verified that there are no other copies of libpqxx anywhere on the
system. The installed libraries are in /usr/local/lib. The only version of
g++ present seems to be g++ 4.0.1. Here is the output of g++ -v:
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking
-enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
>
>
>
> The other strange thing I have notices is visibility warnings, which was
>> fixed by selecting "GCC_SYMBOLS_PRIVATE_EXTERN"
>>
>
> That's interesting: I've just heard from the new Debian maintainer that a
> symbol doesn't seem to be exported from the shared library in gcc 4.3, so
> this could be the same problem. Does Xcode 3.0 use gcc 4.3?
>
>
> Jeroen
>
The visibility issues also included the ~connect_direct destructor. I will
need to rebuild things to get those warnings to show again, which I can do
if you would like (or if that could be the cause of this).
I will try and clean every copy of libpqxx and install again. The strange
thing is this just happens within Xcode within my project, not with the test
programs. I'm sure it's a linking issue, but it's strange that even
specifying /usr/local/lib/libpqxx.a directly causes this crash.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/libpqxx-general/attachments/20080714/93f27f0a/attachment.html
More information about the Libpqxx-general
mailing list