Program won't run due to ABI version(?) mismatch between program and library

438 views
Skip to first unread message

JP LeBreton

unread,
May 20, 2018, 3:10:16 AM5/20/18
to wx-users
SLADE (http://slade.mancubus.net) is a program I've used for years now, and have always compiled from the latest git master branch without problems. My most recent compile didn't show anything out of the ordinary, but when I tried to run it I got this error:

Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.1.0 (wchar_t,compiler with C++ ABI 1011,wx containers,compatible with 3.0),
and your program used 3.1.0 (wchar_t,compiler with C++ ABI 1012,wx containers,compatible with 3.0).

So as I understand it, the ABI version of the libraries installed on my system by my package manager (pacman) is slightly older than what my system's compiler uses. How could I fix this? Is this a wx issue? I brought it up with SLADE's project leads and they didn't seem to know why this would happen or how to fix it. I don't know a whole lot about CMake or GCC; compiling from source is just how I've been doing it to access the program's latest features (plus the project doesn't offer compiled Linux binaries).

Happy to provide more info. Thanks!


Vadim Zeitlin

unread,
May 20, 2018, 10:40:54 AM5/20/18
to wx-u...@googlegroups.com
On Sat, 19 May 2018 19:37:33 -0700 (PDT) JP LeBreton wrote:

JL> SLADE (http://slade.mancubus.net) is a program I've used for years now,

We really should add a screenshot of the Doom monster to our collection
of the screenshots on the web site...

JL> and have always compiled from the latest git master branch without
JL> problems. My most recent compile didn't show anything out of the
JL> ordinary, but when I tried to run it I got this error:
JL>
JL> Fatal Error: Mismatch between the program and library build versions
JL> detected.
JL> The library used 3.1.0 (wchar_t,compiler with C++ ABI 1011,wx
JL> containers,compatible with 3.0),
JL> and your program used 3.1.0 (wchar_t,compiler with C++ ABI 1012,wx
JL> containers,compatible with 3.0).

This happens because the library was compiled by g++-6 (or earlier) while
the application was compiled by g++-7 (or later), as ABI has changed in
g++-7.

JL> How could I fix this?

The most straightforward and robust solution, which always works, is to
rebuild both the library and the application using the same compiler
version.

But in this particular case, it so happens that I just did

https://github.com/wxWidgets/wxWidgets/commit/610db240a8c8c36672f44e34fb0b368b983f1473

a couple of days ago, which relaxes the ABI check because, AFAICS, the
changes between 1011 and 1012 don't affect wxWidgets. So you could also
update to the latest wxWidgets master (or cherry-pick just the commit above
to the version you're using) to fix it too.

JL> Is this a wx issue?

Not really an issue, no, this is the intentional behaviour as checking ABI
compatibility is a useful safeguard: it's better to abort on startup with a
(relatively) clear error message rather than crash mysteriously later. It's
just that in this case the safeguard was a bit too constraining...

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages