Hi Manuel,

Thanks a lot for the suggestions and informations!

I tried to bypass the error in Python with subprocess, and in the end, Popen was the best option. By using this command, there was no need to bypass the error at all. For some OTB commands, I needed to store the output, which is doable by using PIPE:

proc = subprocess.Popen(['otbcli_ReadImageInfo', '-in', file_name], stdout=subprocess.PIPE)
img_infos = proc.communicate()[0]

Hope this will help.

Best Regards,

Arthur

Le 16/07/14 12:16, Manuel Grizonnet a écrit :
Hi Arthur,

we're aware of this issue (and aware that it is quite annoying). The
problem is that to avoid this problem we need to patch ITK and this
patch will probably not accepted upstream as this modification solve an
other issue on their side.

The patch can be apply to the source of ITK and then recompile all.
We've also integrated this patch in the ITK package on Ubuntu but for
some reason he was not applied when we last generate OTB binary package:

Solutions:

- Try to find a way to bypass the warning in the python script (this
problem is annoying but it does not stop the application running
process). Perhaps with the subprocess module and the check_call function:

https://docs.python.org/2/library/subprocess.html#subprocess.check_call

There should be a way top catch ad bypass this error but I am not sure.

- Apply the patch to your OTB source and recompile all as you said.

- Wait for the next version of ITK/OTB package. We're planning to
release a new version of OTB soon (To Be Determined), with this new
release we'll provide a new version of packages which will include this
patch in ITK. In the meantime perhaps one of the OTB packager can find
time to submit a patch release of the package for version 4.0.

Let us know if you make some progress expecially bypassing the warning
in Python (other users must be interested).

Regards,

Manuel


Le 15/07/2014 17:02, arthurd a écrit :
Hello,

I just updated OTB to version 4.0 and the dl-close error is giving me
a hard time: I use some OTB commands in a Python script via the
subprocess module. It worked pretty good but with this error, the
script ends and I can't find a proper way to bypass it.

I saw Julien's answer concerning the patch, but I don't know how to
apply it (I installed OTB with the Ubuntu deposits). Is there a way to
patch it or is there no other choice than compiling from sources? Do
you know if this bug will be fixed in the next OTB release?

Thanks a lot for all the work and help,

Arthur

Le jeudi 20 mars 2014 18:34:28 UTC+1, remicres a écrit :

    It works, thank you !

    Rémi


    Le jeudi 20 mars 2014 17:31:54 UTC+1, Julien Malik a écrit :

        Hello,

        If you apply this patch to ITK :
        
http://hg.orfeo-toolbox.org/OTB-DevUtils/file/e7bc3a2f2bfe/Packaging/ubuntu/ITK/debian/patches/dl-close-fix.patch
        
<http://hg.orfeo-toolbox.org/OTB-DevUtils/file/e7bc3a2f2bfe/Packaging/ubuntu/ITK/debian/patches/dl-close-fix.patch>
        The message will disappear.

        Julien

        On 03/20/2014 05:27 PM, remicres wrote:
        I have finally compiled OTB4.0 from sources.***
        *
        One issue I have now is this error message that Julien
        mentioned before. It happens at the end of execution of any
        otb app.*
        /Inconsistency detected by ld.so: dl-close.c: 759: _dl_close:
        Assertion `map->l_init_called' failed!/
        **
        *One other strange thing I noticed is the impossibility to
        use external boost. I give a try with boost 1.55 but the
        OTB_USE_BOOST switches automatically to OFF.

        Nevertheless, here are the steps I followed to build OTB4.0
        on a fresh ubuntu 12.04LTS:

        *1. Install ubuntu 12.04LTS (e.g. with debootstrap)*

        *2. Configure the repositories, update, then install
        following packages*
        aptitude make cmake-curses-gui build-essential mercurial
        subversion libtool automake libbz2-dev python-dev

        *3. build libtiff 4.0.3*
        (ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz
        <ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz>)

        *4. build proj 4.8.0*
        (http://download.osgeo.org/proj/proj-4.8.0.tar.gz
        <http://download.osgeo.org/proj/proj-4.8.0.tar.gz>)

        *5. build libgeotiff*
        (https://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff
        <https://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff>)
        Configure options: --with-libtiff=your_libtiff_dir
        --with-proj=your_proj_dir

        *6. build GDAL 1.10.1*
        (ftp://ftp.remotesensing.org/gdal/1.10.1/
        <ftp://ftp.remotesensing.org/gdal/1.10.1/>)
        Configure options: --with-rename-internal-libtiff-symbols=yes
        --with-rename-internal-libgeotiff-symbols=yes
        --prefix=/work/libgdal/build/ --with-geotiff=internal
        --with-libtiff=internal

        *7. build OTB* (svn: http://hg.orfeo-toolbox.org/OTB
        <http://hg.orfeo-toolbox.org/OTB>)
        I built it with cmake this way:
        cmake ../OTB
        -DGDAL_CONFIG=your_gdal_build_directory/bin/gdal-config
        -DGDAL_INCLUDE_DIR=your_gdal_build_directory/include/
        -DGDAL_LIBRARY=your_gdal_build_directory/lib/libgdal.so
        -DGEOTIFF_INCLUDE_DIRS=your_geotiff_build_directory/include/
        -DTIFF_INCLUDE_DIRS=your_tiff_build_directory/include/
        
-DJPEG_INCLUDE_DIRS=your_gdal_sources_directory(gdal-1.10.1)/frmts/jpeg/libjpeg
        -DTIFF_LIBRARY=your_tiff_build_directory/lib/libtiff.so
        -DGEOTIFF_LIBRARY=your_geotiff_build_directory/lib/libgeotiff.so
        -DOTB_USE_EXTERNAL_ITK=OFF -DITK_USE_FFTWD=OFF
        -DITK_USE_FFTWF=OFF

        *8. You may need to set some environment variables (paths to
        libraries and binaries)*: GDAL, GeoTiff, proj, tiff, OTB, ...

        Hope this help,

        Rémi

        --
        --
        Check the OTB FAQ at
        http://www.orfeo-toolbox.org/FAQ.html
        <http://www.orfeo-toolbox.org/FAQ.html>

        You received this message because you are subscribed to the
        Google
        Groups "otb-users" group.
        To post to this group, send email to [email protected]
        To unsubscribe from this group, send email to
        [email protected]
        For more options, visit this group at
        http://groups.google.com/group/otb-users?hl=en
        <http://groups.google.com/group/otb-users?hl=en>
        ---
        You received this message because you are subscribed to the
        Google Groups "otb-users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected].
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
Manuel GRIZONNET
CNES - DCT/SI/AP - BPI 1219
18, avenue Edouard Belin
31401 Toulouse Cedex 09 - France
Tel: +33 561 282 630 - Fax: +33 561 283 109

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "otb-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/otb-users/XZOANkBsRN0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to