Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users



(1) 2 3 »


Trying a small program in AROS hosted on Raspberry Pi

Joined:
8/24 8:57
From Delta, Canada
Group:
Member
Posts: 12
Offline
To get more familiar with my AROS installation on the RPi I decided to install the SDK and build a hello world. Is there some documentation on how to do this?

First I downloaded the ARM ABI-v0 developer tools from nightly (linux-armhf-sdk), but AROS-SDK-install demands an x86 gcc, which I obviously do not have as I am on ARM.

So I fixed the script (two simple changes). How can I contribute this back in the best way? Can I open a pull request using git somewhere?

With a fresh SDK I typed in a hello world program and tried to build it, which resulted in:


pi@retropie:~/projects/aros/helloworld $ arm-aros-gcc main.c
/usr/bin/ld: cannot find -lposixc
/usr/bin/ld: cannot find -lstdcio
/usr/bin/ld: cannot find -lstdc
/usr/bin/ld: cannot find -lcodesets
/usr/bin/ld: cannot find -lkeymap
/usr/bin/ld: cannot find -lexpansion
/usr/bin/ld: cannot find -lcommodities
/usr/bin/ld: cannot find -ldiskfont
/usr/bin/ld: cannot find -lasl
/usr/bin/ld: cannot find -lmuimaster
/usr/bin/ld: cannot find -ldatatypes
/usr/bin/ld: cannot find -lcybergraphics
/usr/bin/ld: cannot find -lworkbench
/usr/bin/ld: cannot find -licon
/usr/bin/ld: cannot find -lintuition
/usr/bin/ld: cannot find -lgadtools
/usr/bin/ld: cannot find -llayers
/usr/bin/ld: cannot find -laros
/usr/bin/ld: cannot find -lpartition
/usr/bin/ld: cannot find -liffparse
/usr/bin/ld: cannot find -lgraphics
/usr/bin/ld: cannot find -llocale
/usr/bin/ld: cannot find -ldos
/usr/bin/ld: cannot find -lutility
/usr/bin/ld: cannot find -loop
/usr/bin/ld: cannot find -lexec
/usr/bin/ld: cannot find -lautoinit


Looking into /usr/local/aros-sdk/arm-aros/lib and the missing libraries are not there. What is present seems to come from arm/lib in the SDK archive, and then some gcc stuff.

Where can I find or how do I build the missing libraries?

Posted on: 8/29 13:34
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
2016/8/16 0:09
Group:
Member
Posts: 344
Offline
Quote:

hth313 wrote:
To get more familiar with my AROS installation on the RPi I decided to install the SDK and build a hello world. Is there some documentation on how to do this?

if you surf over to www.aros.org there is a list of topics listed at your left side under documentation/developers. Click (and read) all the links (and the links listed therein etc) to get yourself more educated.

Alternatively use the wikibook link here on this site (look to the left of your screen when reading this post and click on "AROS dev Docs", then select your topic of choice).


Quote:

So I fixed the script (two simple changes). How can I contribute this back in the best way? Can I open a pull request using git somewhere?

svn account, ask on developers mailinglist for details if unclear.

Quote:

With a fresh SDK I typed in a hello world program and tried to build it, which resulted in:

..
Where can I find or how do I build the missing libraries?


Either you compile inside aros (hosted on linux if you prefer) or you do it on the host (or any other system for that matter).

In case _inside_ AROS you can setup development by adding files from contribute archive and make sure everything is in place (paths etc)

