Distributed Lib - ABI Mismatch Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 80
Joined: Thu Nov 16, 2017 9:32 pm

Distributed Lib - ABI Mismatch

Post by saifcoder »

Our customers use our product developed in wx3.1/C++, On part of our product must be compiled every time the customer use it, its a small C++ file.

The problem is the wx3.1 lib distributed to our customers compiled by GCC 6.0, but the same customers have GCC 7 / 8 now.. then the recompiling of the small C++ file fail in linking stage, due a ABI mismatch

Code: Select all

The library used 3.1.1 with C++ ABI 1002
and your program used 3.1.1 with C++ ABI 1011 / 1012..
So, what is the best solutions ?

1 - Recompiling wx3.1 lib by GCC 8, then re-distribute to all customers.
2 - Compiling the small C++ file with old ABI.. D_GLIBCXX_USE_CXX11_ABI=0

If we use solution 1, whats will happen to customers that have GCC 5, 6, 7, when they use lib compiled by gcc 8 ?

Thank you,
Last edited by saifcoder on Tue Sep 04, 2018 1:09 pm, edited 1 time in total.
Debian 9 - GCC 6 - wxWidgets 3.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 80
Joined: Thu Nov 16, 2017 9:32 pm

Re: ABI Mismatch between the program and library

Post by saifcoder »

PS: This is not duplicated post, in this situation, the lib is distributed to different users, and need to re-compiling a small C++ file before linking with the lib.

Thank you,
Debian 9 - GCC 6 - wxWidgets 3.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Distributed Lib - ABI Mismatch

Post by catalin »

The best solution is probably a 3rd: update the library code to latest master or patch it with the relevant change only.
It was recently addressed by relaxing that check because of g++7 ABI changes.
User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 80
Joined: Thu Nov 16, 2017 9:32 pm

Re: Distributed Lib - ABI Mismatch

Post by saifcoder »

Your solution work fine,
Thank you catalin,
Debian 9 - GCC 6 - wxWidgets 3.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
Post Reply