2017-12-18 23:12 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001451Orfeo Toolbox (OTB)Generalpublic2017-10-17 11:22
Assigned Togpasero 
PrioritynormalSeverityminorReproducibilityhave not tried
Summary0001451: OTB-6.2.0-Linux64 package missing libstdc++
DescriptionOn my CentOS 7 machine, nightly standalone package from today does not work because of missing lib versions:

poughov@to-2216251 ~/Téléchargements ./OTB-6.2.0-Linux64/bin/otbcli_Rescale
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBCommandLine-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libtinyxml.so)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libITKCommon-4.12.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitksys-4.12.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitksys-4.12.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBApplicationEngine-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBApplicationEngine-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBCommon-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitkvnl-4.12.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBIOGDAL-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitkvnl_algo-4.12.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libgdal.so.20)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libgdal.so.20)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libotbossimplugins-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libotbossimplugins-6.2.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libossim.so.1)
./OTB-6.2.0-Linux64/bin/otbApplicationLauncherCommandLine: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libgeos.so.3.6.1)
TagsNo tags attached.
Attached Files




rashadkm (developer)

we cannot add libstdc++ into package easily now.
An alternative fix must be found.


gpasero (administrator)

What alternative solution do you see ?
My guess is that deploying libstdc++ is our best option. I will investigate this.

I have reproduced a similar issue when installing the package on Ubuntu Precise. In this case both libstdc++ and libc on the system are too old.


grizonnetm (administrator)

Can we discuss the option to choose to document that the standalone binary package on Linux in only available for libstdc++ and libc versions superior to XXX?

Do we really want to package these dependencies?

Do we have other latest release distribs not supported appart from CenOS 7?

There will be perhaps a CentOS 8 in few months (centOS 7 was released in 2014) with newer versions of libc...


poughov (administrator)

I agree with Manuel, that option should at least be discussed. My CentOS is ancient...

How do other toolkits handle this issue? AppImage (https://appimage.org/) for example? Or 0install (http://0install.net)?


gpasero (administrator)

Sure, we can document that binary package requires a minimal version for libc and libstdc++.

I was still hoping to find a backup plan for "not-so-old" distro.


rashadkm (developer)

okay. first thing to make sure is if the installation is not erred!. that means check if the script that add/set RPATH is working. (try objdump -p /path/to/someotbexe |grep NEEDED

If that is wrong, this is a non-issue.

the problem about adding libstdc++ comes when building "other otbstuff" using this package. for binary only, maybe libstdc++ might work (depends on luck + ABI stability)

but when you link your code with OTB libs (expecting SOME stdc++ ABI) and remote module or example code using system stdc++ ABI. it can get messed up.

restricting a particular platform could be done in otbenv.profile (packaged version)


rashadkm (developer)


AppImage uses an older system. But we can't use centos5 easily.

don't know about 0install. never heard about it before :)

one question,
does your compiler version is supported by OTB ? what the gcc version?
and is it using gcc or clang? . I had to ask because some distro change default to clang.


poughov (administrator)

poughov@to-2216251 ~/Téléchargements/OTB-6.2.0-Linux64 gcc --version
gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

poughov@to-2216251 ~/Téléchargements/OTB-6.2.0-Linux64 ./monteverdi.sh
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBMonteverdiGUI-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBMonteverdiGUI-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBMonteverdiCore-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBMonteverdiCore-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitksys-4.12.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitksys-4.12.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBApplicationEngine-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBApplicationEngine-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libITKCommon-4.12.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBIce-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBIce-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBIOGDAL-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitkvnl-4.12.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libOTBCommon-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libitkvnl_algo-4.12.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libgdal.so.20)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libgdal.so.20)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libtinyxml.so)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libossim.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libotbossimplugins-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libotbossimplugins-6.2.so.1)
/home/poughov/Téléchargements/OTB-6.2.0-Linux64/bin/monteverdi: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/poughov/Téléchargements/OTB-6.2.0-Linux64/lib/libgeos.so.3.6.1)
poughov@to-2216251 ~/Téléchargements/OTB-6.2.0-Linux64


poughov (administrator)

poughov@to-2216251 ~/Téléchargements/OTB-6.2.0-Linux64 objdump -p ./bin/otbApplicationLauncherCommandLine | grep NEEDED
  NEEDED libOTBCommandLine-6.2.so.1
  NEEDED libtinyxml.so
  NEEDED libITKCommon-4.12.so.1
  NEEDED libitksys-4.12.so.1
  NEEDED libstdc++.so.6
  NEEDED libgcc_s.so.1
  NEEDED libc.so.6


gpasero (administrator)

After some test, the solution to add libstdc++ doesn't work : it actually provides the "GLIBCXX_3.4.20", but the library itself needs "GLIBC_2.18", which is not supplied (on CentOS7 : glibc 2.17). And adding libc.so.6 into the package doesn't work because of dynamic loading errors :

> bin/otbApplicationLauncherCommandLine
Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

At least I tried ...

Agree with Rashad on potential issues when compiling "other otbstuff", but the first priority is to allow the delivered runtimes to actually run.


gpasero (administrator)

@poughov : I do have a GCC 6, but the official libc and libstdc++ on your system must be older. Could you check the different GCC versions on your system and also the different libstdc++ available ?


poughov (administrator)

sure! but how :) ?


