I tried to update from 100.6 to 100.7
While linking the executables i got an undefined reference:
lib64/libEsriCommonQt.so: undefined reference to `operator delete(void*, unsigned long)@Qt_5'
I tried to compile with a) -std=gnu++11 and b) -std=gnu++14, but no difference.
Which Qt did you use on Suse? The one of the operating system (suse) or did you compile Qt on your own?
Can you provide more information?
Thanks in advance!!!
I have attached a zip file containg our complete directory.
To overcome missing information of our CMakeLists.txt, i provide the sonsole output. I hope you´ll be able to transfer that into your build environment. The main part is marked bold:
cd /shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack && /usr/bin/g++ -DArcGISQt5Hack_EXPORTS -DMAKE_ARCGISQT5HACK_LIB -D_LINUX -I/shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack -I/shd/CTC/TOOLS/TDS/TDS-source/Lts/Viewer/SituationMap/ArcGISQt5Hack -I/shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack/ArcGISQt5Hack_autogen/include -Wall -Wextra -Wmissing-include-dirs -Wno-overloaded-virtual -Wno-strict-aliasing -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++14 -o CMakeFiles/ArcGISQt5Hack.dir/arcgisqt5hack.cpp.o -c /shd/CTC/TOOLS/TDS/TDS-source/Lts/Viewer/SituationMap/ArcGISQt5Hack/arcgisqt5hack.cpp /shd/CTC/TOOLS/TDS/TDS-source/Lts/Viewer/SituationMap/ArcGISQt5Hack/arcgisqt5hack.cpp:15:45: warning: the program should also define ‘void operator delete(void*)’ [-Wsized-deallocation] __attribute__((visibility("default"))) void operator delete(void* ptr, std::size_t) noexcept ^~~~~~~~ [ 0%] Building CXX object Lts/Viewer/SituationMap/ArcGISQt5Hack/CMakeFiles/ArcGISQt5Hack.dir/ArcGISQt5Hack_autogen/mocs_compilation.cpp.o cd /shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack && /usr/bin/g++ -DArcGISQt5Hack_EXPORTS -DMAKE_ARCGISQT5HACK_LIB -D_LINUX -I/shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack -I/shd/CTC/TOOLS/TDS/TDS-source/Lts/Viewer/SituationMap/ArcGISQt5Hack -I/shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack/ArcGISQt5Hack_autogen/include -Wall -Wextra -Wmissing-include-dirs -Wno-overloaded-virtual -Wno-strict-aliasing -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++14 -o CMakeFiles/ArcGISQt5Hack.dir/ArcGISQt5Hack_autogen/mocs_compilation.cpp.o -c /shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack/ArcGISQt5Hack_autogen/mocs_compilation.cpp [100%] Linking CXX shared library ../../../../lib/libArcGISQt5Hack.so cd /shd/CTC/TOOLS/TDS/TDS-build/Lts/Viewer/SituationMap/ArcGISQt5Hack && /usr/bin/cmake -E cmake_link_script CMakeFiles/ArcGISQt5Hack.dir/link.txt --verbose=true /usr/bin/g++ -fPIC -Wall -Wextra -Wmissing-include-dirs -Wno-overloaded-virtual -Wno-strict-aliasing -g -Wl,--no-undefined -shared -Wl,-soname,libArcGISQt5Hack.so -o ../../../../lib/libArcGISQt5Hack.so CMakeFiles/ArcGISQt5Hack.dir/arcgisqt5hack.cpp.o CMakeFiles/ArcGISQt5Hack.dir/ArcGISQt5Hack_autogen/mocs_compilation.cpp.o -Wl,--version-script,/shd/CTC/TOOLS/TDS/TDS-source/Lts/Viewer/SituationMap/ArcGISQt5Hack/arcgisqt5hack.version make: Verzeichnis „/shd/CTC/TOOLS/TDS/TDS-build“ wird verlassen [100%] Built target ArcGISQt5Hack
Maybe you can share your result!?
When I try to generate Makefile from CMakeList.txt I am having the error :
CMake Error at CMakeLists.txt:8 (NGL_ADD_LIBRARY):
Unknown CMake command "NGL_ADD_LIBRARY".
Am I missing something?
That´s what i had in mind when i wrote "our" CMakeList.txt. Of course you have to adapt that into your build environment. maybe you are using CMake, pro file (Qt), os something else.
Therefore i was also providing the resulting command line.
I am still getting the same error. How can I make sure that this library is loaded before libEsriCommon.so? I have created the library and included this library in my .pro file.
# nm -gC libArcGISQt5Hack.so
U operator delete(void*)@@GLIBCXX_3.4
0000000000001119 T operator delete(void*, unsigned long)
Indeed, if forgot to mention the fact that this new lib has to be loaded very early (in the list of libs)
We did this by adding that lib to the executable - before we add the other libs.
I'm come from this thread https://community.esri.com/t5/arcgis-runtime-sdk-for-qt/arcgis-runtime-sdk-for-qt-100-10-still-build... I was still facing with this issue but I'm less experienced in C++, I just use the basic C programming and never create the libraries by myself.
Can you explain the ArcGISHack build step and provide very sample project implementation this lib for me, Please.
The ESRI-library require a symbol (operator delete...), that is unfortunately not available by the Qt-libs provided/shipped with some linux distributions.
We create a very small lib that implemts that missing symbol and use that to fill the gap.
But you ask for a sample: That depends on the build system you are using. The zip file i attached earlier contains all information.And i provided also the resulting output of the compiler.
Our hack contains just a very few lines. But you have to adapt it to your build system. (CMake, Qts pro files or what ever you are using)
Actually we just have a CMake-based hack. Maybe @FatmaAkdemir can provide a pro file?
Your are using Linux Mint 20.1, QT 5.15.2, gcc 9.3.0. That should be more then sufficient. So i recommend that you create and use a library to get experience. Afterwards you could try to create your ArcGisHack matching your system/compiler/Qt-Version.
Thanks you for your suggestion. I'm wonder because I use QT 5.15.2 from my own build from qt git source but the method still missing. I will find more the way to create a small lib in my sample project.
@FatmaAkdemir Can you provide some sample pro file or sample implementation project for me, Please?