Results 1 to 9 of 9

Thread: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

  1. #1
    Join Date
    Oct 2010
    Location
    Dayton, Ohio
    Beans
    75
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    I'm not sure if this is a linking error or a GCC error, and it's system-wide. I'm not sure when exactly it introduced - but it impacts anything where you have to "configure" first.

    Code:
    checking for gcc... gcc
    checking whether the C compiler (gcc  ) works... no
    configure: error: installation or configuration problem: C compiler cannot create executables.
    This bit shows up on EVERY config.log that gets spit out

    Code:
    configure:916: gcc -o conftest    conftest.c  1>&5
    ld: crtbegin.o: No such file: No such file or directory
    configure: failed program was:
    I do have buildessentials (and hence gcc and g++) installed, and I've successfully compiled a lot of stuff before - perhaps there was an upgrade that broke something? If so, what do I do to fix this?

    I wasn't planning to upgrade yet (more like the end of summer), so if there's a solution that doesn't involve wiping and reinstalling, I'll be thrilled.
    I inject people with radioactive stuff for a living. But only to serve the forces of good.
    webpage | blog

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    crtbegin.o is part of gcc. If you don't have it, your gcc install is corrupt. Try to reinstall:

    Code:
    sudo apt-get install -reinstall gcc-VERSION
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Oct 2010
    Location
    Dayton, Ohio
    Beans
    75
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    Reinstalled, but no dice. Is uninstalling and explicitly reinstalling any different than what I just did?
    I inject people with radioactive stuff for a living. But only to serve the forces of good.
    webpage | blog

  4. #4
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    Normally no. Make sure the file is actually not there. It should be in /usr/lib/gcc/PLATFORM/VERSION.
    「明後日の夕方には帰ってるからね。」


  5. #5
    Join Date
    Oct 2010
    Location
    Dayton, Ohio
    Beans
    75
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    Oh-HO! While there's a full install under /usr/lib/gcc/i486-linux-gnu/4.4/, I also have /usr/lib/gcc/i486-linux-gnu/4.4.3/ . And that latter only has cc1 in it.

    So the best question here is this - symlink or copy files? (I'm guessing I should do one or the other.)
    I inject people with radioactive stuff for a living. But only to serve the forces of good.
    webpage | blog

  6. #6
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    I think normally 4.4.3 should be a symlink to 4.4. Here 4.6.1 is a symlink to 4.6. Before you do anything, what gcc packages do you have installed?

    Code:
    dpkg -l | grep gcc
    「明後日の夕方には帰ってるからね。」


  7. #7
    Join Date
    Oct 2010
    Location
    Dayton, Ohio
    Beans
    75
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    Code:
    ii  gcc                                                         4:4.4.3-1ubuntu1                                The GNU C compiler
    ii  gcc-4.4                                                     4.4.3-4ubuntu5.1                                The GNU C compiler
    ii  gcc-4.4-base                                                4.4.3-4ubuntu5.1                                The GNU Compiler Collection (base package)
    ii  gccxml                                                      0.9.0+cvs20090916-1                             XML output extension to GCC
    ii  libgcc1                                                     1:4.4.3-4ubuntu5.1                              GCC support library
    (10.04, so I don't have 4.6...)
    I inject people with radioactive stuff for a living. But only to serve the forces of good.
    webpage | blog

  8. #8
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    Your packages seem right... Since I don't have a Lucid system, I don't know if having a separate 4.4.x dir is how it's supposed to be or not. Guess you can always try uninstalling and reinstalling.
    「明後日の夕方には帰ってるからね。」


  9. #9
    Join Date
    Oct 2010
    Location
    Dayton, Ohio
    Beans
    75
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: GCC/Linker cannot produce executable code (crtbegin.o on 10.04)

    I went ahead and copied the contents of 4.4 over... and suddenly I can compile again. It's probably wrong, but it's getting the job done until I do a clean upgrade down the road.

    Thanks for your help; I wouldn't have known where to look otherwise.
    I inject people with radioactive stuff for a living. But only to serve the forces of good.
    webpage | blog

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •