June 09, 2004

OpenJade and Cygwin

I've spent more time with OpenSP/OpenJade trying to get everything working under Cygwin, and I think I've finally got it.

Here's what I had to change:
  • OpenSP 1.5.1
    1. Edit config.h.in, and comment out #define SP_HAVE_LOCALE OpenSP will work with this turned on, but OpenJade will break. Better to just disable locale support in OpenSP and let OpenJade figure it out later.
    2. Run configure --with-included-gettext Cygwin's gettext support is lacking bindtextdomain or something.
    3. Ditch the #pragmas Cygwin doesn't support #pragma interface and #pragma implementation, and it results in undefined symbols during linking. This is in a lot of the source files, you'll probably want to write a perl or awk script to take care of it.
  • OpenJade 1.3.2
    1. Edit grove/Node.h, and change the #ifdef SP_WCHAR_T_USHORT to #ifdef SP_WCHAR_T_USHORT_ OpenJade defines it's Char type as a Unsigned32. This is apparently incompatible with grove's definition of GroveChar as a wchar_t. Cant' we all just get along?
    2. Edit msggen.pl, and add a second chop; - gotta love window's CRLF linefeed sequence, and the way it confuses perl.

At this point, I know I can run the openjade.exe binary. I haven't really fiddled with it any more, but I have an article I want to format as HTML.. so that's next.

Posted by alecf at June 9, 2004 10:49 AM | TrackBack

Alec, I was trying to build openjade under cygwin (apparently it's needed in the dependency list to build glib, go figure), and came across your comment. Very timely :)

Are your patches going to be incorporated in openjade CVS, or are they available as a diff? Any plans on submitting this to the cygwin distribution?


Posted by: Maarten at June 17, 2004 08:53 AM

Hi Alec,

great news. I'll try if I'm also able to build Openjade with your suggested changes.

A chomp instead of chop should do it in msggen.pl?


Posted by: Gerrit P. Haase at June 18, 2004 01:37 AM

My OpenSP conig.h says:

/* The size of a `unsigned short', as computed by sizeof. */

/* The size of a `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 2

Openjade 1.3.3 config.h says:
// wchar_t's base type is an unsigned short

So where is the problem with wchar_t if they are the same size?


Posted by: at June 18, 2004 02:11 AM

First off, My patches aren't going into OpenSP/OpenJade any time soon.. I don't have time to put together any more than a hack.

Let me know if it builds ok with SP_WCHAR_T_USHORT - last I tried it did NOT work.. maybe they fixed something in OpenJade 1.3.3? But I was having trouble making wchar_t cast to Unsigned32.


Posted by: Alec Flett at June 18, 2004 07:11 AM

If you're having trouble with your openjade binary, you may try an older version, I have it online here:
or point Cygwin setup.exe to http://anfaenger.de/cygwin to install it with setup.exe.

It works well for my needs, unfortunately it never made it into the Cygwin netrelease.


Posted by: Gerrit P. Haase at June 18, 2004 08:07 AM
Post a comment

Remember personal info?