RISC OS News on Drobe
RISC OS Search
containing
"I see Drobe'll suck up any old s*** as news?"
Welcome back guest  |  Login  |  Register Saturday 30th August 
Login

drobe.co.uk
About Drobe
RISC OS News
Drobe Features
Alternatives
Bookmarks
Riscos.org.uk
Auctions
Events (shows)
AU issues
Tech Material
Wallpaper
Movies
File archives
SH eBooks
FAQs
Changelog

Interact
Forums
Online chat
Your webspace
BBC Emu(games!)
User gallery
RSS news &
comments
Submit news
Contact us

Quick Links
Open directory
Nutshells
ANS archives
ArcSite
RO Repository
Announce
RISCOS Ltd.
Castle

NTK
The Inquirer
The Register
OSNews
Slashdot
Google

Alternatives
NetBSD
ARM Linux
Iyonix Linux

Found Apps
 RISC OS Software !Avalanche
 RISC OS Software !Darts
 RISC OS Software !CFuncAnal
 RISC OS Software !TranTIFF+
 RISC OS Software !Dustbin
 RISC OS Software !NurseW
 RISC OS Software !Tally
 RISC OS Software !VideoLog
 RISC OS Software !USBKick
 RISC OS Software !Spr2Jpeg
Recent users
dkb is a RISC OS User dkb
tduell is a RISC OS User tduell
IanK is a RISC OS User IanK
oshvision is a RISC OS User oshvision
VinceH is a RISC OS User VinceH
DaveW is a RISC OS User DaveW
bluenose is a RISC OS User bluenose
JMBarber is a RISC OS User JMBarber
hubersn is a RISC OS User hubersn
bavison is a RISC OS User bavison


Why donate?

Serving: 15GB
Fuel: caffeine
0 users online
28 guests
150 active accts 24329 comments

Webstats

 
RISC OS News Article
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 system

Related 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:  
 
 
 
 
 
[Printable] [Digg this] [Blog search]


Snigwww (+1.6)
Face
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(good user) (-1.0)
Face
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(good user) (+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(good user) 
Face
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(good user) (+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.
 

Top Tip

Search for games!

Use the search bar at the top of the page to find games, utilities and more!
 
Headline news
Wakefield 2008 show photos
28th Apr 2008

Wakefield 2008 show live news
26th Apr 2008

Who would want an A9home PDA?
24th Apr 2008

RISC OS 6.10 available to Select subscribers
24th Apr 2008

Gallery photo
Older news
Animation and typing applications really released
24th Apr 2008

Wakefield 2008 show preview
22nd Apr 2008

R-Comp unveils new PDF authoring package
22nd Apr 2008

NetSurf bags GBP10K investment from Google
21st Apr 2008

Apple Mac VirtualRiscPC leaves beta
20th Apr 2008

Blu-ray disc burn breakthrough
14th Apr 2008

PDF import support for ArtWorks
13th Apr 2008

Wakefield 2008 show theatre line-up revealed
13th Apr 2008

Animation software collection falls into R-Comp's hands
9th Apr 2008

Features
A9home: two years on
4th Dec 2007

A9home DIY laptop: first pictures
1st Dec 2007

Software hosted by Drobe: Your guide
5th Nov 2007

 

Top | Design and concept © Fudgecake Design, 1999 - 2001. Content © The Drobe Team, 1999 - 2008. 
Click here for more information and terms and conditions.