To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3302
3301  |  3303
Subject: 
OS X Complier problems solved--now struggling with BrickOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 14 Jun 2003 17:06:16 GMT
Viewed: 
2976 times
  
Ok, you can (perhaps--I haven't been able to test it yet) ignore my previous
post. I was trying to build the cross compiler using GCC 3.3, and nothing I
tried would work. When I switched to 3.2.3, the errors disappeared. So I'm
making the temporary assumption that they were bugs in GCC and not a problem
on my end. (a dangerous assumption, I know).

OK, now what. I'm trying to build BrickOS. But I am running into trouble
again.

I'm working on a Mac OS X 10.2.6 on a G3 iBook. I have a lot of additional
UNIX utilities installed using the Fink distribution. As a side effect of
that, I've installed my cross compiler into /sw/brickos/ (to keep all the
non-standard files in one location--more or less). I've added
/sw/brickos/bin to my PATH.

I've also added the following line to BrickOS's configure file:

TOOL_PATH[3]="/sw/brickos/bin";

Which I thought would allow it to find my cross compiler.

When I run configure, everything seems to work. It did find my cross
compiler! However, when I run make I get the following errors:

cc -no-cpp-precomp -o loader.o -c loader.c -O2 -Wall -O2 -Wall -I.
-I/sw/brickos/source/brickos-0.2.6.10/include/lnp
loader.c:120:20: getopt.h: No such file or directory
loader.c:122: elements of array `long_options' have incomplete type
loader.c:123: warning: excess elements in struct initializer
loader.c:123: warning: (near initialization for `long_options[0]')
... Lots and lots of warnings snipped ...
loader.c: In function `main':
loader.c:375: warning: implicit declaration of function `getopt_long'
make[2]: *** [loader.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

Note, I used the following command, to prevent possible problems with Mac
OS' cpp-precomp.

make CC='cc -no-cpp-precomp'

If I just use make, I get similar (though a much shorter list of) errors.

cc -o loader.o -c loader.c -O2 -Wall -O2 -Wall -I.
-I/sw/brickos/source/brickos-0.2.6.10/include/lnp
loader.c:120: header file 'getopt.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in basic
mode
make[2]: *** [loader.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

I've checked about in all the logical places, and I don't seem to have
getopt.h on my system. It doesn't seem to be included in brickos-0.2.6.10.
Do I need to install something else before trying this?

Any suggestions?

Additionally, does brickos's configure script handle --prefix=? I'd like to
be able to install BrickOS into a custom directory, as I did with the other
files I compiled.

-Rich-



Message has 2 Replies:
  Re: OS X Complier problems solved--now struggling with BrickOS
 
(...) Hi, First, in terms of my compiler build (referencing your previous post...) what I had a problem with was building the sample C++ code that came with BrickOS. I don't need C++ so I haven't investigated this any further. You're free to try my (...) (21 years ago, 14-Jun-03, to lugnet.robotics.rcx.legos)
  Re: OS X Complier problems solved--now struggling with BrickOS
 
(...) No, they aren't problems in your end, and no, they're also not gcc's fault. LegOS uses a now unsupported extension to C: multi-line strings. The way they can be made to work is by inserting \n\ on the end of the offending lines. I did this to (...) (21 years ago, 17-Jun-03, to lugnet.robotics.rcx.legos)

12 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR