Issues with Make on Ubuntu and Mac OS Darwin

23 views
Skip to first unread message

CBoone

unread,
Oct 31, 2008, 11:13:07 PM10/31/08
to NestedVM
I have been trying to make NestedVM and I have hit a roadblock. I
have attempted to install this on both Ubuntu and Mac OS Darwin.

On Ubuntu, I receive the following error:
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
make[1]: *** [tasks/build_binutils] Error 1
make[1]: Leaving directory `/home/cboone/nestedvm/upstream'
make: *** [upstream/tasks/build_gcc] Error 2

On the Mac, I receive the following error:
FATAL:/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'G'
flag!
make[4]: *** [libgcc/./_m16addsf3.o] Error 1
make[3]: *** [stmp-multilib] Error 2
make[2]: *** [all-gcc] Error 2
make[1]: *** [tasks/build_gcc] Error 2
make: *** [upstream/tasks/build_gcc] Error 2

Any insight that anyone can provide would be greatly appreciated.

Thanks in advance.

arlindo...@gmail.com

unread,
Dec 11, 2008, 10:07:59 AM12/11/08
to NestedVM
On Nov 1, 1:13 am, CBoone <christopher.e.bo...@gmail.com> wrote:
> I have been trying to make NestedVM and I have hit a roadblock.  I
> have attempted to install this on both Ubuntu and Mac OS Darwin.
>
> On Ubuntu, I receive the following error:
> /usr/bin/ld: crt1.o: No such file: No such file or directory
> collect2: ld returned 1 exit status
> *** The command 'gcc -o conftest -g -O2   conftest.c' failed.
> *** You must set the environment variable CC to a working compiler.
> make[1]: *** [tasks/build_binutils] Error 1
> make[1]: Leaving directory `/home/cboone/nestedvm/upstream'
> make: *** [upstream/tasks/build_gcc] Error 2
>
> On the Mac, I receive the following error:
> FATAL:/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'G'
> flag!

This is because it is trying to use the Apple assembler from /usr/bin,
not the one that was built from the binutils you downloaded.

> make[4]: *** [libgcc/./_m16addsf3.o] Error 1
> make[3]: *** [stmp-multilib] Error 2
> make[2]: *** [all-gcc] Error 2
> make[1]: *** [tasks/build_gcc] Error 2
> make: *** [upstream/tasks/build_gcc] Error 2
>
> Any insight that anyone can provide would be greatly appreciated.
>

After some tinkering I was able to build NestedVM on Mac OS x 10.5
(leopard). Here are the steps:

1) Get darcs installed. There is a version of darcs on mac ports but
it is broken and won't build. Instead, installed a pre-compiled
version:

http://wiki.darcs.net/DarcsWiki/Binaries#head-8a40d9b539cc9d4ace0411ac4620669842c36fd2

2) I then installed gcc-4.2 from mac ports; compiler gets installed as
gcc-4.2 under /opt/local/bin

3) Warning: this is uggly, but this is how I got it to build. Under /
opt/local/bin make the symlinks

cd /opt/local/bin
ln -s gcc-4.2 gcc
ln -s g++-4.2 g++
export PATH=/opt/local/bin:$PATH

(I was not able to convince the gcc build to use gcc-4.2, therefore
this hack. Remember to remove these symlinks when you are done.)

4) At this point you should be able to untar your nestedvm tarball and
simply type "make".

IMPORTANT: remove the gcc, g++ symlinks above and go back to the
Apple default ones.

If anybody has a more elegant way of doing this please speak up. The
hack above is kind of embarrassing.

Arlindo








> Thanks in advance.
Reply all
Reply to author
Forward
0 new messages