Compiling under Unix/Linux

Tony van der Hoff tony at mk-net.demon.co.uk
Thu Jan 9 14:53:58 GMT 2003


On 9 Jan 2003, in message <64f119b24b.philip at philipnet.com>,
Philip Ludlam <philip at philipnet.com> wrote:

> On 9 Jan, in message <e07f0bb24b.sbrodie at sbrodie.cam.pace.co.uk>
>   Stewart Brodie <stewart.brodie at pace.co.uk> wrote:
> 
> >In message <d44cbab14b.philip at philipnet.com>
> >          Philip Ludlam <philip at philipnet.com> wrote:
> >
> >> Dear All,
> >> 
> >> Just for the hell of it (well not exactly) I've been working on getting
> >> OSLib to compile and build under Unix/Linux.
> >
> > Does it not just work?  defmod should work just fine under Solaris (SPARC
> > and Intel) and Linux (i686) ...
> 
> It does, but
>  - it requires fiddling to work with the RISC OS gccsdk,
>  - minor changes to the make file (to get it to compile the 32 bit
>    version as well) and the note about invoking it with -r
>  - minor filename renaiming
> 
> and the !ReadMe does state:
> ==
> Building OSLib under UNIX/Linux
> -------------------------------
> 
> It is possible to build OSLib under UNIX/Linux (I believe it is done at
> Pace), but lacking an appropriate platform myself, I am unable to attempt
> it, and therefore documenting the process is difficult.
> 
> Hopefully, this paragraph can be filled out in the future.
> ==

I have one now (a Linux box, that is :-)

I also made a start on a similar project to yours, but got waylaid by other
priorities, so I'm pleased that you have been able to pick up the issue,
thanks!

Thanks to Stewart, Defmod is fully portable, but a number of issues remain
in respect of the other tools. Building the StrongHelp manual is probably the
worst of these; when I re-wrote those tools, regretfully I didn't give
portability any attention :-(. I modified Bison for OSLib, to make it stand
alone, but it originated from GCCSDK, and I guess it would be better to use
the original to build OSLib under Linux. Rm is easy ;-). The only other tool
- ReduceAOF - is probably no problem - I think it's fully portable; it's a
shame we don't have a proper, commented, source! 

The second hurdle is OSLibSupport, but as that's all in C, I can't see
that being much of a problem.

Obviously the build scripts need some major revision, and I think the
directory structure will need amendment to allow seamless builds on either
platform. I think the Source directory needs all platform-dependent stuff
removing, which should then be placed into top-level subdirectories
pertaining to each platform. I'd want to use that opportunity to remove all
derived files from the Source directory as well, directly building the
release directories instead, which will avoid some of the nasty release
scripts. That in turn will create the need to change scripts to allow the
OSLib build directory to remain usable as a library directory (this is
essential when testing a new build, and useful during program development
requiring non-standard OSLibs).

Finally, and IMO most importantly, it is essential that we retain the ability
to build under RISC OS. Therefore, everything that's done must remain
compatible.

So, although Defmod works OK, there is quite a lot of peripheral tidying
up to be done, and that's why it isn't yet available. I believe it will be
worthwhile, if only in terms of time-saving during the build process.

I haven't had the opportunity to look at your work, Philip, but hope to do so
at the w/e.

Thanks again
Tony.

-- 
Tony van der Hoff         | MailTo:tony at mk-net.demon.co.uk
                          | MailTo:avanderhoff at iee.org
Buckinghamshire, England  | http:www.mk-net.demon.co.uk



More information about the oslib-user mailing list