1

I am currently trying to build a gcc 4.4 on a newly updated ubuntu 11.10. However building the compiler always fails with some problems, when trying to bootstrap.

First crti.o and crtn.o could not be found. I symlinked them into another directory within the search path, and so I could get a bootstrap compiler. However now it fails with the message:

configure: error: C compiler cannot create executables

I tried out to use the intermediate compiler on a simple test program, and I get the message:

$ ./host-x86_64-unknown-linux-gnu/prev-gcc/xgcc test.c
xgcc: error trying to exec 'cc1': execvp: File or directory not found

So something is seriously messed up with the paths of my intermediate compiler it seems. When I did the same thing on ubuntu 11.04 everything just worked fine.

I used the following command line to configure:

./configure --prefix=/opt --program-suffix=44

I also tried both a VPATH-built, as well as an in source build, but both have the same problem. I still have the gcc44 from before the update lying around within /opt, but it has become unusable since the update.

Is there any easy way to get gcc 4.4 working under Ubuntu 11.10? I does not have to be a self build compiler, if I can just download a package and install that, it would be fine as well.

LiKao
  • 10,408
  • 6
  • 53
  • 91
  • 2
    Examine your configure.log - it should perhaps give your a bit more diagnostics... – Alexander Pavlov Feb 03 '12 at 14:32
  • I did look there... But thanks to your Information I looked a lot closer again at the correct config.log and I found another `crt?.o` file that seems to not have been linked correctly during update. Now it seems to work (at least at first sight). – LiKao Feb 03 '12 at 14:50
  • Another guess: you might be missing libc6-dev (install it as `#apt-get install libc6-dev`) – Alexander Pavlov Feb 03 '12 at 14:51
  • Another thing which strikes me as really odd is that according to the config.log the system could not be identified correctly and was set to `x86_64-unknown-linux-gnu`. Also the gcc 4.5 was build for `Ubuntu/Linaro`. Shouldn't that be `Ubuntu/Oneiric` for 11.10? Somehow I think something went very awfull during the update. – LiKao Feb 03 '12 at 14:54
  • Yes, the rumor has it that it is not desirable to update Ubuntu to non-LTS versions. – Alexander Pavlov Feb 03 '12 at 14:57
  • @AlexanderPavlov: `libc6-dev` is present in version 2.13-20. Unless the update removed any necessary dependencies, everything should be present. I was able to build gcc 4.4 just fine before the update. – LiKao Feb 03 '12 at 14:58

1 Answers1

2

This is caused by Ubuntu's switch to multi-arch. Basically all the "standard" paths have been changed so you can install libraries for multiple architectures on the same machine without any clashes.

Ubuntu GCC has been patched to fix the problem, of course, but the upstream compiler still wasn't fixed last time I checked.

See here: https://askubuntu.com/questions/69365/cant-build-gcc-anymore-since-upgrade-to-11-10

Community
  • 1
  • 1
ams
  • 24,923
  • 4
  • 54
  • 75
  • It works now. I just symlinked the appropriate `crt*.o`s to `/lib`. This is a bit of a hack, since I usually dislike manually linking stuff in system directories, but for now it seems to work. I will have a look at the link, to see if that resolution is better suited. – LiKao Feb 05 '12 at 16:55