On Fri, May 24, 2019 at 01:22:56AM +0200, Gerhard Gedigk via blfs-support wrote: > I somehow ruined my build system. > > I moved the gcc compiler and some related files to a new directory and > replaced the executables with symlinks to the respective files in the > directory. > > Now every configure crashes with > > checking for gcc... gcc > checking whether the C compiler works... no > configure: error: in `/usr/src/upower-0.9.23': > configure: error: C compiler cannot create executables > > config.log shows > > configure:3653: gcc -V >&5 > gcc: error: unrecognized command line option '-V' > gcc: fatal error: no input files > compilation terminated. > Whenever you get "C compiler cannot create executables", the next thing to do is to look for *that* message in config.log, and then look at the detailed messages which accompany configure's attempt to run the test which produced that original error message.
There will be many other tests run by configure which report apparent errors, all that matters at this point is the ability to create executables. FYI, on a running system the second message you have quoted here is normal: ken@terror ~ $gcc -V gcc: error: unrecognized command line option ‘-V’ gcc: fatal error: no input files compilation terminated. So, two suggestions: 1. Find the original 'cannot create executables' message and look at the messages which accompany it. I will guess that one of the gcc object files can no-longer be found. Possibly, a few more symlinks can eventually fix the breakage (i.e. fix the first file, retry, repeat). If that seems to fix it for C programs, repeat for something using C++ if upower doesn't use that. 2. Move gcc back to where it was (ideally, recover from a backup). You may wish to remove the symlinks first (copying a file during a recovery might follow the symlink). > I have installed rust to /opt as recommended. Meanwhile I removed > /opt/rust/bin from my path and started a new shell, not better. > > Every help is appreciated. > Thanks > Gerhard > In general, moving an installed gcc to a new location is a non-trivial task. Depending on where you moved gcc to, and how it looks for things (I've long forgotten many details) you might also be able to put that at the start of your PATH, i.e. PATH=/some/new/bin:$PATH but I have never tried that and don't know if it would just be a waste of your time. ĸen -- Before the universe began, there was a sound. It went: "One, two, ONE, two, three, four" [...] The cataclysmic power chord that followed was the creation of time and space and matter and it does Not Fade Away. - wiki.lspace.org/mediawiki/Music_With_Rocks_In -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
