Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7942 Discussions

What are the flags so that the sized delete operator (_ZdlPvm) is linked in libQt5Core.so ?

Joe_the_dev
Beginner
2,536 Views

I have to compile the Qt 5.15.0 libs from source with the intel compiler (19.1.1.217 20200306, 64 bit) on RHEL 7
such that _ZdlPvm ends up in libQt5Core.so, like:
objdump -T libQt5Core.so|grep _ZdlPvm
000000000042d330 g DF .text 0000000000000005 Qt_5 _ZdlPvm

_ZdlPvm is the sized delete operator: operator delete(void*, std::size_t).
See for instance:
https://gcc.gnu.org/legacy-ml/gcc-patches/2014-12/msg01355.html

Without optimisations, _ZdlPvm is only defined in libstdc++.so:
objdump -T rhel/7/GCCcore/7.3.0/lib64/libstdc++.so| grep _ZdlPvm
00000000000a3570 g DF .text 0000000000000008 CXXABI_1.3.11 _ZdlPvmSt11align_val_t
00000000000a1460 g DF .text 0000000000000005 CXXABI_1.3.9 _ZdlPvm

icpc has a lot of optimisation flags, I tried a few (-ipo, -ffreestanding) but no luck.
_ZdlPvm ends up as an undefined dependency in libQt5Core.so, like:
objdump -T libQt5Core.so|grep _ZdlPvm
0000000000000000 DF *UND* 0000000000000000 CXXABI_1.3.9 _ZdlPvm

So I would like to know which flags can trigger that symbol _ZdlPvm ends up in libQt5Core.so as well ?

0 Kudos
8 Replies
DitiD_Intel
Moderator
2,515 Views

Hi,

 

Thank you for posting in Intel Communities.

 

>> compile the Qt 5.15.0 libs from source with the intel compiler.

 

Could you please provide us the steps that you've followed in order to compile the Qt 5.15.0 libs from source with icpc, so that we can investigate your issue from our end?

 

Thanks and Regards,

Ditipriya.

 

0 Kudos
Joe_the_dev
Beginner
2,493 Views

If I build Qt (5.15.0) from sources on Linux the standard way for c++14 (and c++11, but that made no difference) as described here:
https://doc.qt.io/qt-5/linux-building.html
on our RHEL 7 box,
I get a reference to _ZdlPvm in libQt5Core.so.5 like:
objdump -T libQt5Core.so.5 | grep _ZdlPvm
0000000000000000 DF *UND* 0000000000000000 CXXABI_1.3.9 _ZdlPvm

and the implementation / definition is in libstdc++.so:
objdump -T rhel/7/GCCcore/7.3.0/lib64/libstdc++.so | grep _ZdlPvm
00000000000a3570 g DF .text 0000000000000008 CXXABI_1.3.11 _ZdlPvmSt11align_val_t
00000000000a1460 g DF .text 0000000000000005 CXXABI_1.3.9 _ZdlPvm

But I got a an executable with a set of shared libs which expects that _ZdlPvm is defined for version Qt_5, like:
objdump -T <shard lib> | grep _ZdlPvm
0000000000000000 DF *UND* 0000000000000000 Qt_5 _ZdlPvm

and I have an older set of Qt libs (not compatible with the current exe and libs) where _ZdlPvm is defined in libQt5Core.so like:

objdump -T libQt5Core.so|grep _ZdlPvm
000000000042d330 g DF .text 0000000000000005 Qt_5 _ZdlPvm

That was build with an intel compiler but I do not know which one and what were the compiler flags.

But my conclusion is that it is possible to build the Qt libs in such a way that the implementation of _ZdlPvm ends up in libQt5Core.so for version Qt_5 instead of libQt5Core.so references _ZdlPvm for version CXXABI_1.3.9.
(Also googling for '_ZdlPvm undefined Qt_5' shows several hits, but none of the found items indicates how you get  _ZdlPvm in libQt5Core.so for version Qt_5)

But may be this is not dependent on compiler flags but a setting on the system.

I just would like to know how I can build Qt with an intel compiler in such a way that I get this:

objdump -T libQt5Core.so|grep _ZdlPvm
000000000042d330 g DF .text 0000000000000005 Qt_5 _ZdlPvm

I am doing more reading on symbol versioning, may be that results in a hint.

0 Kudos
DitiD_Intel
Moderator
2,438 Views

Hi,


>> icpc has a lot of optimisation flags, I tried a few (-ipo, -ffreestanding) but no luck.


Could you please try compiling without using the -ffreestanding flag?

In case you're still facing any issues, please do let us know.


Thanks & Regards,

Ditipriya.


0 Kudos
DitiD_Intel
Moderator
2,417 Views

Hi,


We've not heard back from you. Can you please provide an update?


Thanks and Regards,

Ditipriya.



0 Kudos
Joe_the_dev
Beginner
2,411 Views

Compiling without the -ffreestanding flag, yes I did that initially.
That does not result in what I want to accomplish.

0 Kudos
DitiD_Intel
Moderator
2,376 Views

Hi,

 

I tried building QT5 but ended up with certain errors in the configuration step.

 

For more information, please refer to the attached log file and screenshot.

 

Did you also face the same issue?

 

I noticed that you are using an older version of icpc.

 

Could you please try compiling with the latest classic compiler(2021.5)?

 

Even better, if you can upgrade to icx because the C++ Classic compiler will enter "Legacy Product Support" mode signaling the end of regular updates.

 

Please see the below article for more details.

 

https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.h... 

 

Thanks and Regards,

Ditipriya.

 

0 Kudos
DitiD_Intel
Moderator
2,326 Views

Hi,


We've not heard back from you. Can you please provide an update?


Thanks and Regards,

Ditipriya.


0 Kudos
DitiD_Intel
Moderator
2,252 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Thanks & Regards,

Ditipriya.



0 Kudos
Reply