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.
LVL 1
CarlosScheideckerAsked:
Who is Participating?
 
arnoldCommented:
while it is not advisable to install different versions you can.

Alternatively, you could install gcc 3.6 within your home dir. make sure you have the space to install the entire package.

Compile the nestedVM as static and then install it system wide.

0
 
Duncan RoeSoftware DeveloperCommented:
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.
0
 
Duncan RoeSoftware DeveloperCommented:
Can you post some failing code with the errors gcc reports?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
nociSoftware EngineerCommented:
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.
0
 
CarlosScheideckerAuthor Commented:
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
0
 
CarlosScheideckerAuthor Commented:
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.
0
 
Duncan RoeSoftware DeveloperCommented:
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
0
 
CarlosScheideckerAuthor Commented:
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.
0
 
CarlosScheideckerAuthor Commented:
correct answer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.