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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
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.
then gcc-config can be used to select the right one ...
Gentoo has no trouble with this setup.
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/nestedv m/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/ne stedvm/ups tream'
if [ -e tasks/extract_darcs_classg en ]; then echo "Error: tasks/extract_darcs_classg en 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/ne stedvm/_da rcs" ]; 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_class gen] Erro 127
make[1]: Saindo do diretório `/home/antunes/nestedvm/ne stedvm/ups tream'
make: ** [upstream/tasks/build_darc s_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
nestedvm$ make
make -C upstream tasks/build_darcs_classgen
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
make[1]: Entrando no diretório `/home/antunes/nestedvm/ne
if [ -e tasks/extract_darcs_classg
mkdir -p build
if [ -z "http://classgen.ibex.org/" ]; then echo "No darcs url for classgen" >&2; false; fi
if [ -d "/home/antunes/nestedvm/ne
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_class
make[1]: Saindo do diretório `/home/antunes/nestedvm/ne
make: ** [upstream/tasks/build_darc
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
ASKER
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
ASKER
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.
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.
ASKER
correct answer