[IGSTK-Developers] Mac issues
David Gobbi
dgobbi at atamai.com
Fri Jun 10 10:08:37 EDT 2005
Hi Kevin,
Thanks for the kudos yesterday.
Mac support for IGSTK can be added for only a little extra effort.
See comments below:
Kevin Gary wrote:
> I had some issues building the IGSTK sandbox on Mac OS X Tiger
> using gcc-3.3. I do not know if we are planning to support Mac
> as one of our platforms, and I do have other boxes available to me
> (I built on linux earlier today with no issues), so I will describe the
> issues here and if Mac support is desired I can add them to the
> bug tracker.
>
> The file that will not compile is igstkSerialCommunicationForLinux.cxx.
> Turns out that Mac OS does not support termio.h, and instead
> recommends termios.h. A simple switch to this of course did not work
> as they are not exactly compatible, though it did cut down on the
> number of compilation errors significantly.
The igstkSerialCommunicationForLinux didn't get proper testing before
Sohan left, and during Iteration 5 I plan to replace it's innards with code
from my Atamai tracker. My code supports OS X, Linux, and IRIX.
Then I'll rename the class to igstkSerialCommunicationForPosix or
some such.
We could also revisit the possibility of having just one class called
"igstkSerialCommunication" that does Win, Mac, UNIX, and Linux.
> My next thought was that I didn't need to be compiling this file on
> the Mac anyway as it should never be deployed on a Mac. Simply
> removing it did not work as there are some test files that rely on it
> (I get linker errors if I leave the include's of the corresponding
> header file in). However, I can build the library file
> libIGSTKSandbox.a.
> Turns out the files including the header check for WIN32 and if
> that is not defined assume they can include
> igstkSerialCommunicationForLinux.h, and this fouls me up.
There are CMake flags to check for Mac compilation. Atamai's president,
Yves Starreveld, is a mac head and he was the one that wrote the OS X
code for VTK. We still have a Mac running nightly dashboards for CMake
and VTK.
> I am new to cmake, but I found a few things interesting. The
> cmake.depends
> files did indicate I needed termios.h instead of termio.h, even though
> the source file said otherwise. I assume it must know something about the
> platform it is deployed on. I also notice our CMakeLists file include
> some platform logic for WIN32, CYGWIN, and UNIX, but not
> specifically for Mac.
For the most part it's fine to classify a mac as "UNIX", with an
occasional "IF (APPLE)" thrown in. The only time things get hairy
is when you build shared libraries (which IGSTK doesn't do).
> Again, I don't mean to slow things down based on compilation on
> one Mac laptop, but thought I would throw it out there. I know
> adding a Mac to the dashboard would help identify this early, but
> this is the only one I have...
A lot of people out there have Mac laptops. After I have finished my
Iteration 5 changes for SerialCommunication, I can start a dashboard
IGSTK build on our Mac that does dashboards for VTK and CMake.
- David
More information about the IGSTK-Developers
mailing list