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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.