[mod_python] Compiling a DSO module for RedHat Linux on ALPHA 64bit.

Carl C. cc at carlc.com
Wed Feb 13 14:40:57 EST 2002


Hi everyone,

    I'm fairly new to Python and I'm trying to setup the DSO module to use
with an Alpha (64bit) based RedHat 7.1 system.

    I have the following installed as RPMs:

apache-1.3.22-1.7.1
apache-devel-1.3.22-1.7.1

    I've installed Python 2.2 as two different directories:

/usr/src/Python-2.2
/usr/src/Python-2.2-no-threads

    Python 2.2 is compiled as:

./configure --exec-prefix=/usr
make
make test
make install

    and is installed in the system.

    I created the required no-threads version under Python-2.2-nothreads as:

./configure --exec-prefix=/usr --with-threads=no
make
    (did NOT do install, as its just for the mod_python module).

    I then created my mod_python under mod_python-2.7.6 as:

./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/src/Python-2.2-no-threads

    I had to edit the Makefile to get the compileall.py to work:

/usr/src/Python-2.2-no-threads/Lib/compileall.py  (it was ($LIB)/compileall.py).

    I do get a mod_python.so in the proper area and everything does seem to 
build alright. The problem is when I go to start HTTPD with the the
mod_python.so installed (yes, its the first module).

Starting httpd: Syntax error on line 205 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/mod_python.so into server: /etc/httpd/modules/mod
_python.so: undefined symbol: openpty
[FAILED]
 
    So, I start looking in Python-2.2-no-threads's config files to see where openpty
is coming from:

configure:4873: gcc -o conftest -g -O2   conftest.c -ldl  1>&5
/tmp/ccudvDyk.o: In function `main':
/usr/src/Python-2.2-no-threads/configure:4867: undefined reference to `_getpty'
/usr/src/Python-2.2-no-threads/configure:4867: undefined reference to `_getpty'
collect2: ld returned 1 exit status
configure: failed program was:
#line 4850 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _getpty(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char _getpty();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub__getpty) || defined (__stub____getpty)
choke me
#else
_getpty();
#endif

; return 0; }
configure:4845: checking for getpriority
configure:4873: gcc -o conftest -g -O2   conftest.c -ldl  1>&5
configure:4903: checking for openpty
configure:4931: gcc -o conftest -g -O2   conftest.c -ldl  1>&5
/tmp/ccgNnz9F.o: In function `main':
/usr/src/Python-2.2-no-threads/configure:4925: undefined reference to `openpty'
/usr/src/Python-2.2-no-threads/configure:4925: undefined reference to `openpty'
collect2: ld returned 1 exit status
configure: failed program was:
#line 4908 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char openpty(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char openpty();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_openpty) || defined (__stub___openpty)
choke me
#else
openpty();
#endif

; return 0; }
configure:4953: checking for openpty in -lutil
configure:4972: gcc -o conftest -g -O2   conftest.c -lutil  -ldl  1>&5


So, it appears that it finds it in the util library... But it can't load into
apache???

Anyone else have this problem??? Or have a fix???
Thanks,
Carl
====================
http://www.carlc.com/

      "Price, Performance, Quality. Choose any two you like."




More information about the Mod_python mailing list