gcc/g++ don't work in home folder
Mahmood Naderan
nt_mahmood@yahoo.com
Sat Feb 9 08:45:00 GMT 2013
Hi
I have these versions of gcc/g++
$ ls /usr/bin/gcc* -l
lrwxrwxrwx 1 root root 7 Mar 13 2012 /usr/bin/gcc -> gcc-4.6
-rwxr-xr-x 1 root root 92888 Mar 16 2006 /usr/bin/gcc-3.4
-rwxr-xr-x 1 root root 259232 Apr 16 2012 /usr/bin/gcc-4.4
-rwxr-xr-x 1 root root 353216 Apr 16 2012 /usr/bin/gcc-4.6
$ ls -l /usr/bin/g++*
lrwxrwxrwx 1 root root 7 Mar 13 2012 /usr/bin/g++ -> g++-4.6
-rwxr-xr-x 1 root root 94808 Mar 16 2006 /usr/bin/g++-3.4
lrwxrwxrwx 1 root root 52 Feb 6 23:32 /usr/bin/g++-4.1 -> /opt/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/g++
-rwxr-xr-x 1 root root 263328 Apr 16 2012 /usr/bin/g++-4.4
-rwxr-xr-x 1 root root 357312 Apr 16 2012 /usr/bin/g++-4.6
I don't know what happened to my ubuntu 12.04, that when I run "g++" command in the home folder, I get weird response
mahmood@pc:~$ g++ -v
Reading specs from ./specs
g++: ./specs: Is a directory
mahmood@pc:~$ /usr/bin/gcc-4.4 -v
Reading specs from ./specs
gcc-4.4: ./specs: Is a directory
mahmood@pc:~$ /usr/bin/g++-4.6
g++-4.6: error: ./specs: Is a directory
'specs' is a folder in my home. However when I run the same command in another folder (~/trunk), there is no problem.
mahmood@pc:trunk$ g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --disable-multilib
Thread model: posix
gcc version 4.1.2
mahmood@pc:trunk$ /usr/bin/gcc-4.4 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.7-1ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu2)
mahmood@pc:trunk$ /usr/bin/g++-4.6
g++-4.6: fatal error: no input files
compilation terminated.
This is the first time I see such a problem.
Regards,
Mahmood
More information about the Gcc-help
mailing list