Link to home
Start Free TrialLog in
Avatar of CarlosScheidecker
CarlosScheidecker

asked on

How to make gcc 4.6.1 run as gcc 3.6.x?

Hello,

I have gcc 4.6.1 on my Ubuntu box and I need to compile the nestedVM project. The problem is that it won't compile with gcc 4.x but with gcc 3.6.x. Is there a way around it? Can I still 2 instances of gcc like you would with Java's JVM?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could fix nestedVM so it does compile and submit your changes as an enhancement / bug-fix. That is in the spirit of FOSS. Somebody is going to have to do it eventually anyway.
Can you post some failing code with the errors gcc reports?
Avatar of noci
noci

Depending on your distribution you can have multiple compilers installed.
then gcc-config can be used to select the right one ...

Gentoo has no trouble with this setup.
Avatar of CarlosScheidecker

ASKER

Here is the error from nestedvm from using it with gcc 4.6.1

nestedvm$ make
make -C upstream tasks/build_darcs_classgen usr="/home/antunes/nestedvm/nestedvm/upstream/install" \
            MIPS_CFLAGS="-O3 -mmemcpy -ffunction-sections -fdata-sections -falign-functions=512 -fno-rename-registers -fno-schedule-insns -fno-delayed-branch -freduce-all-givs -march=mips1 -I. -Wall -Wno-unused" \
            MIPS_PCFLAGS="-O3 -mmemcpy -ffunction-sections -fdata-sections -falign-functions=512 -fno-rename-registers -fno-schedule-insns -fno-delayed-branch -freduce-all-givs -march=mips1 -I. -Wall -Wno-unused --big-endian" \
            MIPS_LDFLAGS="-march=mips1 --static -Wl,--gc-sections"
make[1]: Entrando no diretório `/home/antunes/nestedvm/nestedvm/upstream'
if [ -e tasks/extract_darcs_classgen ]; then echo "Error: tasks/extract_darcs_classgen exists. something isn't right"; false; else true; fi
mkdir -p build
if [ -z "http://classgen.ibex.org/" ]; then echo "No darcs url for classgen" >&2; false; fi
if [ -d "/home/antunes/nestedvm/nestedvm/_darcs" ]; then \
            cd build && darcs get --repo-name="classgen" --verbose "http://classgen.ibex.org/"; \
      else \
            mkdir -p "build/" && cd "build/"; \
            darcs get --repo-name=classgen http://classgen.ibex.org/; \
      fi
/bin/sh: darcs: not found
make[1]: ** [tasks/extract_darcs_classgen] Erro 127
make[1]: Saindo do diretório `/home/antunes/nestedvm/nestedvm/upstream'
make: ** [upstream/tasks/build_darcs_classgen] Erro 2

NestedVM can be obtained at git clone http://nestedvm.ibex.org/nestedvm.git/ or if you do not have git wget http://nestedvm.ibex.org/dist/nestedvm-2009-08-09.tgz
I am using Ubuntu 11.04 and it does not even seem to have gcc 3.6.1 in their repositories. I will search more about it as well.
Your problem is that you are missing the darcs command, although you seem to have some related files. Darcs is a "Distributed Advanced Revision Control System" and is not a part of gcc. You can get darcs from the web site
Duncan,

Yes, I was missing the darcs and curl which I did install. They I saw that it was trying to fetch something from a repository that is no longer there, so I have updated the URL on the make file. I am almost there. Also, NestedVM downloads its own copy of the gcc which is very, very cool.
correct answer