[mod_python] mod_python on FreeBSD 6.1 gives Syntax error - mod_python.so: unsupported file layout

Anthony Raj anthony_raj at persistent.co.in
Mon Jul 2 01:14:23 EDT 2007


Hi Graham,

It ran correctly with the following configuration -
No errors were detected while the linking any lib.
Need to look carefully at the error generated.
AFAIK , it got installed without lib related errors.

-------
1.	Install apr 1.2.8
Install Steps :
./configure --prefix=/local/apr-util-httpd --with-apr=/local/apr-httpd
make
make install
----

2. Install apr-util 1.2.8
	- apr-util has bug for 64 bit Arch. Need to patch it first.
http://www.weblogs.uhi.ac.uk/sm00ay/?p=196
http://issues.apache.org/bugzilla/show_bug.cgi?id=28205
Install Steps :
./configure --prefix=/local/apr-httpd
make
make install
----

3.	Install httpd 2.2.4
Install Steps :

	./configure --prefix=/local/apache-ast --with-apr=/local/apr-httpd/
--with-apr-util=/local/apr-util-httpd/
make
make install
----

4. Install mod_python 3.3.1
	Install Steps:
	./configure --with-apxs=/local/apache-ast/bin/apxs
make
make install
----

Cheers,
Anthony

-----Original Message-----
From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com] 
Sent: Sunday, July 01, 2007 7:04 AM
To: anthony_raj at persistent.co.in
Cc: mod_python at modpython.org; rajeev.nair at gridstoneresearch.com
Subject: Re: [mod_python] mod_python on FreeBSD 6.1 gives Syntax error -
mod_python.so: unsupported file layout

Usually these problems are caused through using the mod_python.so with
a version of Apache which is different to the version of Apache that
mod_python was compiled against. This can especially occur where you
have a standard OS installation of Apache but you try and use an
alternate version under /usr/local/ or elsewhere.

What options did you use with 'configure' when you ran it? Did the
compile line correctly pick up includes and libraries from the version
under /usr/local?

Graham

On 01/07/07, Anthony Raj <anthony_raj at persistent.co.in> wrote:
> Hi Folks,
>
> Have come to the community with a new issue with regard to installing
mod_python on FreeBSD.
>
> Eariler had installed apache/mod_python on
> Suse 10 / 64 Arch.
> - Apache 2.2.4
> - mod_python 3.3.1
> - apr 1.2.8
> - apr-util 1.2.8
>
> problems -
> The issue with mod_python being installed in to locations.
> Managed to get it working on this setup sucessfully.
> ---
>
> Now I've installed the same configuration on
> Free BSD 6.1 32 Arch.
> >>>>
> FreeBSD perputo3.inetu.net 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #107: Mon
Nov  6 20:31:10 EST 2006     root at turnip.inetu.org:/usr/obj/usr/src/sys/INU6
i386
> >>>>
>
> Installation was completed successfully for all the above modules.
>
> But after adding the required configuration line -
> >>>
> LoadModule python_module modules/mod_python.so
> >>>
>
> And restarting apache , it throws the following error
> >>>>
> /usr/local/apache-ast>./bin/apachectl start
> httpd: Syntax error on line 54 of /usr/local/apache-ast/conf/httpd.conf:
Cannot load /usr/local/apache-ast/modules/mod_python.so into server:
/usr/local/apache-ast/modules/mod_python.so: unsupported file layout
>
> >>>>
>
> The required mod_python.so appears to be installed in
> /usr/local/apache-ast/modules directory.
>
> >>>>
> /usr/local/apache-ast>ls -l modules/
> total 1738
> -rw-r--r--  1 root  wheel     8951 Jun 29 10:19 httpd.exp
> -rwxr-xr-x  1 root  wheel  1739997 Jun 29 10:50 mod_python.so
>
> >>>>
>
> Have also added the following lines in the config file -
> >>>>
> <Directory "/usr/local/apache-ast/htdocs">
>       AddHandler mod_python .py
>       PythonHandler mod_python.publisher
>       PythonDebug On
> </Directory>
>
> >>>>
>
> Any one knows if there is any bug with mod_python installation on FreeBSD
6.1. Please let me know in case you there is anything that is missing in the
install steps.
>
> Or is there any port of mod_python for Free BSD that needs to be used
here.
>
> Please let me know your advice on the same.
>
> cheers,
> Anthony
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is
the property of Persistent Systems Pvt. Ltd. It is intended only for the use
of the individual or entity to which it is addressed. If you are not the
intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in
error, please notify the sender and delete all copies of this message.
Persistent Systems Pvt. Ltd. does not accept any liability for virus
infected mails.
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.


More information about the Mod_python mailing list