GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So after that, everything was updated except build dependencies and packages that had a use flag change on them, so I believe building one of the build dependencies failed causing all the problems I am having. I did:
Code:
emerge --update --deep --with-bdeps=y --newuse world
So I would often get the message
Code:
configure: error: C compiler cannot create executables
See `config.log' for more details
So, what I did is get another gcc compiler as a bin package, and set it as my default with gcc-config.
I then tried to rebuild libtool. Again, I got the same message:
Code:
bullshark@beastlinux ~ % sudo emerge -av --oneshot libtool
Password:
* IMPORTANT: 3 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-devel/libtool-2.4-r1 USE="-test -vanilla*" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-devel/libtool-2.4-r1
* libtool-2.4.tar.xz RMD160 SHA1 SHA256 size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking ./libtool-2.4.tar to /var/tmp/portage/sys-devel/libtool-2.4-r1/work
>>> Source unpacked in /var/tmp/portage/sys-devel/libtool-2.4-r1/work
>>> Preparing source in /var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4 ...
* Applying libtool-1.5.20-use-linux-version-in-fbsd.patch ... [ ok ]
* Running eautoreconf in '/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4/libltdl' ...
* Running true --install --copy --force --automake ... [ ok ]
* Running aclocal -I m4 ... [ ok ]
* Running autoconf ... [ ok ]
* Running autoheader ... [ ok ]
* Running automake --add-missing --copy --foreign ... [ ok ]
* Running eautoreconf in '/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4' ...
* Running true --install --copy --force --automake ... [ ok ]
* Running aclocal -I libltdl/m4 ... [ ok ]
* Running autoconf ... [ ok ]
* Running autoheader ... [ ok ]
* Running automake --add-missing --copy ... [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4 ...
* econf: updating libtool-2.4/libltdl/config/config.sub with /usr/share/gnuconfig/config.sub
* econf: updating libtool-2.4/libltdl/config/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --dat
adir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib
## ----------------------- ##
## Configuring libtool 2.4 ##
## ----------------------- ##
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
configure: autobuild project... GNU Libtool
configure: autobuild revision... 2.4 ()
configure: autobuild hostname... beastlinux
configure: autobuild mode... default
configure: autobuild timestamp... 20120715T164750Z
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4/config.log
* ERROR: sys-devel/libtool-2.4-r1 failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 85: Called src_configure
* environment, line 2807: Called default
* phase-functions.sh, line 798: Called _eapi2_src_configure
* phase-helpers.sh, line 567: Called econf
* phase-helpers.sh, line 467: Called die
* The specific snippet of code:
* die "econf failed"
*
* If you need support, post the output of `emerge --info '=sys-devel/libtool-2.4-r1'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/libtool-2.4-r1'`.
/usr/lib/portage/bin/isolated-functions.sh: line 214: wait: `econf failed': not a pid or valid job spec
* The complete build log is located at '/var/tmp/portage/sys-devel/libtool-2.4-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/libtool-2.4-r1/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4'
* S: '/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4'
>>> Failed to emerge sys-devel/libtool-2.4-r1, Log file:
>>> '/var/tmp/portage/sys-devel/libtool-2.4-r1/temp/build.log'
* Messages for package sys-devel/libtool-2.4-r1:
* ERROR: sys-devel/libtool-2.4-r1 failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 85: Called src_configure
* environment, line 2807: Called default
* phase-functions.sh, line 798: Called _eapi2_src_configure
* phase-helpers.sh, line 567: Called econf
* phase-helpers.sh, line 467: Called die
* The specific snippet of code:
* die "econf failed"
*
* If you need support, post the output of `emerge --info '=sys-devel/libtool-2.4-r1'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/libtool-2.4-r1'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/libtool-2.4-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/libtool-2.4-r1/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4'
* S: '/var/tmp/portage/sys-devel/libtool-2.4-r1/work/libtool-2.4
your post said you solved it, how?
I'm have built LFS 7.1 and it boots. now been going through BLFS and every thing I try to install gets that same error,
configure:3306: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3317: $? = 1
configure:3306: gcc -qversion >&5
gcc: error: unrecognized option '-qversion'
gcc: fatal error: no input files
compilation terminated.
thanks for your help
yelims
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495
Original Poster
Rep:
Here's how I solved it, and please let me know if this fixes your LFS.
Yelims, of course, you will have to do things a bit different in LFS because you're not using emerge, and I don't know if you can put binary packages in LFS. If not, maybe you can extract the contents of http://tinderbox.dev.gentoo.org/defa...2.21.1-r1.tbz2 (that's for x86, so if you're using something else, browse to the right url patch) except for gentoo specific files (probably won't hurt). Hopefully your filesystem layout (paths) are the same or adjust accordingly. Keep reading to see why I used binutils. It might be a different package (or source tarball) that needs to be reinstalled with your system.
Notice that when I made the simple hello.c
Code:
#include <stdio.h>
main() {
printf("Hello Working GCC\n");
}
Even if you're not getting the same error as me, the error message you get will be useful in troubleshooting your problem.
Notice it says binutils in there, so that gave me the idea to reinstall binutils, couldn't hurt to try.
I already had setup my Gentoo installation to be able to use binary packages so that I could get a working gcc. I will write how I did that for anybody that's also using Gentoo.
Important, if you've read the gcc upgrading guide on the gentoo docs, it says to rebuild libtools.
Also downgrading gcc is highly discouraged and says it will result in strange behaviour, so do not use this gcc to compile anything but a newer gcc
And it will likely be an older gcc.
After emerging the new gcc, set it as your default gcc with gcc-config (See gentoo docs on upgrading gcc for more details on how to do this.)
Now you've to repeat the process because you just changed gcc versions again. Also, because I wanted all my packages compiled with source using my CFLAG's and USE flags, I recompiled binutils
Note: If you haven't figured out what the . does when used this way, it's an alias to source, so if you really wanted to, you could just source /etc/profile. Both will give you the same result.
Now you've got a working Gentoo system again!
Also Gentoo had put in my user's .bashrc (and .zshrc because I use zsh also) export PATH=..... with a path to the gcc versions bin directory. Probably not relevant, but since I use sudo and have configured, added my user to the wheel group and configured it so that it prompts me for the password to run a command as root, i added all the sbin (system binary) paths to my .bashrc (and .zshrc) with
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495
Original Poster
Rep:
You may have to build it on another machine because you can't build anything right now. After you build it on another machine, copy the folder with the binaries and source to your LFS machine and then run the make install.
@fakie - I have peruzed these forums for quite some time now and have always thought it was too much trouble to register to get in on the action. But sweet jesus, you just saved my machine!!! So I thought I should take the time to at least thank you.
Despite the fact that I do not run Gentoo (Arch user personally, although I spent some time with Gentoo), this diagnotic trick of creating the hello.c was simply genius. I was straining my eyes over that stupid log file, messing with this and that, trying to compile this and that, and even went so far as to begin the initial steps of downgrading my entire system when I came across your post. So you just saved me from possibly severyle breaking my install, thanks!
By the way, my problem was with a file owned by glibc, which during a recent update moved /lib to /usr/lib and symlinked the original. Needless to say, for me this move was not entirely smooth for me. So resintallation of glibc fixed it for me. Cheers!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.