/_mapscript.so: wrong ELF class: ELFCLASS32
Frank Warmerdam
warmerdam at POBOX.COM
Wed Aug 1 10:25:53 EDT 2007
James McManus wrote:
> I downloaded FGS - Development MapServer and installed it as described at:
>
> http://mapserver.gis.umn.edu/development/release_plans/mapserver_5_0/fgs-msx-5.0/
> <http://mapserver.gis.umn.edu/development/release_plans/mapserver_5_0/fgs-msx-5.0/>
>
> The installation went well and I was able to display maps through a
> mapserver HTML initialization interface and a ka-map interface, which
> used PHP mapscripts. However, I had problems using a Python mapscript,
> which produced the following error:
>
> Traceback (most recent call last):
> File "/opt/fgs/www/cgi-bin/MDI.py", line 3, in <module>
> import mapscript
> File "/opt/fgs/www/lib/python2.4/mapscript.py", line 6, in <module>
> import _mapscript
> ImportError: /opt/fgs/www/lib/python2.4/_mapscript.so: wrong ELF class:
> ELFCLASS32
> [Tue Jul 31 22:47:21 2007] [error] [client 127.0.0.1 <http://127.0.0.1>]
> Premature end of script headers: /opt/fgs/www/cgi-bin/MDI.py
>
> I use a x86_64 machine, so is there a lib64 version of FGS _mapscript.so?
Jim,
FGS is currently 32bit only. I suspect what is happening is that your
system python is being used for your script, intead of the python included
with FGS which is 32bit.
What do you have as the #! line at the top of your .py script?
I did a python mapscript application on top of FGS, but as it happens
I had a bash shell script as a wrapper which explicitly did
"python myapp.py" as it's last line which picked up the FGS python since
that was first in the path. But if you script starts with something like:
#!/usr/bin/python
then of course the wrong python will get used. I normally prefix my
scripts with:
#!/usr/bin/env python
which I gather picks up the first python in the PATH. I just tried
putting such a script in my fgs/www/cgi-bin directory on my AMD64 system
and it works fine - so that seems like an angle. Let me know if it helps.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the mapserver-dev
mailing list