In case cross-compiling (which effectively your output is showing) you can use the gimmearos script (after you've installed the minimal build requirements manually on your linux box).


At least you're trying instead of bickering so :thumbsup:


Posted on: 8/29 17:30
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
2010/8/30 7:20
Group:
Member
Posts: 1365
Offline
Quote:

So I fixed the script (two simple changes).

you ae building am on arm, ie no cross compilation?
best is you propose your patch on dev ml.
remember we need to keem cross compilation on different arch as an option.

Quote:

/usr/bin/ld: cannot find -lposixc


these libs will be built if you build aros in bin/"target"/AROS/Developer/lib

Posted on: 8/29 17:59
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
2010/8/30 7:20
Group:
Member
Posts: 1365
Offline
also generally if you want to do something constructive for aros, best is imho to leave abi v0 behind and work on trunk (abi v1). even though there arent v1 nightlies for arm target, perhaps it compiles, and if not it needs to be fixed. from there on michal, who will certainly work out of v1 might need some help.

Posted on: 8/29 18:03
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
8/24 8:57
From Delta, Canada
Group:
Member
Posts: 12
Offline
The build I try to do is natively on the RPi, on ARM, for the hosted ARM AROS on the same machine. It is just a hello world application using the provided SDK.

As mentioned, the missing libraries can be found in Development/lib in the contrib package.

In the app development doc I found that using -nostdlib can be used to skip auto including a lot of libraries. However, trying -nostdlib results in:


pi@retropie:~/projects/aros/helloworld $ arm-aros-gcc -nostdlib main.c
/usr/bin/ld: unrecognised emulation mode: armelf_aros
Supported emulations: armelf_linux_eabi armelfb_linux_eabi


The linker supports the mentioned two emulations and the specs file lib/gcc-lib/specs file in the SDK mentions:


*link:
-m armelf_linux_eabi -L/usr/local/aros-sdk/arm-aros/lib


The armelf_aros comes from inside the arm-aros/lib/gcc-lib/collect-aros binary.

The two supported ones should be native armelf variants, I suspect the first is for little endian and the second for big endian (due to the b). The one it is looking for (armelf_aros) is that something related to a cross compiler?

If I link with the libraries, I get a warning about wchar_t being used inconsistently:


pi@retropie:~/projects/aros/helloworld $ arm-aros-gcc -L ~/aros/AROS-20180820-linux-armhf-contrib/Development/lib main.c
/usr/bin/ld: warning: /tmp/cc0LmHZZ.o uses 4-byte wchar_t yet the output is to use 1-byte wchar_t; use of wchar_t values across objects may fail
/usr/bin/ld: unrecognised emulation mode: armelf_aros
Supported emulations: armelf_linux_eabi armelfb_linux_eabi


It seems that I will not get much further with the SDK I downloaded, so the next thing to do is to get the real source tree and look into the issues.

You mentioned a source development list, is that the best way to communicate, or is there some slow pace chat channel or similar too?

Posted on: 8/29 23:09
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
2010/8/30 7:20
Group:
Member
Posts: 1365
Offline
apparently there is irc, but ive never really been to it. except maybe when testing the client to be found in contribs/extras, which has the aros channel as default afair.

ive heard of people getteing their help there, though.

dev ml is not very lively at the moment:
https://mail.aros.org/mailman/listinfo/aros-dev
apparently good part of communication happens privately. but id try to register if i was you.

Posted on: 8/30 3:04
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
8/24 8:57
From Delta, Canada
Group:
Member
Posts: 12
Offline
I registered on the list, thank you for the link.

Posted on: 8/30 8:58
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
8/24 8:57
From Delta, Canada
Group:
Member
Posts: 12
Offline
Just a minor update on this.

After fixing collect-aros to match the emulation on the host (RPi Linux), the linker (ld) stopped complaining and emitted a binary for AROS. Copying it to C: in the installation confirmed that it works in the AROS shell!

Now I will ponder a little bit over this emulation and the SDK, then probably take it to the dev mailing list.

Posted on: 8/31 23:35
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
2016/8/16 0:09
Group:
Member
Posts: 344
Offline
@hth313:
Out of curiosity, which AROS sources did you checkout (vo/v1/on trunk) ?

I'm trying to improve some things with regards to the gimmearos script but compiling AROS itself fails miserably for me and fwiw the sdk script was written with i386 in mind (so that isn't going to work ootb either).

note to self: in their infinite wisdom raspbian does not have gcc-multilib listed in packages because "there is only 32 bit raspbian that is supported").

Posted on: 9/2 5:46
Transfer the post to other applications Transfer


Re: Trying a small program in AROS hosted on Raspberry Pi

Joined:
8/24 8:57
From Delta, Canada
Group:
Member
Posts: 12
Offline
@origami

I downloaded the SDK from the nightly, v0 ARM hosted.

That is probably not the ideal variant to actually use. I was interested in how it worked for developer that wanted to build for AROS, not fiddling with AROS itself. Such person would presumably install the SDK and work from there.

I plan to experiment using calls to POSIX to see if that can be done. Actually, I have already started a bit, but have not got much out of it yet. Sort of trying to make a hybrid AROS/Linux binary for AROS. My overall goal it to get a better understanding of the architecture.

I have downloaded the AROS Git archive, but have not done much with that yet.

Posted on: 9/2 17:59
Transfer the post to other applications Transfer



(1) 2 3 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4456
2 nikolaos
nikolaos
4183
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 clusteruk
clusteruk
2113
9 damocles
damocles
1789
10 BSzili
BSzili
1531
© 2004-2018 AROS Exec