Closed ggardet closed 2 years ago
@christapley Any hint on this ? I cannot reproduce on Ubuntu 16.04 with ECW 5.5, but I do indeed see that libNCSEcw.so.5.5.0 exports a __cxa_throw symbol, which is quite suspect since this symbol is normally exported by libstdc++.so.6 . So it is obvious here there's a symbol clash, and that PROJ C++ exceptions are thrown through libNCSEcw instead of libstdc++ Actually, I see that libNCSEcw.so.5.5.0 doesn't link against libstdc++.so.6, so I suspect it statically links it, which is the likely cause of that issue.
I forgot to add that I also have It does not change anything. So, we can continue to work on this.fgdb_api
enabled. I am rebuilding without it atm to check if it has an influence.
Seems I have exact same or similar crash and stack trace on openSUSE Tumbleweed while it works fine on Ubuntu for my colleagues. See details here: https://stackoverflow.com/q/61164590/630169
Could it be some SUSE packages build problem: options switches or something? Or it is GDAL and required libraries versions problem?
Have solved my issue. Problem was in libproj
version: https://stackoverflow.com/a/61198016/630169
For clarity, suppressing the 2 above posts from @akontsevich which aren't relevant to that ticket
They are relevant as I got same crashes and same call stack in openSUSE for gdal-3 linked app. So something is wrong in SUSE gdal packages builds.
Hi @rouault, I'm not working for Hexagon any longer but I have made sure that they are aware of this issue.
Hi @ggardet . Can you please supply your ./configure arguments for PROJ and GDAL, and a directory listing of your ECWJP2 SDK directory (recursive, or primarily, the contents of ./lib)
@christapley Any hint on this ? I cannot reproduce on Ubuntu 16.04 with ECW 5.5, but I do indeed see that libNCSEcw.so.5.5.0 exports a __cxa_throw symbol, which is quite suspect since this symbol is normally exported by libstdc++.so.6 . So it is obvious here there's a symbol clash, and that PROJ C++ exceptions are thrown through libNCSEcw instead of libstdc++ Actually, I see that libNCSEcw.so.5.5.0 doesn't link against libstdc++.so.6, so I suspect it statically links it, which is the likely cause of that issue.
@rouault Where do you see that it exports that symbol? Using 'nm -gD .../libNCSEcw.so.5.5' I see that __cxa_throw is an external symbol. Not sure that these conclusions are accurate.
__cxa_throw is definetely embedded in libNCSEcw.so
Compare
$ objdump -T ~/hexagon/ERDAS-ECW_JPEG_2000_SDK-5.5.0/Desktop_Read-Only/lib/cpp11abi/x64/release/libNCSEcw.so | grep __cxa_throw
000000000072bc80 g DF .text 0000000000000068 Base __cxa_throw
vs
$ objdump -T libgdal.so | grep __cxa_throw
0000000000000000 DF *UND* 0000000000000000
Or with nm
$ nm -gD ~/hexagon/ERDAS-ECW_JPEG_2000_SDK-5.5.0/Desktop_Read-Only/lib/cpp11abi/x64/release/libNCSEcw.so | grep __cxa_throw
000000000072bc80 T __cxa_throw
vs
$ nm -gD libgdal.so | grep __cxa_throw
U __cxa_throw
In ECW SDK 5.5. Update 2, if you use the command line nm --demangle libNCSEcw. a | grep __cxa_throw, then all the __cxa_throw are "undefined'. We did not find an easy way for the moment for the DYNAMIC library libNCSEcw.so to remove the static link to stdlibc++ that is needed due to a third party we use in another application. We used visibility -fhidden + -Wl,--exclude-libs,ALL but the symbols are still exported concerning the exception. We are still investigating. Please use the static library for the moment.
closing as not a GDAL bug
Expected behavior and actual behavior.
gdalinfo test.tif
returns SIGABRT when compiled with ECW 5.4/5.5 support andproj.db
installed. If I removed theproj.db
file, there is no SIGABRT anymore.gdb traces with ecw 5.4:
gdb traces with ecw 5.5:
Steps to reproduce the problem.
Compile gdal with proj7 and ECW SDK 5.4 or 5.5 (Desktop Read-only) and run
gdalinfo test.tif
whenproj.db
is installed.Operating system
openSUSE Leap 15.1 / openSUSE Tumbleweed x86_64
GDAL version and provenance
gdal 3.0.4 from openSUSE + ECW option enabled.