Announcement

Collapse
No announcement yet.

error when install gcc-3.4 on kubuntu11.10(64bit)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    error when install gcc-3.4 on kubuntu11.10(64bit)

    In order to configure some software, I need gcc-3.4, but gcc's version by using apt-get from source is 4.6, so i should install it manually.
    I add source which include gcc-3.4 to the source list and then use
    sudo apt-get install gcc-3.4
    sudo apt-get install g++-3.4
    sudo ln -sf gcc-3.4 gcc
    sudo ln -sf g++-3.4 g++

    then
    gcc -o helloworld helloworld.c

    get the following error:
    /usr/bin/ld: cannot find crt1.o: No such file or directory
    /usr/bin/ld: cannot find crti.o: No such file or directory

    Then I uninstall gcc-3.4 g++-3.4
    and manually download
    gcc-3.4-base_3.4.6-6ubuntu3_amd64.deb
    gcc-3.4_3.4.6-6ubuntu3_amd64.deb
    cpp-3.4_3.4.6-6ubuntu3_amd64.deb
    g++-3.4_3.4.6-6ubuntu3_amd64.deb
    libstdc++6-dev-3.4.6-6ubuntu3_amd64.deb
    and usd dpkg -i to install them,but when i complie helloworld.c, I get the same error, how can i fix it?
    I really appreciate the help!

    #2
    It seems you've already installed the older gcc version, unless dpkg threw errors when you did the install. Try to compile your helloworld thus:

    CC=gcc-3.4 helloworld helloworld.c

    Comment


      #3
      Really appreciate your answer, it seems not work.
      Then I try to fix it by
      ln -s x86_64-linux-gnu/crt*.o .
      And it works!

      Comment

      Working...
      X