[Python-Dev] Missing Python Symbols when Starting Python App (Apache/Django/Mod_Wsgi)

2010-11-22 Thread Anurag Chourasia
All,

I have a problem in starting my Python(Django) App using Apache and Mod_Wsgi

I am using Django 1.2.3 and Python 2.6.6 running on Apache 2.2.17 with
Mod_Wsgi 3.3

When I try to access the app from Web Browser, I am getting these
errors.

[Mon Nov 22 09:45:25 2010] [notice] Apache/2.2.17 (Unix) mod_wsgi/3.3
Python/2.6.6 configured -- resuming normal operations

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] mod_wsgi
(pid=1273874): Target WSGI script '/u01/home/apli/wm/app/gdd/pyserver/
apache/django.wsgi' cannot be loaded as Python module.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] mod_wsgi
(pid=1273874): Exception occurred processing WSGI script '/u01/home/
apli/wm/app/gdd/pyserver/apache/django.wsgi'.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] Traceback
(most recent call last):

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   File "/u01/
home/apli/wm/app/gdd/pyserver/apache/django.wsgi", line 19, in


[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] import
django.core.handlers.wsgi

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   File "/usr/
local/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line
1, in 

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] from
threading import Lock

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   File "/usr/
local/lib/python2.6/threading.py", line 13, in 

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] from
functools import wraps

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   File "/usr/
local/lib/python2.6/functools.py", line 10, in 

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] from
_functools import partial, reduce

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] ImportError:
rtld: 0712-001 Symbol PyArg_UnpackTuple was referenced

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition


[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] rtld:
0712-001 Symbol PyCallable_Check was referenced

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] rtld:
0712-001 Symbol PyDict_Copy was referenced


[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] rtld:
0712-001 Symbol PyDict_Merge was referenced

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] rtld:
0712-001 Symbol PyDict_New was referenced

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] rtld:
0712-001 Symbol PyErr_Occurred was referenced

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] rtld:
0712-001 Symbol PyErr_SetString was referenced

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   from
module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a
runtime definition

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191]   of the
symbol was not found.

[Mon Nov 22 09:45:43 2010] [error] [client 108.10.0.191] \t0509-021
Additional errors occurred but are not reported.


I assume that those missing runtime definitions are supposed to be in
the Python executable. Doing an nm on the first missing symbol reveals
that it does exist.

root [zibal]% nm  /usr/local/bin/python | grep -i PyArg_UnpackTuple
.PyArg_UnpackTuple   T   268683204 524
PyArg_UnpackTupleD   537073500
PyArg_UnpackTupled   537073500  12
PyArg_UnpackTuple:F-1 - 224

Please guide.

Regards,
Guddu
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/p

[Python-Dev] collect2: library libpython2.6 not found while building extensions (--enable-shared)

2010-11-24 Thread Anurag Chourasia
All,

When I configure python to enable shared libraries, none of the extensions
are getting built during the make step due to this error.

building 'cStringIO' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/u01/home/apli/wm/GDD/Python-2.6.6/./Include -I.
-IInclude -I./Include -I/opt/freeware/include
-I/opt/freeware/include/readline -I/opt/freeware/include/ncurses
-I/usr/local/include -I/u01/home/apli/wm/GDD/Python-2.6.6/Include
-I/u01/home/apli/wm/GDD/Python-2.6.6 -c
/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cStringIO.c -o
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cStringIO.o
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cStringIO.o
-L/usr/local/lib *-lpython2.6* -o build/lib.aix-5.3-2.6/cStringIO.so
*collect2: library libpython2.6 not found*

building 'cPickle' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/u01/home/apli/wm/GDD/Python-2.6.6/./Include -I.
-IInclude -I./Include -I/opt/freeware/include
-I/opt/freeware/include/readline -I/opt/freeware/include/ncurses
-I/usr/local/include -I/u01/home/apli/wm/GDD/Python-2.6.6/Include
-I/u01/home/apli/wm/GDD/Python-2.6.6 -c
/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cPickle.c -o
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cPickle.o
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cPickle.o
-L/usr/local/lib *-lpython2.6* -o build/lib.aix-5.3-2.6/cPickle.so
*collect2: library libpython2.6 not found*

This is on AIX 5.3, GCC 4.2, Python 2.6.6

I can confirm that there is a libpython2.6.a file in the top level directory
from where I am doing the configure/make etc

Here are the options supplied to the configure command

./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses"

Please guide me in getting past this error.

Thanks for your help on this.

Regards,
Anurag
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] AIX 5.3 - Enabling Shared Library Support Vs Extensions

2010-11-25 Thread Anurag Chourasia
All,

When I configure python to enable shared libraries, none of the
extensions are getting built during the make step due to this error.

building 'cStringIO' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/u01/home/apli/wm/GDD/Python-2.6.6/./Include -I.
-IInclude -I./Include -I/opt/freeware/include
-I/opt/freeware/include/readline -I/opt/freeware/include/ncurses
-I/usr/local/include -I/u01/home/apli/wm/GDD/Python-2.6.6/Include
-I/u01/home/apli/wm/GDD/Python-2.6.6 -c
/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cStringIO.c -o
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cStringIO.o
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cStringIO.o
-L/usr/local/lib *-lpython2.6* -o build/lib.aix-5.3-2.6/cStringIO.so
*collect2: library libpython2.6 not found*

