build error

6 views
Skip to first unread message

John Harrison

unread,
Sep 18, 2008, 8:24:44 AM9/18/08
to nest...@googlegroups.com
Hi,

I'm trying to build NestedVM on cygwin. I get the following error

gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o size.exe
size.o
bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a
../libiberty/libiberty.a ./
../intl/libintl.a
../bfd/.libs/libbfd.a(archures.o): In function `bfd_scan_arch':
/nestedvm/upstream/build/binutils-obj/bfd/../../binutils-2.14/bfd/archures.c:512
: undefined reference to `_bfd_mips_arch'

I really have no idea so any help is much appreciated.

John

Brian Alliet

unread,
Sep 18, 2008, 2:38:58 PM9/18/08
to John Harrison, nest...@googlegroups.com
On Thu, Sep 18, 2008 at 01:24:44PM +0100, John Harrison wrote:
> I'm trying to build NestedVM on cygwin. I get the following error
[snip]

> /nestedvm/upstream/build/binutils-obj/bfd/../../binutils-2.14/bfd/archures.c:512
> : undefined reference to `_bfd_mips_arch'

I have no idea. The binutils build proces is failing for some reason.
Fortunately you caught me at just the right time; I'm on a windows box
right now. I'll give it a shot here and see what happens.

-Brian

Brian Alliet

unread,
Sep 18, 2008, 5:29:24 PM9/18/08
to John Harrison, nest...@googlegroups.com

I just built NestedVM right out of the box on cygwin here: Just typed:

$ darcs get ...
$ cd nestedvm
$ make test

A quick google search revealed this[1] though (unrelated to NestedVM,
but seems to be the same problem):

> If it fails with a message to the effect of "symbol _bfd_mips_arch not
> found, referenced in archures.c" - make sure there are no DOS CR
> characters (^M) in the source files (that includes .patch files,
> Makefiles,etc.), then

> find . -exec grep -l -L ^M '{}' \;

> is your friend (where ^M is produced in Cygwin shell by doing Ctrl-V
> Ctrl-J). If this finds anything run dos2unix on the files it found.

It might have something to do with text-vs binary mounts in cygwin, or
how you extracted the files (did you start with one of the tarballs or
from darcs?). Wish I could help more, but I'm not cygwin expert, I just
know it works for me.

-Brian

[1] http://wiki.openwrt.org/CompilingUnderCygwin

Message has been deleted

jahhaj

unread,
Sep 19, 2008, 6:39:24 AM9/19/08
to NestedVM
Thanks Brian, that's fixed the problem. I've had a few problems with
nestedvm, cygwin and line endings.

For what its worth here's what I've found.

1) Download the native Windows version of darcs http://zooko.com/darcs/darcsdir-w32-2.0.0.zip,
not the cygwin implementation http://zooko.com/darcs/darcsdir-cygwin-2.0.0.tar.bz2.
Using the cygwin version very quickly leads to line ending errors

2) Make sure that you place nestedvm on a 'binmode' mount point. This
would normally be the case in cygwin (use the mount command to find
out if not sure). Placing nestedvm on a 'textmode' mount point results
in the obscure error I reported earlier.

3) Even with nestedvm on a binmode mount point I get line ending
errors in the file extraheaders.sh. Seems the only way to proceed is
to manually remove the carriage returns from this file using dos2unix
or similar.

With this small intervention nestedvm builds fine under cygwin
(haven't tested it yet though).

Thanks again,
John

Curt Cox

unread,
Oct 6, 2008, 9:11:21 AM10/6/08
to NestedVM
What are the existing obstacles to providing self-hosting NestedVM
binaries? That's probably the wrong term. If a single pure-Java
download provided all of the binaries required to build and run
HelloWorld, NestedVM would be far easier to get started with. That's
especially true of people like me that are much more comfortable in
the Java ecosystem than in the GNU one.

- Curt

lpsantil

unread,
Oct 8, 2008, 1:29:22 AM10/8/08
to NestedVM
When you are speaking of self-hosting, are you talking about having a
NestedVM'd versions of mips-unknown-elf-gcc, newlib, binutils, etc.?
I think that would be extremely interesting and a worthy cause.
Complications arise in hosting all binaries & libraries necessary to
make that happen (gcc/newlib/binutils, etc.). Maybe it would be
possible to do with some environment and bash alias magic (all put
into env.sh).

-Louis
Reply all
Reply to author
Forward
0 new messages