For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=533>
Summary: Mac OS X porti
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: Other
Status: NEW
Severity: project
Priority: P3
Component: Operating System Abstraction - Portability
AssignedTo: orocos-dev at lists [dot] mech [dot] kuleuven [dot] be
ReportedBy: klaas.gadeyne at fmtc [dot] be
CC: orocos-dev at lists [dot] mech [dot] kuleuven [dot] be
Estimated Hours: 0.0
Created an attachment (id=265)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=265)
mac os x port, less than alpha version
Since the question has popped up a couple of times, I will open this one to
collect the efforts regarding a Mac OS X port of the RTT.
Mac OS X uses the posix API, however it implements almost nothing of the posix
real-time extensions (1003.1b). Note that the use of these "real-time"
extensions doesn't mean the Mac OS X port will warrant real-time behaviour of
the RTT (not at all!).
Attached is a first "less-than-alpha" patch, which modifies the gnulinux code
in order to compile on mac os x.
That said, it only compiles (you have been warned).
Some notes about the patch.
- Idealiter, I think this project would result in a posix port of the RTT, with
some ifdef statements for non-portable (e.g. as currently in the gnulinux port)
or non-implemented (as will be necessary for mac os x).
- I've tested this on a Tiger (10.4) system (a white macbook, intel cpu) using
the fink system to install dependencies (boost/cppunit).
- I don't know what the state of Leopard is regarding the posix extensions.
- Unfortunately, the cppunit port that comes with fink www.finkproject.org is
still the deprecated 1.10 version, resulting in compiler errors with the gcc on
my macbook (virtual functions, but non-virtual destructors). This is where I
gave up :-) It seems like the macports project www.darwinports.com has a more
recent version though.
- The patch solves some issues (most of them 1003.1b stuff) * No pthread_recursive_np defined in mac os x 10.4 (they omit the np prefix) * No clock_gettime defined in mac os x 10.4 (solved by using gettimeofday) * No sem_timedwait defined -> THE IMPLEMENTATION JUST MAKES IT COMPILE, AND
WON'T WORK.
- It adds some cmake logic to use the fink include path in /sw. Won't be
necessary with macport I guess.
- For now, I didn't even review the patch, I just checked it compiled, ran into
the cppunit error, svn diffed it, and uploaded it here. So although I guess it
must be possible to get it working in a day or so, this is not for the
faint-hearted people amongst you :-)

[Bug 533] Mac OS X port
For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=533>
--- Comment #1 from S Roderick <kiwi.net at mac [dot] com> 2008-04-22 17:55:19 ---Created an attachment (id=266)
modified mac patch (leopard plus macports)
Updated patch attached.
Made it (mostly) agnostic as to Fink or Macports - this needs more work (see
top of config/check_depend.cmake).
Builds rtt with Macports on Leopard 10.5.2 on Intel iMac, bar one of the test
cases, generictask_test_3. I'm not sure if this is a compiler bug, or just the
result of a more strict compiler (Leopard is "i686-apple-darwin9-gcc-4.0.1
(GCC) 4.0.1 (Apple Inc. build 5465)". I have included a notational workaround
within this file, but it is ugly to say the least. This type of problem seen
before, see
http://gcc.gnu.org/ml/gcc-bugs/2005-03/msg01211.html
http://www.megasolutions.net/cplus/Copy-construction-with-inaccessible-base-class-copy-c-tor-20108.aspx
Still needs a complete rewrite of semaphore implementation.