Chrome package, wrong gcc here.

I continually get this error from the upstream package. Wondering if any gcc knowledgeable FreeBSD user knows why this occurs and/or a workaround.

Code:
# ldd /usr/local/share/chromium/chrome |grep gcc

libstdc++.so.6 => /usr/local/lib/gcc47/libstdc++.so.6 (0x2f3b8000)
libgcc_s.so.1 => /usr/local/lib/gcc48/libgcc_s.so.1 (0x2f4bc000)

# zsh startchrome.zsh

/usr/local/lib/gcc47/libstdc++.so.6: version GLIBCXX_3.4.18 required by /usr/local/share/chromium/chrome not found
 
Code:
# ldd /usr/local/bin/dosbox |grep -i gcc
libstdc++.so.6 => /usr/local/lib/gcc47/libstdc++.so.6 (0x285b2000)
libgcc_s.so.1 => /usr/local/lib/gcc49/libgcc_s.so.1 (0x286b6000)

# /usr/local/bin/dosbox
/usr/local/lib/gcc47/libstdc++.so.6: version GLIBCXX_3.4.20 required by /usr/local/bin/dosbox not found
Unfortunately, it is also prevalent in other programs on this machine... although not the same exact error.
 
Your libstdc++.so.6 is probably too old. Try nm /usr/local/lib/gcc47/libstdc++.so.6 | grep GLIBCXX_3.4.18 to verify.

My bet would be: you installed gcc-4.9, but without C++ support, so the dynamic linker finds libstdc++.so.6 from the older gcc-4.7
 
Conjecture that anyone knows that long term solution may be to craft a line in /etc/libmap.conf and/or only install one of the gcc ports and never have a second one installed, rebuilding anything that depends on a second version? I've seen a post about the former method but am ignorant about the feasibility of the latter method or if it is wise. Or missing lines in one of the make.conf files, of which there are too many here not under version control.
Code:
CXX=g++49;
....
CPP=gcc++47;
....
CC=gcc49;
as I have inexact copy-pastes of these sort of specifications throughout several versions of the file with no real clue as to a preferred standard all-inclusive set of lines to put into each and every one of the files.
 
Back
Top