building 'cPickle' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/u01/home/apli/wm/GDD/Python-2.6.6/./Include -I.
-IInclude -I./Include -I/opt/freeware/include
-I/opt/freeware/include/readline -I/opt/freeware/include/ncurses
-I/usr/local/include -I/u01/home/apli/wm/GDD/Python-2.6.6/Include
-I/u01/home/apli/wm/GDD/Python-2.6.6 -c
/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cPickle.c -o
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cPickle.o
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/cPickle.o
-L/usr/local/lib *-lpython2.6* -o build/lib.aix-5.3-2.6/cPickle.so
*collect2: library libpython2.6 not found*

This is on AIX 5.3, GCC 4.2, Python 2.6.6

I can confirm that there is a libpython2.6.a file in the top level
directory from where I am doing the configure/make etc

Here are the options supplied to the configure command

./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses"

Please guide me in getting past this error.

Thanks for your help on this.

Regards,
Anurag
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Python make fails with error "Fatal Python error: Interpreter not initialized (version mismatch?)"

2010-11-27 Thread Anurag Chourasia
Hi All,

During the make step of python, I am encountering a weird error. This is on
AIX 5.3 using gcc as the compiler.

My configuration options are as follows

./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses" LDFLAGS="-L. -L/usr/local/lib"


Below is the transcript from the make step.
++
running build
running build_ext
ldd: /lib/libreadline.a: File is an archive.
INFO: Can't locate Tcl/Tk libs and/or headers
building '_struct' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/u01/home/apli/wm/GDD/Python-2.6.6/./Include -I.
-IInclude -I./Include -I/opt/freeware/include
-I/opt/freeware/include/readline -I/opt/freeware/include/ncurses
-I/usr/local/include -I/u01/home/apli/wm/GDD/Python-2.6.6/Include
-I/u01/home/apli/wm/GDD/Python-2.6.6 -c
/u01/home/apli/wm/GDD/Python-2.6.6/Modules/_struct.c -o
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/_struct.o
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp -L. -L/usr/local/lib
build/temp.aix-5.3-2.6/u01/home/apli/wm/GDD/Python-2.6.6/Modules/_struct.o
-L. -L/usr/local/lib -lpython2.6 -o build/lib.aix-5.3-2.6/_struct.so
*Fatal Python error: Interpreter not initialized (version mismatch?)*
*make: 1254-059 The signal code from the last command is 6.*
++

The last command that i see above (ld_so_aix) seems to have completed as the
file _struct.so exists after this command and hence I am not sure which step
is failing.

There is no other Python version on my machine.

Please guide.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] AIX 5.3 - Enabling Shared Library Support Vs Extensions

2010-12-02 Thread Anurag Chourasia
Hi Sebastian,

Thanks for your response.

I  looked at http://bugs.python.org/issue941346 earlier. I was referred to
this link by Stefan Krah through another bug that i created at
http://bugs.python.org/issue10555 for this issue.

I confirm that my problem is solved with the Python 2.7.1 release which
contains the changes done by you.

Great work done by you and other folks for enabling the Shared Library build
on AIX. Hats Off !!!

Regards,
Anurag

2010/12/2 Sébastien Sablé 

>
> Hi Anurag,
>
> Le 25/11/2010 10:24, Anurag Chourasia a écrit :
>
> > All,
> >
> > When I configure python to enable shared libraries, none of the
> extensions are getting built during the make step due to this error.
> >
>
> you may want to take a look at the following issue:
>
> http://bugs.python.org/issue941346
>
> Python compiled with shared libraries was broken on AIX until recently.
> There are some patches there to get it to work, or you may want to test the
> latest 2.7 or 3.x releases.
>
> regards
>
> --
> Sébastien Sablé
>
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] AIX 5.3 - Build of Python 2.7.1

2011-06-06 Thread Anurag Chourasia
Hi All,

Python2.7.1 build on AIX 5.3 ML 12 is failing at the make step with the
error indicated below

de -I./Include -I /opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses  -DPy_BUILD_CORE -o Parser/tokenizer_pgen.o
Parser/tokenizer_pgen.c
gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses  -DPy_BUILD_CORE -o Parser/printgrammar.o
Parser/printgrammar.c
gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses  -DPy_BUILD_CORE -o Parser/pgenmain.o
Parser/pgenmain.c
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
Parser/acceler.o  Parser/grammar1.o  Parser/listnode.o  Parser/node.o
 Parser/parser.o  Parser/parsetok.o  Parser/bitset.o  Parser/metagrammar.o
 Parser/firstsets.o  Parser/grammar.o  Parser/pgen.o Objects/obmalloc.o
 Python/mysnprintf.o  Python/pyctype.o  Parser/tokenizer_pgen.o
 Parser/printgrammar.o  Parser/pgenmain.o -ldl  -o Parser/pgen
ld: 0711-593 SEVERE ERROR: Symbol C_BSTAT (entry 559) in object
Parser/grammar1.o:
The symbol refers to a csect with symbol number 0, which was not
found. The new symbol cannot be associated with a csect and
is being ignored.
ld: 0711-593 SEVERE ERROR: Symbol C_BSTAT (entry 579) in object
Parser/firstsets.o:
The symbol refers to a csect with symbol number 0, which was not
found. The new symbol cannot be associated with a csect and
is being ignored.
collect2: ld returned 12 exit status
make: 1254-004 The error code from the last command is 1.

Is there anything I could try to get past this?

Here is the configuration and make step that i utilized

./configure –enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I
/opt/freeware/include -I /opt/freeware/include/readline -I
/opt/freeware/include/ncurses"


make


Regards,
Anurag
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com