[gdal-dev] mod_python issue with libtiff

Andreas Neumann a.neumann at carto.net
Mon Oct 18 10:32:33 EDT 2010


Hi,

Thank you all for your hints so far.

Frank also suggested to examine which libraries are in use by Apache with
the following command:

cat /proc/<apache-id>/maps

It turns out that
/usr/lib/libtiff.so.4.3.2
and
/usr/local/lib/libtiff.so.5.0.0

are in use.

There is no libtiff.so.3x installed in the system.

So I wonder if the error message mentioning 3x and 4x actually means 4x
and 5x?


I also tried mod_wsgi instead of mod_python, but the same error message
appears.

After looking at all the libraries that are used by Apache I also saw that
GRASS was included. Next, I compiled gdal without GRASS support - and
voila - mod_wsgi and mod_python worked.

My GRASS installation was fairly old and I don't need it on this server
currently. My guess is that GRASS somehow linked to libtiff4x and the rest
of gdal linked to libtiff5x. Or maybe GRASS links to libtiff3x which isn't
present in my system anymore? I also guess that compiling GRASS again
would solve the problem.

Although I still don't fully understand the output of
/proc/<apache-id>/maps, it is cool being able to look at the libraries
that a process is using.

Thanks for all of your hints. Problem is solved now.

Andreas


On Fri, October 15, 2010 8:32 pm, Even Rouault wrote:
> Andreas,
>
> I'm somehow happy to see that you've hit the warning. It means that it was
> usefull to add it and probably saved you headaches when things would have
> started to crash awfully...
>
> Now, I'm afraid I cannot really help you more. There's something in your
> Apache that loads a libtiff 3.X... Don't you load other modules that could
> load
> libtiff indirectly ? A "ld foo.so | grep libtiff" on the potential .so
> python
> modules might help find the culprit.
>
> Or perhaps if you move/rename /usr/lib/libtiff.so* to something else, the
> culprit will complain and you'll be able to identify it.
>
> Le vendredi 15 octobre 2010 17:26:13, Andreas Neumann a écrit :
>> Hi,
>>
>> I recently upgraded my gdal version to the recent SVN version. The
>> command-line tools work fine, but my python scripts inside Apache
>> mod_python fail with the following error:
>>
>> -----------------------------------------
>>
>> ERROR 1: WARNING ! libtiff version mismatch : You're linking against
>> libtiff 3.X but GDAL has been compiled against libtiff >= 4.0.0
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] mod_python
>> (pid=2117, interpreter='srv139.stadt-uster.ch', phase='PythonHandler',
>> handler='mod_python.publisher'): Application error
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] ServerName:
>> 'srv139.stadt-uster.ch'
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] DocumentRoot:
>> '/home/www/www/'
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] URI:
>> '/geodatenshop/extract_meta.py/raster'
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] Location: None
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] Directory: '/'
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] Filename:
>> '/home/www/www/geodatenshop/extract_meta.py'
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198] PathInfo:
>> '/raster' [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]
>> Traceback (most recent call last):
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in
>> HandlerDispatch\n    default=default_handler, arg=req,
>> silent=hlist.silent)
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in
>> _process_target\n    result = _execute_target(config, req, object, arg)
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in
>> _execute_target\n    result = object(arg)
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 213, in
>> handler\n    published = publish_object(req, object)
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 425, in
>> publish_object\n    return publish_object(req,util.apply_fs_data(object,
>> req.form, req=req))
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/usr/lib/python2.6/dist-packages/mod_python/util.py", line 554, in
>> apply_fs_data\n    return object(**args)
>> [Fri Oct 15 17:03:22 2010] [error] [client 10.63.238.198]   File
>> "/home/www/www/geodatenshop/extract_meta.py", line 18, in raster\n
>> req.write('\\t<driver>'+dataset.GetDriver().ShortName+'/'+dataset.GetDriver
>> ().LongName+'</driver>\\n') [Fri Oct 15 17:03:22 2010] [error] [client
>> 10.63.238.198] AttributeError: 'NoneType' object has no attribute
>> 'GetDriver'
>>
>> --------------------------
>>
>> I set the libtiff to "internal" in the configure options before the
>> compile.
>>
>> I don't understand why the mod_python scripts link to libtiff 3.x. Why
>> are
>> the commandline tools (gdal-info, gdal-translate, gdal_merge.py, etc.)
>> working fine, but the scripts inside mod_python do not.
>>
>> Both are using python2.6.
>>
>> Thank you very much for any pointers or hints on what may be wrong in my
>> configuration.
>>
>> Andreas
>


-- 
Andreas Neumann
http://www.carto.net/neumann/
http://www.svgopen.org/



More information about the gdal-dev mailing list