
| Porting free for all as UPP releases tools |
|
Published: 28th Sep 2003, 15:29:34GMT Source: drobe.co.uk By Chris Williams
|
| Page 1 of 1 |
|
| 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 systemRelated articles Unix Porting Project issues refunds Unix Porting Project to ditch name Unix Porting Project to seek UK admin
This article has been linked to, or is available in the following formats:
|
| |
|
Snig (+1.6)
 28/9/03 11:10PM |
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... |
simo (-1.0)
 29/9/03 8:59PM |
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! |
jmb (+2.6) 29/9/03 9:10PM |
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. |
simo
 30/9/03 4:14AM |
/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! |
illudium (+1.6) 30/9/03 10:05AM |
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: http://hard-mofo.dsvr.net/gcc/ |
jmb (+0.1) 30/9/03 6:18PM |
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. |
| |
|
|
|
|

Use the search bar at the top of the page to find games, utilities and more!
|
|