Amiga.org
Operating System Specific Discussions => AROS Research Operating System => Topic started by: Ranchu on January 09, 2005, 12:09:30 PM
-
I want to start developing some software utilities for AROS, however I'm having some difficulties getting the development environment set up.
I've got AROS running through Linux and I have downloaded the AROS source code but that's about as far as I got. I tried to follow the development manual on the AROS website but got lost when they started talking about the build tools required.
-
If you don't want to integrate your code into the AROS CVS (yet), all you need to do is set up a crosscompiler. In order to do that you can compile AROS itself, in which case the crosscompiler (a fake one, but which does the right job) is automatically set up for you under the
bin/linux-i386/tools/i386-linux/
directory, within the toplevel AROS source dir.
There you'll find i386-aros-gcc, i386-aros-ld and so on which you can use to make your own programs runnable under AROS.
Hope that helps.
-
I don't want to start work on AROS itself at this point, so I have no need for access to their CVS.
I'm need to set up the development environment so that I can write utilities for AROS.
-
Ranchu wrote:
I don't want to start work on AROS itself at this point, so I have no need for access to their CVS.
I'm need to set up the development environment so that I can write utilities for AROS.
Yes, and what I told you applies perfectly well to your case: you said you aready have the AROS sources, so the fastest way for you to get ready is to compile those sources and get the (fake) crosscompiler from where I told you.
Alternatively, you can download the linux binary from the download page, and from there also download the SDK package. You'll unpack the SDK package somewhere, run the installation script in it and it will automatically set up for you the (fake) crosscompiler.
-
Okay I've installed the AROS SDK and put the bin folder in my path.
When I run i386-aros-gcc -c hello.c
it compiles fine but when i run i386-aros-gcc -o hello hello.c
it gives me the following error:
ld: cannot find -lgcc_s
Here is the output from i386-aros-gcc -v hello.c
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Reading specs from /usr/share/aros-sdk/i386-aros/lib/gcc-lib/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=4 -D__AROS__ -D__AROS__ -nostdinc -isystem /usr/share/aros-sdk/i386-aros/include -isystem /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/include hello.c -quiet -dumpbase hello.c -auxbase hello -version -o /tmp/ccDz4jrR.s
GNU C version 3.3.4 (i486-slackware-linux)
compiled by GNU C version 3.3.4.
GGC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=96845
#include "..." search starts here:
#include <...> search starts here:
/usr/share/aros-sdk/i386-aros/include
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/include
End of search list.
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/as -V -Qy -o /tmp/ccmZorxF.o /tmp/ccDz4jrR.s
GNU assembler version 2.15.90.0.3 (i486-slackware-linux) using BFD version 2.15.90.0.3 20040415
/usr/share/aros-sdk/i386-aros/lib/gcc-lib/collect-aros -m elf_i386 -L/usr/share/aros-sdk/i386-aros/lib /usr/share/aros-sdk/i386-aros/lib/startup.o -L/usr/lib/gcc-lib/i486-slackware-linux/3.3.4 -L/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/lib -L/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../.. /tmp/ccmZorxF.o -lgcc --as-needed -lgcc_s --no-as-needed -lamiga -larossupport -larosc -lm -lgcc --as-needed -lgcc_s --no-as-needed -lautoinit
ld: cannot find -lgcc_s
I'm running Slackware 10.0.
Any ideas?
-
I'm not an expert in AROS environnement but I can recommend you :
1. try > gcc hello.c
it may give you an exe called by default 'a.out'
2. Your command line is wrong during the linking
> gcc -o hello hell.o (and not hello.c !!)
Regards
-
Any ideas?
Yup, I forgot to add the -static flag to the line where the real gcc is invoked. I fixed this in the CVS, so tonight's build should be fine, but you can simply open the i386-aros-gcc file and add -static at the end of the command line it contains. Tell me if that works.
-
That seems to have fixed it falemagn. I can now successfully compile and run a very simple program which outputs text to the console (the only library it uses is stdio).
However I'm now having a problem compiling the Zune "Hello World" example from AROS' website. The error I get is:
There are undefined symbols in 'hello':
U MUI_MakeObject
U MUI_NewObject
Am I correct to assume there is a problem with my library files? I'm using the AROS SDK downloaded a couple of days ago.
-
However I'm now having a problem compiling the Zune "Hello World" example from AROS' website. The error I get is:
There are undefined symbols in 'hello':
U MUI_MakeObject
U MUI_NewObject
That's because those functions are in the libmui.a library, so you need to append -lmui at the end of the command line which you use to produce the executable. If this is not mentioned in the example, then there's a bug in the documentation.
However, you could avoid linking with that library if you do this
#define MUIMASTER_YES_INLINE_STDARG
before including any header file related to Zune/MUI.
-
Thanks again falemagn, I'm starting to think you know this stuff ;-)
I'm not very familiar with the AmigaOS API (most of my programming has been in Windows and Linux). What would you recommend as a resource? I was thinking of buying a copy of the Amiga Development CD.
-
Thanks again falemagn, I'm starting to think you know this stuff
Well, I better do, as I'm one of the AROS developers ;-)
I'm not very familiar with the AmigaOS API (most of my programming has been in Windows and Linux). What would you recommend as a resource? I was thinking of buying a copy of the Amiga Development CD.
That's certainly a good idea, yes.
-
innoideia was nice, but looks like it is closed now! =o(
http://utilitybase.com/article?action=show&id=68
ps: the rkms was online on net too...but i think it also went down
-
CoolCat wrote:
innoideia was nice, but looks like it is closed now! =o(
http://utilitybase.com/article?action=show&id=68
ps: the rkms was online on net too...but i think it also went down
Brought back to life by the Wayback Machine! :-)
http://web.archive.org/web/20040216024756/www.innoidea.hu/subsites/amiga/developer/phpwebdev.php (http://web.archive.org/web/20040216024756/www.innoidea.hu/subsites/amiga/developer/phpwebdev.php)