LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-02-2021, 04:22 PM   #31
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84

Quote:
Originally Posted by NevemTeve View Post
ToDo's

1. find this libQt5Gui.so.5


2. check is it exports this symbol:
Code:
nm --with-symbol-versions -D libQt5Gui.so.5 |
grep __cxa_throw_bad_array_new_length
3. if it does export it, find out if it accidental or intentional. (This will be the hard part.)
I ran that on a PC where Qt Creator is installed. I have installed it with the sudo command. Perhaps I should have installed it as a regular user?

Anyway, this is interesting

Code:
nm --with-symbol-versions -D /opt/Qt/5.9.9/gcc_64/lib/libQt5Gui.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
00000000004aa800 T __cxa_throw_bad_array_new_length@@Qt_5@@Qt_5

nm --with-symbol-versions -D /opt/Qt/5.12.2/gcc_64/lib/libQt5Gui.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
000000000050f0d0 T __cxa_throw_bad_array_new_length@@Qt_5@@Qt_5

nm --with-symbol-versions -D /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
nothing
Code:
nm --with-symbol-versions -D /opt/Qt/5.9.9/gcc_64/lib/libQt5Widgets.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
nothing

nm --with-symbol-versions -D /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
nothing
Code:
nm --with-symbol-versions -D /opt/Qt/5.9.9/gcc_64/lib/libQt5Core.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
                 U __cxa_throw_bad_array_new_length


nm --with-symbol-versions -D /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
                 U __cxa_throw_bad_array_new_length@@CXXABI_1.3.8@CXXABI_1.3.8
/opt/Qt/5.9.9/gcc_64/lib
is a folder created by the Qt Creator installer. There are a lot of .SO files there and other file types.
libQt5Gui.so.5.9.9
^^^^^My Project uses 5.9.9

There is also Qt 5.12.2 that I can use but the same problem is present
/opt/Qt/5.12.2/gcc_64/lib/
has the file
libQt5Gui.so.5.12.2

Code:
nm --with-symbol-versions -D /opt/Qt/5.12.2/gcc_64/lib/libQt5Gui.so.5 | grep __cxa_throw_bad_array_new_length
Gives:
000000000050f0d0 T __cxa_throw_bad_array_new_length@@Qt_5@@Qt_5
/usr/lib/x86_64-linux-gnu/
has
libQt5Gui.so.5.14.2

~~~~vmelkon
 
Old 01-03-2021, 12:32 AM   #32
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by NevemTeve View Post
ToDo's

1. find this libQt5Gui.so.5


2. check is it exports this symbol:
Code:
nm --with-symbol-versions -D libQt5Gui.so.5 |
grep __cxa_throw_bad_array_new_length
3. if it does export it, find out if it accidental or intentional. (This will be the hard part.)
I asked about it at
https://forum.qt.io/topic/122290/dif...i-so-5-linux/2

So, for me, the problem is solved. I just replaced the offending file in /opt/Qt and recompiled my 3 projects.
Thanks NevemTeve and everyone who tried to help.

~~~~vmelkon
 
Old 01-03-2021, 06:34 AM   #33
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,873
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
I would try this to remove the problematic symbol:
Code:
objcopy --strip-symbol __cxa_throw_bad_array_new_length libQt5Gui.so.5
Then rebuild your executable.
 
Old 01-03-2021, 10:39 AM   #34
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by NevemTeve View Post
I would try this to remove the problematic symbol:
Code:
objcopy --strip-symbol __cxa_throw_bad_array_new_length libQt5Gui.so.5
Then rebuild your executable.
I copied the offending file (libQt5Gui.so.5.9.9) to my home folder
/home/jake

Code:
nm --with-symbol-versions -D libQt5Gui.so.5.9.9 | grep __cxa_throw_bad_array_new_length
Gives:
00000000004aa800 T __cxa_throw_bad_array_new_length@@Qt_5

objcopy --strip-symbol __cxa_throw_bad_array_new_length libQt5Gui.so.5.9.9

nm --with-symbol-versions -D libQt5Gui.so.5.9.9 | grep __cxa_throw_bad_array_new_length
Gives:
00000000004aa800 T __cxa_throw_bad_array_new_length@@Qt_5
I also tried
Code:
nm --with-symbol-versions -D /home/jake/libQt5Gui.so.5.9.9 | grep __cxa_throw_bad_array_new_length
Gives:
00000000004aa800 T __cxa_throw_bad_array_new_length@@Qt_5

objcopy --strip-symbol __cxa_throw_bad_array_new_length /home/jake/libQt5Gui.so.5.9.9

nm --with-symbol-versions -D /home/jake/libQt5Gui.so.5.9.9 | grep __cxa_throw_bad_array_new_length
Gives:
00000000004aa800 T __cxa_throw_bad_array_new_length@@Qt_5
so it looks like it was not able to remove it.
However, that is a neat idea.

~~~~vmelkon

Last edited by vmelkon; 01-03-2021 at 10:41 AM.
 
Old 01-03-2021, 11:55 AM   #35
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,873
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871

I've Just checked, It doesn't affect dynamic symbols.
 
Old 01-03-2021, 12:28 PM   #36
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,966

Rep: Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332Reputation: 7332
from my point of view: if the given shared object needs that [any] symbol you need to "serve"it, so you need to use it with the required and compatible libraries.
Actually the available libstdc++ and libQt5Gui.so.5 are not compatible with each other. Or if you build that so: the development/build environment and the runtime environment are different, incompatible.
 
Old 01-03-2021, 06:58 PM   #37
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by pan64 View Post
from my point of view: if the given shared object needs that [any] symbol you need to "serve"it, so you need to use it with the required and compatible libraries.
Actually the available libstdc++ and libQt5Gui.so.5 are not compatible with each other. Or if you build that so: the development/build environment and the runtime environment are different, incompatible.
I didn't build that SO file. It is just the version that QT Creator installs.
Perhaps there is a disagreement going on with boys over at Qt and the boys on the OS side of things.
I'm going to assume that the way done by the OS boys is the right way.

Quote:
Actually the available libstdc++ and libQt5Gui.so.5 are not compatible with each other
Which libQt5Gui.so.5? The one from the OS or the one from Qt Creator?

~~~~vmelkon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysterious NETWORK nonfunctionality - Redhat 8.0 Bungo2000 Linux - Networking 13 12-11-2002 06:53 PM
Mysterious Hop Problem magebeast Linux - Networking 2 05-24-2002 12:48 PM
Mysterious hostname change phil1076 Linux - General 5 12-20-2001 03:06 PM
Mysterious Problem Solved jupiter-eight Linux - General 0 12-07-2001 10:24 PM
Diald and mysterious packed daja58 Linux - Networking 0 12-02-2000 05:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration