Solved Qt5: gcc48/libstdc++.so.6: version CXXABI_1.3.9 not found

I'm trying to build a simple Qt5 program and getting such error.
The Makefile is created by qmake and contains:
Code:
....
CC            = gcc
CXX           = g++
....
Let's see what is gcc:
Code:
% ll /usr/local/bin/gcc
lrwxr-xr-x  1 root  wheel  4 Oct 19 00:40 /usr/local/bin/gcc@ -> gcc6
Then I ran make and got the executable without errors and warnings. However, when trying to run it I get:
Code:
% ./qt5test
/usr/local/lib/gcc48/libstdc++.so.6: version CXXABI_1.3.9 required by /tmp/test/qt5test not found
Where this reference to gcc48 library comes from?
Thanks for ideas and directions!
 
Update:
Trying to get rid of gcc helps! In Makefile I replaced:
gcc -> clang
g++
-> clang++
and added
-std=c++11 flag.
Works as expected (at least for my simple program).
So, for some reason qt5-xxx packages default to gcc48 which makes no sense since it's deprecated.
 
Uhm yes GCC48 is very much outdated. For me, I will use QtCreator to have a visual environment. I'm amateur :)
 
I will use QtCreator to have a visual environment.
I used to use QtCreator for large projects, but for something really simple it's overkill IMO.
Also, QtCreator will use the same tools anyway. I bet I'll see the same result.
I can accept that a Makefile created by qmake defaults to gcc, but how a program built with gcc6 is linked against a gcc48 library?..
 
Probably a screwed up ldconfig path with /usr/local/lib/gcc48 before /usr/local/lib/gcc6 (both gcc48 and gcc6 install their own libstdc++.so.6). Do you have a reason to keep gcc48 installed?
 
Do you have a reason to keep gcc48 installed?
Good question! I always have been under impression that it was installed as a dependency of bhyve firmware:
Code:
# pkg remove gcc48
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 4 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
    gcc48-4.8.5_7
    uefi-edk2-bhyve-20160704_2
    uefi-edk2-bhyve-csm-20160704_2
    bhyve-firmware-1.0
Just updated these packages and got rid of gcc48! Thanks!

Now qmake defaults to clang, which is good. It missed -std=c++11 flag needed by Qt5 though, but that's a minor problem.
 
Back
Top