November 03, 2003

Rotor on Panther

After a weekend of hacking, I've updated Rotor to run on Panther. Diffs against TOT at sscli.net are here. To patch your Rotor install, cd into the sharedsourcecli directory and run patch -p0 < rotor_panther_diffs.txt.

This has not undergone extensive testing. In other words, it passes the basic tests (perl rrun.pl -b) on one Panther system and one Jaguar system. I haven't tried it on FreeBSD or Windows, since I don't have any of those systems around. It's not perfect, either. Here are the known issues:

  • The purchaseorder sample does not run. It appears that XSD translation (is that the right word?) is telling csc to include system libraries. On Panther, that's resulting in duplicate definitions for all system objects; on Jaguar, it isn't. That might just be an issue with my Panther system's configuration. I'm not sure.
  • A few PAL tests (perl pvtrun.pl) fail. Quite a few of the networking tests crash. I haven't investigated that at all. Others fail due to some interesting behavior in Panther's poll(3) implementation. Perhaps Rotor should continue to use its internal poll implementation (which is actually Greg Parker's fakepoll) on Panther.
  • Precompiled headers are only enabled when building with GCC 3.1 on Jaguar. I haven't found the time to figure out how to merge the concepts of GCC 3.3's PCH with the Rotor build system.
In case you're curious, here's a summary of what I changed:
  • Included /usr/lib/crt2.o on Darwin systems when it's present.
  • Rearchitected env.{c}sh to use gcc -dumpversion instead of its earlier extremely hacky method of checking GCC's version. (I wrote the original version, so I can hopefully call it extremely hacky without offending anyone.) This let me introduce a mechanism by which Rotor can use GCC-version-specific compiler warnings, which I needed to get -Wno-invalid-offsetof to be used when building with GCC 3.3.
  • Added the concept of a post-preprocessing filter for C# files that get sent through the C++ preprocessor. This let me remove the #pragma GCC set_debug_pwd line that Apple's GCC 3.3 adds at the start of every preprocessed file. Shockingly, that line really confuses the C# compiler.
  • Improved the differentiation between C and C++ compiler warnings in the build system. GCC 3.3 warns when you use C++-specific warnings when compiling C code, so this had to be fixed to keep Rotor warning-free.
  • Removed some checks in the FJIT and a few other spots that could never be triggered due to the limited size of various data types.
  • Added a definition of POLLRDNORM in the PAL because Panther's poll.h doesn't define it.
  • Fixed a few dozen compiler warnings in the PAL test suite.
Enjoy! And if you have a chance to test it on FreeBSD or Windows, let me know how it goes. I don't want to suggest that it be checked in at sscli.net until I know that it doesn't break either of those builds.

(11/5 Update: Fixed a missing 'esac' statement in env.sh. Thanks, George!)