gcc-4.6: error trying to exec 'cc1'

Bug #863589 reported by Juan Simón
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When I try to compile with gcc-4.6, it shows this error:
"gcc-4.6: error trying to exec 'cc1': execvp: No such file or directory"

This file exist in: "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1"
But gcc doesn't search in that folder:
$ gcc -print-search-dirs
install: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/
programs: =/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/bin/
libraries: =/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/:/lib/x86_64-linux-gnu/4.6.1/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/4.6.1/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../:/lib/:/usr/lib/

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gcc 4:4.6.1-2ubuntu5
ProcVersionSignature: Ubuntu 3.0.0-12.19-core2 3.0.4-ck1
Uname: Linux 3.0.0-12-core2 x86_64
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
Date: Fri Sep 30 21:22:31 2011
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
DistroRelease: Ubuntu 11.10
Package: cpp-4.6 4.6.1-9ubuntu3
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 3.0.0-12.19-core2 3.0.4-ck1
Tags: oneiric running-unity
Uname: Linux 3.0.0-12-core2 x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin audio cdrom fuse lp lpadmin netdev nopasswdlogin plugdev sambashare vboxusers video

Revision history for this message
Juan Simón (simonbcn) wrote :
Revision history for this message
Juan Simón (simonbcn) wrote :

The bug is in package "cpp-4.6"

tags: added: apport-collected
description: updated
Revision history for this message
Juan Simón (simonbcn) wrote : Dependencies.txt

apport information

Revision history for this message
Juan Simón (simonbcn) wrote : ProcEnviron.txt

apport information

Revision history for this message
Juan Simón (simonbcn) wrote :

This bug is silly but important. I can't install nvidia-current in kernel with DKMS. I can't compile nothing.

Revision history for this message
Juan Simón (simonbcn) wrote :

A workaround is:
"sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/* /usr/lib/gcc/x86_64-linux-gnu/4.6.1/"

Revision history for this message
Matthias Klose (doko) wrote :

/usr/lib/gcc/x86_64-linux-gnu/4.6.1 is a symlink to /usr/lib/gcc/x86_64-linux-gnu/4.6. I assume you did mess it up with you "work arounds". just apt-get remove cpp-4.6, and rm -rf /usr/lib/gcc/x86_64-linux-gnu, and re-install

Changed in gcc-4.6 (Ubuntu):
status: New → Invalid
Revision history for this message
Juan Simón (simonbcn) wrote :

1) The problem was present before my workaround.

2) 4.6.1 isn't (nor was) a symlink of nothing:
$ ll /usr/lib/gcc/x86_64-linux-gnu/
drwxr-xr-x 7 root root 4096 2011-09-30 10:32 4.5.3/
drwxr-xr-x 4 root root 4096 2011-09-30 21:24 4.6/
drwxr-xr-x 7 root root 4096 2011-09-30 21:43 4.6.1/

3) And how can I remove a package like "cpp-4.6" that has a lot of dependencies without remove that dependencies?

This was an upgrade from Natty.

Revision history for this message
Juan Simón (simonbcn) wrote :

And there is several packages that write in "/usr/lib/gcc/x86_64-linux-gnu", not only "cpp-4.6":
g++-4.6
gcc-4.6
gcc-4.6-base
gcj-4.6-jdk
libstdc++6-4.6-dev

Revision history for this message
Juan Simón (simonbcn) wrote :

I have tried this:
$ sudo rm -r /usr/lib/gcc/x86_64-linux-gnu/4.6.1
rm: cannot remove `/usr/lib/x86_64-linux-gnu/4.6.1': No such file or directory

And now:
$ ls -Fl /usr/lib/gcc/x86_64-linux-gnu/
total 8
drwxr-xr-x 7 root root 4096 2011-09-30 10:32 4.5.3/
drwxr-xr-x 4 root root 4096 2011-09-30 21:24 4.6/
lrwxrwxrwx 1 root root 3 2011-09-16 16:27 4.6.1 -> 4.6/

Now it seems to work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.