This project is archived and is in readonly mode.

#127 ✓resolved
Psycopg website

psycopg2 extension fails to compile with clang

Reported by Psycopg website | September 19th, 2012 @ 03:57 PM

Submitted by: Bradley Saulteaux

building 'psycopg2._psycopg' extension

clang -march=corei7-avx -O3 -ffast-math -fPIC -Wimplicit -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.5 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090200 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/usr/local/include/pypy1.9 -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.freebsd-9.0-RELEASE-amd64-2.7/psycopg/psycopgmodule.o

In file included from psycopg/psycopgmodule.c:27:

In file included from ./psycopg/psycopg.h:33:

./psycopg/config.h:146:15: error: static declaration of 'round' follows non-static declaration

static double round(double num)


/usr/include/math.h:273:8: note: previous declaration is here

double round(double);


psycopg/psycopgmodule.c:544:37: warning: incompatible pointer types passing 'PyTypeObject ' (aka 'struct _typeobject ') to parameter of type 'PyObject ' (aka 'struct _object ') [-Wincompatible-pointer-types]

if (!(descr = PyDescr_NewMethod((PyTypeObject *)Error,


/usr/local/include/pypy1.9/pypy_decl.h:70:52: note: passing argument to parameter 'arg0' here

PyAPI_FUNC(PyObject ) PyDescr_NewMethod(PyObject arg0, PyMethodDef *arg1);


1 warning and 1 error generated.

error: command 'clang' failed with exit status 1

Comments and changes to this ticket

Create your profile

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

<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="">the new tracker</a>.
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