[users] Bug in libpqxx (related to visibility)

Dries Verachtert dries at ulyssis.org
Tue Apr 7 22:56:49 CEST 2009


On Tue, Apr 7, 2009 at 3:58 AM, Filipe Brandenburger
<filbranden at gmail.com>wrote:

> Hello,
>
> I am migrating some programs that use libpqxx from CentOS 4 to CentOS
> 5, and I found an issue with libpqxx-2.6.9 from RPMforge.
>
> I built a Python module that uses the library. However, in Python 5,
> when I try to load it, I get this error:
>
> ImportError: libxxx.so: undefined symbol:
> _ZN4pqxx8internal19freemem_result_dataEPNS0_11result_dataE
>
> I rebuilt the RPM, and I traced the issue to the warnings I get when
> building the library:
>
> ../include/pqxx/result.hxx:63: warning: lowering visibility of 'void
> pqxx::internal::freemem_result_data(pqxx::internal::result_data*)' to
> match its type
>
> And more, I saw that the RPM removes the -Werror that the library uses
> to build by default (which prevents the library from building cleanly
> under CentOS 5).
>
> Googling for the error message, I found that it was a "feature"
> introduced in GCC 4.1 that ships with CentOS 5, and that it was
> actually retracted in later versions, however the issue is still
> present in CentOS 5 (even in 5.3):
> http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00919.html
>
> I compared the code with the includes in libpqxx-3.0, and I saw that
> there they explicitely set the visibility.
>
> So I came up with a patch that actually fixes the issue. I'm pasting it
> here:
>

Thanks for the patch! I've added it to the rpmforge subversion.

kind regards,
Dries
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.repoforge.org/pipermail/users/attachments/20090407/a201621a/attachment-0004.html>


More information about the users mailing list