rashadkm (developer)

Last edited: 2017-09-22 17:09

View 2 revisions


i guess you have two libstdc++ in your system? is that correct ?

check which gcc is linked to which stdc++ ?
try the above objdump on gcc executable ?


rashadkm (developer)

if you can find the other libtdc++ location, we can work out something to fix centos7 including other users with custom gcc version


gpasero (administrator)

something like : locate libstdc++


gpasero (administrator)

Maybe you have this file :

This is actually a ld script pointing to a static version of libstdc++. What happens if you add a symlink :
~/Téléchargements/OTB-6.2.0-Linux64/lib/libstdc++.so.6 -> /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/libstdc++.so


gpasero (administrator)

I have checked 0install : haven't seen anything to make binaries more portable regarding the libc version issue.

However, on AppImage, they have a tool that might be useful :

This tools generates a wrapper header libcwrap.h depending on the system libc version and the chosen compatibility version. If this header is included when compiling the whole application stack, the binaries will only require libc at chosen compatibility version. If we manage to build libstdc++ and the whole superbuild with this trick, we could have highly portable binaries.


gpasero (administrator)

Found an other trick :
1) Install OTB as usual
2) Add in the lib folder the following binaries from hulk :
  * libstdc++.so.6
  * libgcc_s.so.1
  * libm.so.6
  * libc.so.6
  * libdl.so.2
  * librt.so.0
  * libpthreads.so.0
  * ld-linux-x86-64.so.2
3) Use patchelf to set the ld interpreter to the supplied ld-linux-x86-64.so.2, this should be done on the executables (monteverdi, mapla, otbApplicationLauncher*) and also on libraries the have an INTERP section (can be run on all libraries anyway).

If needed, this can be automated in the deployment of Linux package. However, this trick will NOT allow to use Python bindings, and of course SDK development is out of question without a proper toolchain.


gpasero (administrator)

I ran a small experiment :
- take a centos7 vm
- install GCC 6 (from devtoolset-6 software collection)
- write a small CMake project with a shared library. This library contains only one function using 'std::string_literals'
- Compile it with -std=c++14

The resulting .so file links to libstdc++.so.6 from the system but only requires GLIBCXX_3.4.9 (which is totally compatible with the system /lib64/libstdc++.so.6).

The file /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/libstdc++.so is not actually a binary file, but a text file :
  /* GNU ld script
     Use the shared library, but some functions are only in
     the static library, so try that secondarily. */
  INPUT ( /usr/lib64/libstdc++.so.6 -lstdc++_nonshared )

If I understand right : the linker will look in the system libstdc++ first, and when specific symbols from c++14 are not found, it uses the static version of libstdc++ that is supplied with the toolchain :

* building linux packages on a CentOS6+devtoolset-6 could be a nice solution for compatibility
* the alternative solution right now is to embed all libc family

Any thoughts?


gpasero (administrator)

The following package has been generated on a CentOS6 VM :

I have tried to install it on an old Ubuntu Precise : it works !!! No compatibility issue with GLIBC or GLIBCXX.

The previous package that was built on hulk with gcc4.9 is now renamed : OTB-6.2.0-Linux64-gcc4.9.run

The dashboard submission is still missing but it should come tomorrow (minor proxy issue).


grizonnetm (administrator)

@poughov : can you test on CentOS 7 ?


gpasero (administrator)

I have checked on a CentOS 7 VM, new packages work fine.


poughov (administrator)

yes, works fine for me also

-Issue History
Date Modified Username Field Change
2017-09-21 10:35 poughov New Issue
2017-09-21 13:43 rashadkm Note Added: 0004314
2017-09-22 09:39 gpasero Assigned To => gpasero
2017-09-22 09:39 gpasero Status new => assigned
2017-09-22 09:44 gpasero Note Added: 0004315
2017-09-22 12:52 grizonnetm Note Added: 0004316
2017-09-22 14:27 poughov Note Added: 0004317
2017-09-22 14:31 gpasero Note Added: 0004318
2017-09-22 15:34 rashadkm Note Added: 0004320
2017-09-22 15:40 rashadkm Note Added: 0004321
2017-09-22 15:50 poughov Note Added: 0004322
2017-09-22 15:51 poughov Note Added: 0004323
2017-09-22 15:54 gpasero Note Added: 0004324
2017-09-22 16:09 gpasero Note Added: 0004325
2017-09-22 16:29 poughov Note Added: 0004326
2017-09-22 17:08 rashadkm Note Added: 0004327
2017-09-22 17:09 rashadkm Note Edited: 0004327 View Revisions
2017-09-22 17:11 rashadkm Note Added: 0004328
2017-09-22 17:19 gpasero Note Added: 0004329
2017-09-22 18:18 gpasero Note Added: 0004331
2017-09-25 16:59 gpasero Note Added: 0004334
2017-09-25 17:16 gpasero Note Added: 0004335
2017-09-28 19:24 gpasero Note Added: 0004338
2017-10-11 10:27 gpasero Note Added: 0004366
2017-10-12 09:25 grizonnetm Note Added: 0004370
2017-10-13 15:22 gpasero Note Added: 0004374
2017-10-13 15:22 gpasero Status assigned => resolved
2017-10-13 15:22 gpasero Resolution open => fixed
2017-10-17 11:22 poughov Note Added: 0004391
+Issue History