Re: [APSW 3.3.13-r1] Fails compiling in CentOS?

Roger Binns <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fred wrote:
> I see some C files like traceback.c, but there are no instructions to 
> compile things.

They are in apsw.html which is the same as website.

> 3. python setup.py install:
> 
> http://pastebin.ca/873705
> (too many errors, so the scrollback buffer chopped off the first part)

You are missing both the python development files and the SQLite
development files.  The former should be called something like
python-dev using the system packaging tool (I'm an Ubuntu man myself so
I don't know the magic for CentOS).

> I suspected that I needed to compile my own SQLite from the source, and 
> (it's not said in the documentation),

Please read the building section! Quote:

  By default whatever SQLite 3 you already have on
  your system is used. If you place a copy of the
  headers and library in a sqlite3  subdirectory then
  that will be used instead.

It isn't exactly explicit that not having any SQLite at all will be a
problem :-)

> 1. In /root/python_apsw/apsw-3.3.13-r1, wget 
> http://www.sqlite.org/sqlite-3.5.4.tar.gz
> 2. tar xzvf sqlite-3.5.4.tar.gz
> 3. mv sqlite-3.5.4 sqlite3
> 4. cd sqlite3
> 5. env CC="gcc -fPIC" CFLAGS="-DHAVE_DLOPEN" ./configure 
> --enable-threadsafe --disable-tcl
> 6. make
> 7. cp .libs/*.a .
> 8. cd ..
> 9. python setup.py install

That exact sequence of steps should work.  Missing the python
development libraries is cause of many of the errors.  I suspect other
stuff is missing as well.  To completely capture your session, do the
following as step zero:

  $ script

It will say:  Script started, file is typescript

It starts a new shell and everything you do will be captured to a file
named typescript.  As step 10, do:

  $ exit

That will exit the new shell and say: Script done, file is typescript

You can now put the file 'typescript' into pastebin.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHm55PmOOfHg372QQRAlugAKC7+QJ/SuIbMJnOIjP8b9cIHWPISgCgj8xv
RUqOXdVsfyb6jjWGKbyaWkI=
=VgJT
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.