[root@sigma /usr/local/downloads/psycopg2-2.4.6]# python setup.py build
running build
running build_py
creating build
creating build/lib.freebsd-9.1-RELEASE-amd64-2.7
creating build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/tz.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/pool.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/extras.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/extensions.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/__init__.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/psycopg1.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
copying lib/errorcodes.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2
creating build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/dbapi20.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_async.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/testconfig.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_quote.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_transaction.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_cancel.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_dates.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_lobject.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_copy.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_module.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/__init__.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_green.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/testutils.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_cursor.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_connection.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_notify.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.freebsd-9.1-RELEASE-amd64-2.7/psycopg2/tests
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.freebsd-9.1-RELEASE-amd64-2.7
creating build/temp.freebsd-9.1-RELEASE-amd64-2.7/psycopg
cc -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -DNDEBUG -O2 -pipe -fno-strict-aliasing -I/usr/local/include/pth -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.6 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090202 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/usr/local/include/python2.7 -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.freebsd-9.1-RELEASE-amd64-2.7/psycopg/psycopgmodule.o
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:517:1: warning: "fork" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:557:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:518:1: warning: "sleep" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:562:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:519:1: warning: "nanosleep" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:560:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:520:1: warning: "usleep" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:561:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:521:1: warning: "system" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:559:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:522:1: warning: "sigwait" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:564:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:523:1: warning: "waitpid" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:558:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:524:1: warning: "connect" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:568:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:525:1: warning: "accept" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:569:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:526:1: warning: "select" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:565:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:527:1: warning: "poll" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:567:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:528:1: warning: "read" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:570:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:529:1: warning: "write" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:571:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:530:1: warning: "readv" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:572:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:531:1: warning: "writev" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:573:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:532:1: warning: "recv" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:574:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:533:1: warning: "send" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:575:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:534:1: warning: "recvfrom" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:576:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:535:1: warning: "sendto" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:577:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:536:1: warning: "pread" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:578:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:120,
                 from ./psycopg/psycopg.h:33,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pthread.h:537:1: warning: "pwrite" redefined
In file included from /usr/local/include/python2.7/Python.h:166,
                 from ./psycopg/psycopg.h:30,
                 from psycopg/psycopgmodule.c:27:
/usr/local/include/pth/pth.h:579:1: warning: this is the location of the previous definition
In file included from ./psycopg/config.h:121,
                 from ./psycopg/psycopg.h:34,
                 from psycopg/psycopgmodule.c:28:
/usr/local/include/pth/pthread.h:285: error: conflicting types for 'pthread_t'
/usr/include/sys/_pthreadtypes.h:65: error: previous declaration of 'pthread_t' was here
/usr/local/include/pth/pthread.h:286: error: conflicting types for 'pthread_attr_t'
/usr/include/sys/_pthreadtypes.h:68: error: previous declaration of 'pthread_attr_t' was here
/usr/local/include/pth/pthread.h:288: error: conflicting types for 'pthread_once_t'
/usr/include/sys/_pthreadtypes.h:74: error: previous declaration of 'pthread_once_t' was here
/usr/local/include/pth/pthread.h:289: error: conflicting types for 'pthread_mutexattr_t'
/usr/include/sys/_pthreadtypes.h:70: error: previous declaration of 'pthread_mutexattr_t' was here
/usr/local/include/pth/pthread.h:290: error: conflicting types for 'pthread_mutex_t'
/usr/include/sys/_pthreadtypes.h:69: error: previous declaration of 'pthread_mutex_t' was here
/usr/local/include/pth/pthread.h:291: error: conflicting types for 'pthread_condattr_t'
/usr/include/sys/_pthreadtypes.h:72: error: previous declaration of 'pthread_condattr_t' was here
/usr/local/include/pth/pthread.h:292: error: conflicting types for 'pthread_cond_t'
/usr/include/sys/_pthreadtypes.h:71: error: previous declaration of 'pthread_cond_t' was here
/usr/local/include/pth/pthread.h:293: error: conflicting types for 'pthread_rwlockattr_t'
/usr/include/sys/_pthreadtypes.h:76: error: previous declaration of 'pthread_rwlockattr_t' was here
/usr/local/include/pth/pthread.h:294: error: conflicting types for 'pthread_rwlock_t'
/usr/include/sys/_pthreadtypes.h:75: error: previous declaration of 'pthread_rwlock_t' was here
/usr/local/include/pth/pthread.h:357: error: conflicting types for 'pthread_kill'
/usr/include/signal.h:71: error: previous declaration of 'pthread_kill' was here
error: command 'cc' failed with exit status 1
[root@sigma /usr/local/downloads/psycopg2-2.4.6]#