On 10/27/17 08:24, Daniele Varrazzo wrote: > I have a problem building binary packages for psycopg2. Binary > packages ship with their own copies of libpq and libssl;
Aside from the advice of "don't do that" ... > however if > another python package links to libssl the library will be imported > twice with conflicting symbols, likely resulting in a segfault (see > https://github.com/psycopg/psycopg2/issues/543). This happens e.g. if > a python script both connects to postgres and opens an https resource. ... the standard solutions to this problem are symbol versioning and linker flags to avoid making all symbols globally available. libpq has symbol versioning. Maybe the libssl you are using does not. Also, for example, if you dlopen() with RTLD_LOCAL, the symbols will not be globally available, so there should be no conflicts. This needs cooperation from various different parties, and the details will likely be platform dependent. But it's generally a solved problem. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers