[Tutor] pyPgSQL and Slackware 9.1

Mike Hansen mhansen at cso.atmel.com
Thu Oct 14 21:11:25 CEST 2004


Thanks Nik. Changing the lib in the setup to /usr/local/pgsql/lib got 
the build to work. The install behaved as well. However, when I run the 
test cases, I get the failures below. I made a script that connects to a 
database and prints some records and it seems to work. I am concerned 
about these failures.

$ python test/PgSQLTestCases.py
........................................F.F.......................
======================================================================
FAIL: CheckDoMoreResultObjectChecks (__main__.PgSQLTestCases)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/PgSQLTestCases.py", line 817, in CheckDoMoreResultObjectChecks
    self.fail(msg)
  File "/usr/lib/python2.3/unittest.py", line 270, in fail
    raise self.failureException, msg
AssertionError: '7.4'

======================================================================
FAIL: Test execute() with a singleton string as the parameter.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/PgSQLTestCases.py", line 639, in CheckExecuteWithSingleton
    "Length of cur.description is %d, it should be %d." %
  File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: Length of cur.description is 11, it should be 4.

----------------------------------------------------------------------
Ran 66 tests in 0.854s

FAILED (failures=2)


nik wrote:

> I can't help much with your build problem, other than try using;
> locate libpq
> to see if the library is on your system (may have to do an updatedb 
> first), and possibly put a symbolic link into /usr/lib (isn't the 
> library normally in /usr/local/pgsql/lib ?)
>
> but otherwise
> man hier
> will give a good description of what goes where in linux...
>
> nik
>
> Mike Hansen wrote:
>
>> I'm having trouble getting _any_ postgre interface module to install 
>> on one of our Slackware 9.1 servers. I can get around in Linux, but 
>> pretty green on knowing where things are in Linux. Postgre 7.4.1 is 
>> up and running on this server.(Many Perl web apps connect to it no 
>> problem.) Python 2.3.1 is running on this server. Here's what happens 
>> when I try to run the setup for pyPgSQL module as root:
>>
>> # python setup.py build
>> /usr/lib/python2.3/distutils/dist.py:213: UserWarning: 'licence' 
>> distribution o
>> tion is deprecated; use 'license'
>>  warnings.warn(msg)
>> running build
>> running build_py
>> running build_ext
>> building 'pyPgSQL.libpq.libpqmodule' extension
>> gcc -pthread -shared build/temp.linux-i686-2.3/libpqmodule.o 
>> build/temp.linux-i
>> 86-2.3/pgboolean.o build/temp.linux-i686-2.3/pgint2object.o 
>> build/temp.linux-i6
>> 6-2.3/pgint8object.o build/temp.linux-i686-2.3/pgversion.o 
>> build/temp.linux-i68
>> -2.3/pglargeobject.o build/temp.linux-i686-2.3/pgnotify.o 
>> build/temp.linux-i686
>> 2.3/pgconnection.o build/temp.linux-i686-2.3/pgresult.o 
>> build/temp.linux-i686-2
>> 3/pymemstrdup.o build/temp.linux-i686-2.3/port/strtoll.o 
>> build/temp.linux-i686-
>> .3/port/strtoull.o build/temp.linux-i686-2.3/port/strtok.o -L/usr/lib 
>> -lpq -o b
>> ild/lib.linux-i686-2.3/pyPgSQL/libpq/libpqmodule.so
>> /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bi 
>>
>> /ld: cannot find -lpq
>> collect2: ld returned 1 exit status
>> error: command 'gcc' failed with exit status 1
>>
>> Can someone tell what's causing the error? Do I need to tweak the 
>> setup.py to change where it looks for the files it needs? I started 
>> with pyPgSQL since I had used it before from Windows. Although as 
>> long as I get a DB-API 2.0 compliant module working on this server, I 
>> don't really care about which postgre interface module I use.
>>
>> While I'm asking questions, can anyone recommend a linux book that 
>> discusses the typical directory structure, where to find things, and 
>> why they are were they are?(If that makes any sense.)
>>
>> Thanks,
>>
>> Mike
>> _______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list