#23 ✓ resolved
Psycopg website

Unable to compile on CentOS 5.5 x86_64

Reported by Psycopg website | December 2nd, 2010 @ 05:36 PM | in release-2.3.1 (closed)

Submitted by: Jon

This is what I get when I try to compile on CentOS 5.5 x86_64:

gcc -pthread -shared build/temp.linux-x86_64-2.4/psycopg/psycopgmodule.o build/temp.linux-x86_64-2.4/psycopg/pqpath.o build/temp.linux-x86_64-2.4/psycopg/typecast.o build/temp.linux-x86_64-2.4/psycopg/microprotocols.o build/temp.linux-x86_64-2.4/psycopg/microprotocols_proto.o build/temp.linux-x86_64-2.4/psycopg/connection_type.o build/temp.linux-x86_64-2.4/psycopg/connection_int.o build/temp.linux-x86_64-2.4/psycopg/cursor_type.o build/temp.linux-x86_64-2.4/psycopg/cursor_int.o build/temp.linux-x86_64-2.4/psycopg/lobject_type.o build/temp.linux-x86_64-2.4/psycopg/lobject_int.o build/temp.linux-x86_64-2.4/psycopg/notify_type.o build/temp.linux-x86_64-2.4/psycopg/xid_type.o build/temp.linux-x86_64-2.4/psycopg/adapter_qstring.o build/temp.linux-x86_64-2.4/psycopg/adapter_pboolean.o build/temp.linux-x86_64-2.4/psycopg/adapter_binary.o build/temp.linux-x86_64-2.4/psycopg/adapter_asis.o build/temp.linux-x86_64-2.4/psycopg/adapter_list.o build/temp.linux-x86_64-2.4/psycopg/adapter_datetime.o build/temp.linux-x86_64-2.4/psycopg/adapter_pfloat.o build/temp.linux-x86_64-2.4/psycopg/adapter_pdecimal.o build/temp.linux-x86_64-2.4/psycopg/green.o build/temp.linux-x86_64-2.4/psycopg/utils.o -L/usr/lib64 -lpq -o build/lib.2.4/psycopg2/_psycopg.so
/usr/bin/ld: build/temp.linux-x86_64-2.4/psycopg/psycopgmodule.o: relocation R_X86_64_PC32 against psyco_typecast_datetime_init' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value

Comments and changes to this ticket

  • Daniele Varrazzo

    Daniele Varrazzo December 2nd, 2010 @ 08:20 PM

    • State changed from “new” to “open”
    • Milestone set to release-2.3.1
    • Tag changed from rel-2.3.0 to build, rel-2.3.0
    • Milestone order changed from “16” to “0”

    Confirm the build problem on CentOS 5.5 X86_64.

    The following preliminary patch allows the library to build

    --- psycopg/psycopgmodule.c.orig        2010-12-02 21:08:20.000000000 -0500
    +++ psycopg/psycopgmodule.c     2010-12-02 21:08:42.000000000 -0500
    @@ -48,7 +48,6 @@
     #include "psycopg/adapter_asis.h"
     #include "psycopg/adapter_list.h"
     #include "psycopg/typecast_binary.h"
    -#include "psycopg/typecast_datetime.h"
     #include <mxDateTime.h>

    Likely the #include "psycopg/typecast_mxdatetime.h" a few lines below should be dropped too if compiling with mx.DateTime support enabled.

    We will look into a better fix for the next release.

  • Daniele Varrazzo

    Daniele Varrazzo December 4th, 2010 @ 08:59 PM

    • State changed from “open” to “resolved”

    Issue fixed in release 2.3.1.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins

People watching this ticket