Drobe logo
Beta! | About us | Contact | Submit news | RSS | Twitter Webspace | Tech docs | Downloads | BBC Micro | Gallery | Wallpaper

Porting free for all as UPP releases tools

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

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!

Links
Unix Porting Project website Peter Naulls is an editor of drobe.co.uk
Experimental shared library system

Discussion

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.

Login

Username

Password

Create a new account
Forgot your password?

Search this website

This week's poll

Recent developments have left me feeling...
Assured ROS will appear on new hardware Assured ROS will appear on new hardwareAssured ROS will appear on new hardware 55%
Pleased OS desktop features are being developed Pleased OS desktop features are being developedPleased OS desktop features are being developed 10%
ROL and ROOL will eventually kiss and make up ROL and ROOL will eventually kiss and make upROL and ROOL will eventually kiss and make up 5%
App developments are critical App developments are critical App developments are critical 10%
Dave Holden sleeps easy at night Dave Holden sleeps easy at nightDave Holden sleeps easy at night 19%
Discuss this | Archives

Featured articles

  • Wakefield 2009 wrap-up, photos and video
    The weekend's RISC OS event has been and gone and we've got the rest of our lives to look forward to. Here's a round-up of extra news and Drobe's show-related coverage and some photos taken from Wakefield 2009 - plus a video from the show floor.
     16 comments, latest by AW on 29/4/09 7:41PM. Published: 27 Apr 2009

  • RISC OS 5 pictured running on ARM Cortex-A8 kit
    Picture exclusive - This grainy photograph shows a port of RISC OS 5, sourced from the RISC OS Open project, running on a Beagleboard - a device powered by a 600MHz ARM Cortex-A8 processor with a built-in graphics chip. The port, developed by Jeffrey Lee with help from Uwe Kall and ROOL staff, is seen as a major breakthrough for the shared-source project as it proves the OS can be ported to new hardware without the need for a large team of engineers.
     75 comments, latest by rjek on 30/4/09 3:15PM. Published: 25 Apr 2009

  • Open documents from Windows-using pals with handy online tool
    It can be a pain when someone sends you a file that can only be opened on Windows, Mac OS X or Linux - but with the help of a free-to-use website and NetSurf, Paul Stewart reveals how these documents can be viewed on RISC OS.
     6 comments, latest by AW on 8/5/09 12:12AM. Published: 19 Apr 2009

  • Useful links

    News and media:
    IconbarMyRISCOSArcSiteRISCOScodeANSC.S.A.AnnounceArchiveQercusRiscWorldGAG-News

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    Dealers:
    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster

    Usergroups:
    WROCCRONENKACCIRUGSASAUGROUGOLRONWUGMUGGAGRISCOS.be

    Useful:
    RISCOS.orgRISCOS.infoFilebaseNetSurf

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


    Recently logged in: CrazyRisc is a RISC OS User CrazyRisc • gazza_fp is a RISC OS User gazza_fp • ioanene is a RISC OS User ioanene • stevek is a RISC OS User stevek • jmb is a RISC OS User jmb • Phlamethrower is a RISC OS User Phlamethrower • Mart is a RISC OS User Mart • AW is a RISC OS User AW • JMBarber is a RISC OS User JMBarber • turbo is a RISC OS User turbo •  Stats
    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information | Powered by MiniDrobeCMS, based on J4U
    "Oh, and books are freaking books, not dead trees, for gawd's sake"
    Page generated in 0.494 seconds.