Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ABI problem with gcc 6.3.0 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Thu Apr 13, 2017 12:29 am    Post subject: ABI problem with gcc 6.3.0 [SOLVED] Reply with quote

My own ebuild worked with gcc 4.9.4 but I get an abi failure at runtime. Both the application and wxGTK have been rebuilt with gcc 6.3.0
Code:
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8).
Aborted


I don't understand this error message. All four slots of wxGTK have been rebuilt with gcc 6.3.0 and should use the same ABI

Should I try to link statically in the compile phase?


Last edited by Tony0945 on Thu Apr 13, 2017 6:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 494
Location: Estonia

PostPosted: Thu Apr 13, 2017 2:31 am    Post subject: Reply with quote

Your wxGTK using application has to be using the same C++ ABI. Try rebuilding your wxGTK app with gcc-6.3. gcc4.9 and gcc5+ use different C++ ABI and can not work together, if you rebuild a C++ library with gcc5, you need to rebuild all of its consumers with gcc5+ as well.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Thu Apr 13, 2017 12:42 pm    Post subject: Reply with quote

Thank you, Leio. I guess I wasn't clear. I reemerged the application and every variant of wxGTK on the system using 6.3.0, but it still refuses to run with the referenced message.
When I switched to 6.3.0 I ran emerge -e world to rebulid everything. Besides that, when this problem surfaced I re-emerged the application and wxGTK many times. I have other self-built ebuilds using wxGTK that run fine.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Thu Apr 13, 2017 1:22 pm    Post subject: Reply with quote

I found this https://github.com/eranif/codelite/issues/825 and tried it but it just got me:
Quote:
automake-1.15: error: unrecognized option '--disable-assert'.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Apr 13, 2017 3:40 pm    Post subject: Reply with quote

Tony0945 wrote:
Thank you, Leio. I guess I wasn't clear. I reemerged the application and every variant of wxGTK on the system using 6.3.0, but it still refuses to run with the referenced message.
When I switched to 6.3.0 I ran emerge -e world to rebulid everything. Besides that, when this problem surfaced I re-emerged the application and wxGTK many times. I have other self-built ebuilds using wxGTK that run fine.
Yes, but somehow you still have a program compiled with the earlier compiler (ABI): compiler with C++ ABI 1002 vs library with ABI 1010.
Seems to be some fundamental difference between your user login, and the ebuild environment. What gcc does your PATH refer to? (You did run gcc-config I hope.)

What CXXFLAGS are you using? Also, check your shell startup files (.bashrc, .profile, /etc/bash/bashrc, /etc/profile ..)
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Thu Apr 13, 2017 6:47 pm    Post subject: Reply with quote

I went to my source directory and ran "make". Then I ran the new build in src and it worked. Then I ran "make distclean" and rebuilt the tarball and uploaded it to my server.
Then I emerged again and it worked. I think maybe the existing tarball hadn't had "make distclean" run on it and the libray calls were configured for the old ABI.

Thanks Leio and SteveL for your prompt responses.

I'm not sure why I had to do those steps but I now know what to try in the future before going to the forum. Also, a reminder to always distclean before tarring and uploading to my server.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Apr 17, 2017 7:23 am    Post subject: Reply with quote

Tony, that's cool, glad you got it sorted.

If you're working with autotools, I cannot recommend ##workingset highly enough (IRC: chat.freenode.net)

For instance, ISTR that you want to distribute tarballs after make dist, while the vcs stays at distclean.
Gentoo ebuilds then redo autogen, so it doesn't matter to them, as with most distros.

It does matter to end-users, though; or is meant to, at least: the idea being that the configure script is already generated.

##workingset can give you definitive answers, and exact methods. It's full of professionals who use autotools on a daily basis.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Mon Apr 17, 2017 3:32 pm    Post subject: Reply with quote

Thanks, Steve. Still learning about autotools. They seem needlessly complex.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Apr 17, 2017 8:03 pm    Post subject: Reply with quote

Heh, don't get me started.. the original author of autoconf, who wrote it for a student project, was quite upfront about "maybe I shouldn't have used m4" about a year later.
It should just have been done in functional shell, from the get-go.

Instead, you then get perl (which is pita to bootstrap, if we're thinking in the round) on top.. most of that could be done with awk, or a simple preprocessor in C.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1432
Location: Berlin, Germany

PostPosted: Mon Oct 09, 2017 1:54 pm    Post subject: Reply with quote

I've run into this same issue (now several months later), concerning audacity: I've emerged both audacity and wxGTK after selecting the gcc version using gcc-config (which is now 6.4.0), and I nevertheless get the error about mismatched library/program versions as given in the OP.

Aside from building my own custom tarball, is there a way around this error in the portage tree?

Cheers,

EE
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6050
Location: Removed by Neddy

PostPosted: Tue Oct 10, 2017 9:26 am    Post subject: Reply with quote

make sure you recompile the correct slot. a simple emerge wxGTK will only rebuild the latest & this might not be the slot the software can use. I ran into a similar issue with KiCAD
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum