[mod_python] make failed on AIX 5.1 using xlc

Graham Dumpleton grahamd at dscpl.com.au
Tue Jan 10 05:33:57 EST 2006


On 10/01/2006, at 9:18 PM, Hans-Joachim Ehlers wrote:

> 2)
> Under AIX the Compilation of python is somehow quite uncommon
> Just see the out from from the mod_python make:
>
> /usr/local/apache2/build/libtool --silent --mode=link xlc_r -o
> mod_python.la  -rpath /usr/local/apache2/modules -module -avoid-version
> -Wl,-brtl  hlistobject.lo hlist.lo filterobject.lo connobject.lo
> serverobject.lo util.lo tableobject.lo requestobject.lo 
> _apachemodule.lo
> mod_python.lo -L/usr/local/lib/python2.4/config
> -Wl,-bE:Modules/python.exp -lld -L/opt/freeware/lib -ltk8.3 -ltcl8.3 
> -lm
> -lpython2.4 -ldl -lm
> ld: 0706-004 Cannot find or read export file: Modules/python.exp
>
> These ./python.exp can be found as
> /usr/local/lib/python2.4/config/python.exp in the installed python
> distribution
> So the Makefile for Modpython should have a Section for AIX where the
> makefile does the following:
> Get the python installation directory ( in my case
> /usr/local/lib/python2.4 )
> Create a Subdirectory in ./src for Modules ( mkdir Modules )
> Creates a Link in ./src/Modules to
> /usr/local/lib/python2.4/config/python.exp
>
> OR
> just makes mkdir ./src/Modules && touch ./src/Modules/python.exp
>
> I have tested both without problems but i would prefer the first one.

Look at /usr/local/lib/python2.4/config/Makefile. The mod_python
makefile is most likely getting the '-Wl,-bE:Modules/python.exp'
out of there.

Either one of two things might be wrong. First might be that the
option is exactly that and therefore that Makefile in Python is wrong.

Second thing that might be wrong is that the option is actually
written as '-El,-bE:$(DESTDIR)$(LIBPL)/python.exp' and that is what
mod_python is using but DESTDIR and LIBPL aren't actually set and
thus are being replaced with nothing.

If the latter, one might argue that mod_python could set one or both
of these variables in its makefile somehow to ensure they are expanded
correctly.

Find where '-El,-bE' is defined in the Python installed Makefile and
email back that line and the few either side of it.

> After that i get from a make:
> xlc_r -O -Isrc/include -I/usr/local/include/python2.4 -c
> src/_pspmodule.c -o build/temp.aix-5.1-2.4/src/_pspmodule.o
> "src/_pspmodule.c", line 32.61: 1506-137 (E) Declaration must declare
> at least one declarator, tag, or the members of an enumeration.
>
> but still compiles

If that is the line:

   static int yy_init_globals (yyscan_t yyscanner ) {return 0;};

it is because of the extraneous semicolon on the end of the line. From
memory, both AIX C compiler and Sun C++ compiler would complain about
such extra semicolons.

> A make install will pass with out any error
> I would like to provide a patch file for the Makefile but i am a totaly
> newbe to C programming and building so i hope the above information 
> will
> help
>
> No runtime testing has been done yet
>
> With kind regards
> Hajo
>
>
>>>> "Graham Dumpleton" <grahamd at dscpl.com.au> 09/01/06 22:38 >>>
> Seems to be some quirk with xlc compiler. Never liked that compiler,
> always did strange things.
>
> Try hacking the code so that instead of:
>
>   (destructor)request_dealloc,     /* tp_free */
>
> it says:
>
>   (void(*)(void*))request_dealloc,     /* tp_free */
>
> Try a typedef for the function pointer if I got the cast wrong or it
> doesn't want to accept that.
>
> Graham
>
> Hans-Joachim Ehlers wrote ..
>> Hi folk,
>> i am trying to build mod-python 3.1.4 on AIX 5.1 with xlc
>> During the gmake i get the following error: .... 1506-196 (E)
>> Initialization between types "void(*)(void*)" and "void(*)(struct
>> _object*)" is not allowed
>>
>> any Tips ?
>> tai
>> Hajo
>>
>> For details see below
>>
>> given:
>> AIX 5.1
>> vac 6.0 ( IBM xlc)
>> mod-python 3.1.4
>> Python 2.4.2 build as shared Lib application
>> Apache 2.0.55
>>
>> $ ./configure CC=xlc_r \
>>  --with-thread       \
>>  --with-python=/usr/local/bin/python \
>>  --with-apxs=/usr/local/apache2/bin/apxs
>>
>>
>> $ gmake[1]: Entering directory
>> `/homespace/hjehlers/workbench/modpython/mod_python-3.1.4/src'
>>
>> Compiling for DSO.
>>
>> /usr/local/apache2/bin/apxs
>>
> -I/homespace/hjehlers/workbench/modpython/mod_python-3.1.4/src/include
>> -I/usr/local/apache2/include -I/usr/local/include/python2.4 -c
>> mod_python.c _apachemodule.c requestobject.c tableobject.c util.c
>> serverobject.c connobject.c filterobject.c hlist.c hlistobject.c
>> -L/usr/local/lib/python2.4/config  -Wl,-bE:Modules/python.exp -lld
>> -L/opt/freeware/lib -ltk8.3 -ltcl8.3    -lm  -lpython2.4   -ldl
> -lm
>> /usr/local/apache2/build/libtool --silent --mode=compile xlc_r
>> -prefer-pic   -U__STR__ -D_THREAD_SAFE -D_USE_IRS -DAP_DEBUG -g
> -qHALT=E
>> -qfullpath -qinitauto=FE -qcheck=all -qinfo=pro
>> -I/usr/local/apache2/include  -I/usr/local/apache2/include
>> -I/usr/local/apache2/include
>>
> -I/homespace/hjehlers/workbench/modpython/mod_python-3.1.4/src/include
>> -I/usr/local/apache2/include -I/usr/local/include/python2.4  -c -o
>> mod_python.lo mod_python.c && touch mod_python.slo
>> /usr/local/apache2/build/libtool --silent --mode=compile xlc_r
>> -prefer-pic   -U__STR__ -D_THREAD_SAFE -D_USE_IRS -DAP_DEBUG -g
> -qHALT=E
>> -qfullpath -qinitauto=FE -qcheck=all -qinfo=pro
>> -I/usr/local/apache2/include  -I/usr/local/apache2/include
>> -I/usr/local/apache2/include
>>
> -I/homespace/hjehlers/workbench/modpython/mod_python-3.1.4/src/include
>> -I/usr/local/apache2/include -I/usr/local/include/python2.4  -c -o
>> _apachemodule.lo _apachemodule.c && touch _apachemodule.slo
>> /usr/local/apache2/build/libtool --silent --mode=compile xlc_r
>> -prefer-pic   -U__STR__ -D_THREAD_SAFE -D_USE_IRS -DAP_DEBUG -g
> -qHALT=E
>> -qfullpath -qinitauto=FE -qcheck=all -qinfo=pro
>> -I/usr/local/apache2/include  -I/usr/local/apache2/include
>> -I/usr/local/apache2/include
>>
> -I/homespace/hjehlers/workbench/modpython/mod_python-3.1.4/src/include
>> -I/usr/local/apache2/include -I/usr/local/include/python2.4  -c -o
>> requestobject.lo requestobject.c && touch requestobject.slo
>> "requestobject.c", line 1381.5: 1506-196 (E) Initialization between
>> types "void(*)(void*)" and "void(*)(struct _object*)" is not
> allowed.
>> apxs:Error: Command failed with rc=65536
>> .
>> gmake[1]: *** [mod_python.so] Error 1
>> gmake[1]: Leaving directory
>> `/homespace/hjehlers/workbench/modpython/mod_python-3.1.4/src'
>> gmake: *** [do_dso] Error 2
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list