Re: Euphoria for Sun Solaris and HP-UX
- Posted by Robert Craig <rds at RapidEuphoria.com> Sep 24, 2002
- 439 views
Andy Cranston writes: > I'd like an idea of the complexity involved in doing a UNIX > port of the interpreter. I've experience of compiling open source > packages like Apache, sendmail, squid web proxy, Samba etc. > with gcc, GNU make, bison, flex and the like. I can code in C > so can generally track down obvious compile errors like missing > #includes and unresolved function names. I'd say you're well qualified. As with most porting jobs, you don't have to understand the internal algorithms. It's better that you understand the C compiler, and the available C libraries and include files. > Rob you mentioned that the FreeBSD port was "easy". > Could you quantify that a little more? As I recall, I had the interpreter running in about 3 days, working 2-3 hours per day on it. I started compiling the source as if it were a Linux system. I had to #ifdef-out the GPM mouse stuff, because that library didn't exist. I also had to remove an assumption that I made about how malloc() works internally. I added #define BSD statements in a just a handful of places where I had to do something different from the Linux version. Later I ported the Translator even easier than the Interpreter. A few keys in ed.ex had to be reassigned for telnet. Obviously, I wouldn't expect someone else to do a port as easily as this, but the fact that two UNIX-based systems have been done, means it shouldn't be too hard to do more. I'm not sure if Sun supports ncurses, but I think they have curses. There could be some work to do there. > Also is compiling the interpreter just a case of > running a GNU like "configure" script and then > invoking the make command? > Or is it a little more involved than that? > I think perhaps yes. I think you'll start off assuming that you're on a "BSD" system (Sun Unix is closer to BSD than to Linux isn't it?). You can use the batch file for building Euphoria on BSD. It assumes GNU C and defines the "BSD" symbol. You should add: #ifdef SUN (or whatever) in places where you have to make a change. I don't think there will be more than 10 or so places, unless the curses incompatibility causes a problem. If you get stuck, let me know. I don't mind helping, but I'm concentrating on the existing 4 platforms right now. I'm not ready to fully take on another one. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com