GCC update - linking problems! 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.
Ilya333
Earned some good credits
Earned some good credits
Posts: 136
Joined: Sun Jan 11, 2015 3:30 pm

Re: GCC update - linking problems!

Post by Ilya333 »

Well, I have upgraded my Ubuntu from the previous version (14.10).
I was working on a project that could have been successfully built before the GCC update. I have slightly modified it, tried to recompile it and got an error on its launch (undefined characters). It was not with wxWidgets, but with source-built Crypto++. I have rebuilt it, and compilation was quite successful, but when I launched my application, nothing happened. Then, I have launched it from console and received a message that you have probably seen in my first post:
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1008,wx containers,compatible with 2.8).
Emergency stop (memory dump).
That is what made me think that GCC 5.1.x is not compatible with the previous one (whatever it is).
Which information should I find in Syanptic?
Last edited by Ilya333 on Wed May 27, 2015 1:17 pm, edited 2 times in total.
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: GCC update - linking problems!

Post by DavidHart »

Which information should I find in Syanptic?
Put gcc (or g++) in the 'Search' box. That will show what packages are available, and which are already installed.
but with source-built Crypto++
Perhaps if you had rebuilt that too, the program would have run successfully.

But if you don't care which gcc version you're using, and you're not planning on distributing its binary, there's no great need to change what you are currently doing.
Ilya333
Earned some good credits
Earned some good credits
Posts: 136
Joined: Sun Jan 11, 2015 3:30 pm

Re: GCC update - linking problems!

Post by Ilya333 »

I have rebuilt Crypto++ and attempted to recompile my application before that message appeared; I decided to build wxWidgets from source only after this console output.
By the way, here is my similar discussion about Crypto++: https://groups.google.com/forum/m/#!top ... biWs2yF2_c
Ilya333
Earned some good credits
Earned some good credits
Posts: 136
Joined: Sun Jan 11, 2015 3:30 pm

Re: GCC update - linking problems!

Post by Ilya333 »

http://www.ubuntufree.com/ubuntu-15-10- ... y-default/
It seems to me that GCC upgrade on my PC is not really correct... According to this article, I should still have 4.9.2 as a default compiler...
UPD. Same information on distrowatch.com... Now assuming that may have been either a bug in ubuntu-software-updater, or something wrong on Russian Ubuntu server... The only thing I'm still sure about is that it's not a manual installation, as I have used neither Synaptic, not apt-get install when it updated.
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: GCC update - linking problems!

Post by DavidHart »

As I said, my vivid box is still on 4.9.2. There's nothing to stop you reverting to that version.
Ilya333
Earned some good credits
Earned some good credits
Posts: 136
Joined: Sun Jan 11, 2015 3:30 pm

Re: GCC update - linking problems!

Post by Ilya333 »

How can I do that? (⌒_⌒;)

UPD. Most of instructions contain something like update-alternatives --query gcc, but in my case its output is:

Code: Select all

 update-alternatives: error: no alternatives for gcc 
UPD 2. Synaptic shows that the following packages are installed: gcc, gcc-5-base, gcc-4.9-base, gcc-4.8-base, libgcc1, libcc1-0, gcc-5-dev, gcc-4.9-dev, gcc-4.8-dev, gcc-5, cpp, cpp-4.8, cpp-4.9, clang.

UPD 3. Is it a good idea to simply change the /usr/bin/gcc and /usr/bin/g++ links to reference gcc-4.9 and g++-4.9, not gcc-5 and g++-5?

UPD 4. I have found out that the g++-4.9 package was not installed at all! Installed it, now thinking about repacing that links.

UPD 5. Downgraded successfully, reconfigured all projects.

Thanks for help!
Post Reply