0

I've just update my MAC OS Mountain Lion's compiler to gcc 4.8.1, the configure & install process is:

./configure --prefix=/usr
make
sudo make install

the GCC 4.8.1 was installed completely, but then I found I cannot open my Chrome, as well as several other programs. I've check the error report, the most important information is:

Dyld Error Message:
    Library not loaded: /usr/lib/libstdc++.6.dylib
    Referenced from: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    Reason: no suitable image found.  Did find:
    /usr/lib/libstdc++.6.dylib: mach-o, but wrong architecture
    /usr/lib/libstdc++.6.dylib: mach-o, but wrong architecture

So what should I do to solve this? Recompile GCC with proper architecture? But how to do this?

Zhao Zhang
  • 399
  • 1
  • 3
  • 14

2 Answers2

2

You have overwritten several system libraries with incompatible versions. You will need to reinstall Mac OS X.

Don't install software with --prefix=/usr. That prefix is reserved for software distributed with the operating system. Use /usr/local for software you install yourself. You may want to try Homebrew instead once you've reinstalled.

  • I'm now trying to rebuild gcc 4.8.1 with --perfix=/usr --enable-multiarch option and reinstall again, could it be useful? The error message just said found wrong arch.. – Zhao Zhang Sep 21 '13 at 05:44
  • No, it's still the wrong version. You will need to reinstall Mac OS X. –  Sep 21 '13 at 15:23
  • I've reinstalled Mac OS X and all these programs back online again. Thank you for help~~~ – Zhao Zhang Sep 22 '13 at 16:36
0

Since libstdc is deprecated and removed in iOS12, you need to update your dependencies to use libc++ or manually add libstdc. For manually adding refer this - answer

Fenil
  • 1,194
  • 10
  • 11