HOME  NEWS  FORUM  DOWNLOAD  LINK
OpenCOBOL - an open-source COBOL compiler
Main Menu
Download
Documentation
Development
Who's Online
11 user(s) are online (4 user(s) are browsing Forum)

Members: 0
Guests: 11

more...
Powered by
SourceForge

Xoops

Creative Commons

OpenCOBOL Forum Index
   OpenCOBOL
     OC on ARM -- success
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
rkdavis
Posted on: 2010/7/27 0:11
Just popping in
Joined: 2010/7/23
From:
Posts: 13
OC on ARM -- success
I have been fiddling with my cross compile environment to get OC built for ARM and about two hours ago I successfully built OC for ARMv4l.

I have two versions, one built for a uClibc based system that works apart from failing the tests for ANNUITY, EXP, SQRT and TAN. The other is built for a glibc/eglibc based system and that passes all the tests.

For those that are interested here is how I did it. The same method should work for aboriginal linux as well which should mean that OC can be built and run natively on any architecture that qemu and gcc support.

First of all I installed Scratchbox1 Hathor-r1 (it has to be hathor and not apophis as the qemu used in apophis is ancient and fails alot with larger compilated builds) as per the instructions on the scratchbox webpage. http://www.scratchbox.org/

For the uclibc based system I choose to install the arm-gcc-uclibc20061004 toolchain as that is what is required for the device I am targeting. I then downloaded ncurses 5.7 from http://invisible-island.net/ncurses/ncurses.html and built and installed it as normal. Then I downloaded libgmp from http://gmplib.org/ and built and installed it. (if you run the tests after building it will fail a few tests with a qemu uncaught signal 11 error but it seems to be ok) and finally I downloaded berkeley db from http://download-east.oracle.com/berkeley-db/db-4.8.26.tar.gz and again built it and installed it. You will probably have to manually move the libs and include files etc. from the BerkeleyDB directory in /usr/local to /usr/local/lib, /usr/local/include....

Then download OC 1.1 from http://www.opencobol.org and build it as per the install docs. When it has completed do a make check and it will pass all but the 4 tests listed above. I have tried a few simple cobol programs and they seem to work ok.

If instead of setting up scratchbox for uclibc but instead choose the cs2005q3.2-glibc-arm (or any other code sourcery toolchain) and repeat the building instructions you will end up with binaries and libs that pass ALL the tests from make check.

I think my problems with the failed tests are caused by either the age of the uClibc I am forced to use or they might be inherent uClibc problems that although uClibc is supposed to be source compatable with glibc it really isn't (i've had problems with strlcat/strlcpy alot recently too)

Russ
btiffin
Posted on: 2010/7/30 8:25
Home away from home
Joined: 2008/6/7
From: CANADA
Posts: 755
Re: OC on ARM -- success
Russ;

Ummm, does this mean that not only can you run COBOL applications on a phone, you can develop and compile them, on a phone?

Cheers,
Brian
rkdavis
Posted on: 2010/7/30 13:36
Just popping in
Joined: 2010/7/23
From:
Posts: 13
Re: OC on ARM -- success
Quote:
Ummm, does this mean that not only can you run COBOL applications on a phone, you can develop and compile them, on a phone?


Well it's not a phone as such that I am targetting, it's a clamshell BUT in theory (YMMV) if you have the other tools available for your phone then yes you can write, compile and run on your phone. Because I was using scratchbox then all requirements for compiling are available and it doesn't take much to then cross compile gcc etc. to actually run on a phone although I wouldn't recommend it. I have compiled the kernel and qt on my device (a 300Mhz Marvell PXA270 with 32meg ram) and that was painfully slow and having to put swap on an sd card is not my idea of a good time or even a good idea if you want your sd card to survive.

YMMV but this should work with Scratchbox2 as well, so nokia phones and handhelds running mameo are covered at least.

What i'm really trying to do eventually though is make cobc /cross compile/ so you can build and debug on an x86 windows or linux box but run on the targeted device (arm, mips,...). It looks like it shouldn't be too hard to setup although a little convoluted as i'll have to build OC several times to get all the bits and pieces in the right places and for the right processor.

I also want to look at getting OC buildable using Buildroot (and Aboriginal Linux and OpenEmbedded and ...) as well but it looks like uClibc isn't going to cut it at leas the version I am using.

I'll experiment more but at the moment i've been side tracked with a more /important/ project for the last few days so haven't been able to put the time into OC that i'd like.

Russ
rkdavis
Posted on: 2010/8/1 16:02
Just popping in
Joined: 2010/7/23
From:
Posts: 13
Re: OC on ARM -- success
I've improved and simplified the method of building OC on non-x86 processors. I'll write it up later today as i'm off out to see a minor league ballgame in a few but now I can build it nativly on anything that is supported by debian and qemu, so mips, arm, sparc.....

Russ
Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 
Copyright (C) 2005 The OpenCOBOL Project. All rights reserved.
Powered by Xoops2 | PHP | MySQL | Apache
ocean-net