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 / 3307
3306  |  3308
Subject: 
Re: OS X Complier problems solved--now struggling with BrickOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 16 Jun 2003 10:47:34 GMT
Viewed: 
3304 times
  
On 6/15/03 3:57 AM, "Michael Zapp" <mzapp@mac.com> wrote:

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
build of the compiler and see what happens.

The problems you're reporting are in building the platform tools that are
needed
to work with the RCX. BrickOS doesn't have support for OS X so they have to be
modified to work (namely getopt differences and USB code). I've done this
using
libusb (which all of the BrickOS tools should be ported to since it's cross
platform). You can download them from
http://www.zapptek.com/Downloads/OSXBrickOSTools.tgz. If you have this then
you
can skip that part of the Brick OS build (doing a more specific make or
modifying the Makefile...).

Let me know if you have any more questions about OS X support. I've been able
to
build Brick OS and run it on my RCX so it's possible!

Michael


You know, I think there's some cosmic law. Just after hitting the send key,
I'll almost always realize my question was stupid. Looking at the errors I
was getting, I noticed that it was the utilities that you'd already created.

firmdl3 has the location of libusb hardcoded into it. Since I've installed
most of my unix additions using fink, everything's in the /sw directory. I
tried to solve this by creating a link from /sw/lib/libusb.dynlib to
/usr/local/lib/libusb-0.1.4.dylib. However, it would be nice if this wasn't
necessary.

It seemed to hang for a long time. Then I get a slowly increasing
percentage. However, the friendly green light on my IR tower does not
appear. Also, my RCX beeped and turned off at about 19% (so I'm not really
confident that anything is actually transferring). I'm trying it again now
to see what happens.

I'm still having some trouble compiling BrickOS. Also with the C++ demos. Is
this the same problem you had, Michael? Does anyone have any suggestions?

I edited the configure file to include the path to my cross compiler. I then
ran the configure. Afterwards, I edited both Makefile (deleting utils from
the list of subdirectories) and Makefile.common (adding the proper prefix
and the -no-cpp-precomp to CC). I also had to copy Michael's utilities into
the utility folder.

With that setup, I'm getting the following error.


/sw/brickos/bin/h8300-hitachi-hms-g++ -DCXX -O2 -fno-builtin
-fomit-frame-pointer -Wall -I/sw/brickos/source/brickos-0.2.6.10/include
-I/sw/brickos/source/brickos-0.2.6.10/include/lnp -I.
-I/sw/brickos/source/brickos-0.2.6.10/boot  -c c++.cpp -o c++.o
In file included from
/sw/brickos/source/brickos-0.2.6.10/include/conio.h:53,
                 from c++.cpp:34:
/sw/brickos/source/brickos-0.2.6.10/boot/config.h:124:8: warning: multi-line
string literals are deprecated
/sw/brickos/bin/h8300-hitachi-hms-ld -T ../boot/brickOS.lds -relax
-L/sw/brickos/source/brickos-0.2.6.10/lib c++.o  -lc -lmint -lfloat -lc++ -o
c++.dc1 --oformat coff-h8300 -Ttext 0xb000
c++.o(.text+0x30):c++.cpp: undefined reference to `operator new(unsigned)'
c++.o(.text+0x42):c++.cpp: undefined reference to `operator delete(void*)'
<<numerous duplicate errors snipped>>
c++.o(.rodata+0x18):c++.cpp: undefined reference to `vtable for
__cxxabiv1::__si_class_type_info'
c++.o(.rodata+0x1e):c++.cpp: undefined reference to `vtable for
__cxxabiv1::__si_class_type_info'
c++.o(.rodata+0x40):c++.cpp: undefined reference to `vtable for
__cxxabiv1::__class_type_info'
make[1]: *** [c++.dc1] Error 1
rm c++.o
make: *** [all] Error 2

It seems to be a problem with the linker. But I'm not familiar enough with
the commands to be sure. Playing around with making some of the demos by
hand, I got namespace errors, if that helps (the variables from
dmotor.h--fwd and so forth--created problems in Motor.H).

I'm getting close. I can smell it. I'd really like to have c++ working,
since I'm much more comfortable writing c++ code than c code. Any help (from
Michael or others) would be greatly appreciated.

-Rich-



Message has 3 Replies:
  Re: OS X Complier problems solved--now struggling with BrickOS
 
You know, it doesn't matter how long I wait before sending out a question... I figured out the trouble with firmdl3. I'd assumed the black plug in the USB port was the IR Tower, which I'd plugged in earlier today. However, my wife had been (...) (21 years ago, 16-Jun-03, to lugnet.robotics.rcx.legos)
  Re: OS X Complier problems solved--now struggling with BrickOS
 
In lugnet.robotics.rcx.legos, Rich Warren wrote: ... (...) Hmm... I just read your thing, and I realised I'm posting exactly the same error, different platform (Linux). Are you using g++-3.3? Or is it another compiler? Michael (van der Kolff, not (...) (21 years ago, 17-Jun-03, to lugnet.robotics.rcx.legos)
  Re: OS X Complier problems solved--now struggling with BrickOS
 
(...) As for this one, I thought I linked the library statically so you wouldn't require it. Oh well, I'll fix that and let people know when I've updated it. You shouldn't need to install the libraries to use the tools. Michael (Zapp not van der (...) (21 years ago, 17-Jun-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  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)

12 Messages in This Thread:




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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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