# GF18: Emerge fails after upgrading gcc. libstdc++.la missing

## kallamej

Navigation: [Gentoo Fundamentals] [Table of Contents]

Q: I have upgraded gcc and now emerge fails with messages such as

```
grep: /usr/lib/gcc-lib/i686-pc-linux-gnu/<old_version>/libstdc++.la: No such file or directory.
```

What should I do?

A: This typically happens because some packages have hard coded the path to libstdc++.la. Run

```
fix_libtool_files.sh <old_version>
```

to fix it. Note that you may have to run 

```
env-update && source /etc/profile
```

first. Note also that you may run into problems if you have changed the default root umask.

Q: That's all nice, but the CHOST (i686-pc-linux-gnu above) is incorrect as well.

A: Then you have to pass the --oldarch flag to fix_libtool_files.sh:

```
fix_libtool_files.sh <old_version> --oldarch <incorrect_CHOST>
```

Note that if you're thinking about changing the CHOST setting in /etc/make.conf it should be made with caution.

Further reading: libstdc++.la: No such file or directory - errors and tips

[resolved] Problems after upgrade gcc to 3.3.5

People upgrading gcc from <=4.1.0 to >=4.1.0-r1 may want to read bug 73435#c207. This file has as of gcc-4.1.0-r1 been intentionally removed.

2005-03-22: Added --oldarch

2005-04-15: Added Further reading

2006-05-16: Added note about 4.1.0 revision update issue

----------

