Drobe :: The archives
About Drobe | Contact | RSS | Twitter | Tech docs | Downloads | BBC Micro

Porting free for all as UPP releases tools

By Chris Williams. Published: 28th Sep 2003, 15:29:34 | Permalink | Printable

Development 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!


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


Viewing threaded comments | View comments unthreaded, listed by date | Skip to the end

This sounds like a really good turn for the UPP. The release of the porting tools seems to be an act of generosity, may it stimulate more ports. Maybe I should re-subscribe...

 is a RISC OS UserSnig on 28/9/03 11:10PM
[ Reply | Permalink | Report ]

Had a problem getting the 32-Bit GCCSDK to install on RedHat 9, it basically errored something about ld and not finding /home/riscos/env/libgcc at the end of make.

Are there any known problems with RedHat9 - I seem to recall Mandrake 9 had a broken symlink to cc.

Of course the scripts installed fine!

I might try the main branch of gccsdk instead of the 32-Bit one, which seems a shame, although isn't the main branch on 3.x now instead of 2.95.4?

-- C'mon, mod me down, PUNK!

 is a RISC OS Usersimo on 29/9/03 8:59PM
[ Reply | Permalink | Report ]

It's somewhat difficult to help if you aren't explicit about what the error was :)

Beware the main branch of the CVS tree atm, as it doesn't build at the moment. It does, however, produce 32bit executables by default.

 is a RISC OS Userjmb on 29/9/03 9:10PM
[ Reply | Permalink | Report ]

/home/simon/riscos/cross/riscos-dist/!System/310/Modules/SharedULib,ffa ld fatal error: library file libgcc not found gcc: Fatal compiler error: program ld gmake[2]: *** [/home/simon/riscos/cross/riscos-dist/!System/310/Modules/SharedULib,ffa] Error 1 gmake[2]: Leaving directory `/home/simon/gccsdk-295/unixlib/source' gmake[1]: *** [unixlib] Error 2 gmake[1]: Leaving directory `/home/simon/gccsdk-295/unixlib' gmake: *** [unixlib] Error 2

-- C'mon, mod me down, PUNK!

 is a RISC OS Usersimo on 30/9/03 4:14AM
[ Reply | Permalink | Report ]

I think a few more lines of context before that would be helpful. If this is Chocky's 32 bit gccsdk from www.riscos.info then I think there may be a hardcoded path somewhere that needs changing (the /home/riscos/env bit suggests that anyway)

The gccsdk mailing list would be a better place for this discussion anyway: [link]

 is a RISC OS Userilludium on 30/9/03 10:05AM
[ Reply | Permalink | Report ]

IIRC (It's some time since I used Chocky's 32bit gccsdk), It either installs the libraries in the wrong place, or looks in the wrong place.

They should be in /home/simon/riscos/cross/bin/arm-riscos-aof/2_95_4/apcs32/arch3/unixlib/

I suspect you'll find that they've been put in /home/simon/riscos/cross/bin/arm-riscos-aof/2_95_4/apcs26/unixlib/

Copying the libraries to the right place should fix the problem.

 is a RISC OS Userjmb on 30/9/03 6:18PM
[ Reply | Permalink | Report ]

Please login before posting a comment. Use the form on the right to do so or create a free account.

Search the archives

Today's featured article

  • Drobe Launch Pad Prize Draw winners announced

     Discuss this. Published: 15 Jan 2001

  • Random article

  • Software news
    Curling, website editing, Desk and many more
     19 comments, latest by nunfetishist on 19/11/03 9:47PM. Published: 18 Nov 2003

  • Useful links

    News and media:

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster


    RISCOS.org.ukRISCOS.orgRISCOS.infoFilebaseChris Why's Acorn/RISC OS collectionNetSurf

    Non-RISC OS:
    The RegisterThe InquirerApple InsiderBBC NewsSky NewsGoogle Newsxkcddiodesign

    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information
    Powered by MiniDrobeCMS, based on J4U | Statistics
    "Who cares? I, for one, rarely go to drobe..."
    Page generated in 0.083 seconds.