|
Porting free for all as UPP releases tools By Chris Williams. Published: 28th Sep 2003, 15:29:34 | Permalink | PrintableDevelopment kit roundup The Unix Porting Project has released the tools it uses to port open source software to RISC OS. The UPP has currently ported games, utilities and started work on an extensive X11-to-RISC OS-Windowmanager library.
The tools are currently hosted on riscos.info and are designed to run in a Unix environment to enable software to be cross compiled to the RISC OS platform. How do they work? The tools basically configure the build environment to output ARM compatible RISC OS executables and then invoke the GCCSDK cross compiler to start the build. Below is an example of the tools in action.
Porting example on a StrongARM Netwinder running Debian Linux - bash command line in monospaced font, commentary in italics.
Firstly grab some source. Let's pick a quick and easy project like the command line utility esniper, a tool for ebay power users
drobe@arabella:/tmp$ wget http://belnet.dl.sourceforge.net/sourceforge/esniper/esniper-2-2-0.tgz
drobe@arabella:/tmp$ tar -xvvzf esniper-2-2-0.tgz
drobe@arabella:/tmp$ cd esniper-2-2-0/
Check the documentation - this is Unix, always RTFM
drobe@arabella:/tmp/esniper-2-2-0$ nano README
drobe@arabella:/tmp/esniper-2-2-0$ nano Makefile
Use the tools to cross compile the application
drobe@arabella:/tmp/esniper-2-2-0$ /home/riscos/env/ro-make
Here's the output from the GCC compiler
cc -O -c -o auction.o auction.c
cpp: In file included from esniper.h:31,
from auction.h:31,
from auction.c:27:
util.h:69: libgen.h: No such file or directory
make: *** [auction.o] Error 1
Ooops, our project doesn't build. Let's look in util.h to see what's up
drobe@arabella:/tmp/esniper-2-2-0$ nano util.h
Looks like we need to define __CYGWIN__ in order to avoid using a library we haven't ported yet. We'll add -D__CYGWIN__ to CFLAGS in the makefile and attempt to build again
drobe@arabella:/tmp/esniper-2-2-0$ nano Makefile
drobe@arabella:/tmp/esniper-2-2-0$ /home/riscos/env/ro-make
Success! Check the executable, it's an "Acorn AIF Executable". Now copy the executable to your RISC OS machine and use it with your favourite taskwindow application or write a Frontender script for it. |
From the example above, the esniper author kept his software portable and although it's highly likely that he doesn't know what RISC OS even is, his software could still be ported to our platform - that's the benefit of open source, portable software. Of course, there's a ridiculous amount of open source software that's just itching to be ported.
There's also the issue of a port requiring some changes to the original source code to allow the application to usefully run on our platform. If the ported software doesn't fully work during runtime then the porter can concentrate on 'RISC OSify'ing the application to get it working, as the ground work to build the project has already been accomplished. The Unix POSIX interface and the design of RISC OS aren't particular compatible although UnixLib goes a long way to address that. Portable software that relies on fork(), for example, will need some manual programming work.
Happy porting.
Of native libraries and kits
On to platform native developments. Some time ago Steven Simpson released an experimental shared library system for RISC OS in order to address out platform's lack of shared library support. Shared libraries are loaded at runtime on demand rather than residing in kernel extension modules. Steven is especially looking for feedback and ideas and interestingly, he told drobe.co.uk that his system was cross compiled from Linux to RISC OS using the 32bit GCCSDK.
Finally, Graham Shaw has developed the RISC OS Toolkit, a class library for developing applications in C++. Graham's library isn't finished yet but worth a look at if you're a C++ coder.
Get coding!
Links
Unix Porting Project website Peter Naulls is an editor of drobe.co.uk
Experimental shared library system
Previous: STD announces expansion, new name
Next: RISC OS Shared Libraries
Discussion Viewing threaded comments | View comments unthreaded, listed by date | Skip to the endPlease login before posting a comment. Use the form on the right to do so or create a free account.
|
+++ Message board +++
Read messages or start a new thread
Search the archives
Today's featured article
Online banking with RISC OS We thought this would be of high interest
28 comments, latest by devine on 25/9/05 8:30AM. Published: 1 Sep 2005
Random article
WSS looks for MP3 player beta testers
Discuss this. Published: 17 Feb 2001
Login
Create a new account
Forgot your password?
Useful links
News and media:
Iconbar •
MyRISCOS •
ArcSite •
RISCOScode •
ANS •
C.S.A.Announce •
Archive •
Qercus •
RiscWorld •
Drag'n'Drop •
GAG-News
Top developers:
RISCOS Ltd •
RISC OS Open •
MW Software •
R-Comp •
Advantage Six •
VirtualAcorn
Dealers:
CJE Micros •
APDL •
Castle •
a4 •
X-Ample •
Liquid Silicon •
Webmonster
Usergroups:
WROCC •
RONE •
NKACC •
IRUG •
SASAUG •
ROUGOL •
RONWUG •
MUG •
WAUG •
GAG •
RISCOS.be
Useful:
RISCOS.org.uk •
RISCOS.org •
RISCOS.info •
Filebase •
Chris Why's Acorn/RISC OS collection •
NetSurf
Non-RISC OS:
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •
xkcd •
diodesign
|