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 4 (5) 6 »


Re: a more modern gcc?

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Quote:

simplex wrote:
I looked up the ucontext.h source and I think maybe you meant that I should change it to struct ucontext_t. I made that change and I’'ll update the moment I know something.



no, ucontext_t should be a typedef of type struct xxxx.



Posted on: 4/9 14:49
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Quote:

simplex wrote:
Now it failed on not finding Xcursor.h. Found and installed the Fedora package for that, continuing…


Glad to see it is making progress ... every day is an adventure lol.

Posted on: 4/9 14:50
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: a more modern gcc?

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

simplex wrote:
Now it failed on not finding Xcursor.h. Found and installed the Fedora package for that, continuing…


you need to locate package that contains this x header on your host and install it. i could look up some very old configure invokes i needed, they are mentioned in build instructions on aros site, today i dont bother, dont ask me why. perhaps sdl is enough.

Posted on: 4/9 15:01
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2010/8/30 7:20
Group:
Member
Posts: 1119
Offline
unfortunately it seems my old instructions building aros m68k and x86 got deleted, amigaforum.de points now to apollo forum or such. but then they were outdated at best.

the problem you have indicates you almost did it imho. read
http://aros.sourceforge.net/documentation/developers/compiling.php
especially configuring, you may need to enable --enable-x11-shm or the like, depends on your host i guess. but it will be easy to solve.

Posted on: 4/9 15:11
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
The changes I made above got me a successful compile (including the change to struct ucontext_t). I can start AROS hosted and replicate previous bugs.

Unfortunately I still can’t compile a C++ program. This is probably on me but here is what I’ve done:

1) Created a local directory in the AROS tree.

2) Wrote a simple hello.cxx file.

3) Invoked x86_64-aros-g++ hello.cxx.

Now I get a linker error; stuff like:

There are undefined symbols in 'a.out':
U pthread_cond_broadcast /home/cantanima/Downloads/AROS-20180326-source/bin/linux-x86_64/gen/host/tools/crosstools/gcc/x86_64-aros/libstdc++-v3/include/x86_64-aros/bits/gthr-default.h:852
U pthread_cond_destroy /home/cantanima/Downloads/AROS-20180326-source/bin/linux-x86_64/gen/host/tools/crosstools/gcc/x86_64-aros/libstdc++-v3/include/x86_64-aros/bits/gthr-default.h:884

…and more along those lines.

I’m a bit involved with my own work at the moment, but I’m quite sure I can work this out on my own at a later time; it’s obviously a matter of finding the directory containing the object files. I’d probably have this issue in C, too. That said, if anyone knows what the issue is, I won’t mind if they tell.

Posted on: 4/9 16:04
_________________
Programming is a pursuit in which an unintelligent machine demonstrates conclusively to intelligent people just what fools they are. Do you think that you are a clever person? Take up programming, and the computer will quickly disabuse you of this notion.
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Quote:

simplex wrote:
The changes I made above got me a successful compile (including the change to struct ucontext_t). I can start AROS hosted and replicate previous bugs.

Unfortunately I still can’t compile a C++ program. This is probably on me but here is what I’ve done:

1) Created a local directory in the AROS tree.

2) Wrote a simple hello.cxx file.

3) Invoked x86_64-aros-g++ hello.cxx.

Now I get a linker error; stuff like:

There are undefined symbols in 'a.out':
U pthread_cond_broadcast /home/cantanima/Downloads/AROS-20180326-source/bin/linux-x86_64/gen/host/tools/crosstools/gcc/x86_64-aros/libstdc++-v3/include/x86_64-aros/bits/gthr-default.h:852
U pthread_cond_destroy /home/cantanima/Downloads/AROS-20180326-source/bin/linux-x86_64/gen/host/tools/crosstools/gcc/x86_64-aros/libstdc++-v3/include/x86_64-aros/bits/gthr-default.h:884

…and more along those lines.

I’m a bit involved with my own work at the moment, but I’m quite sure I can work this out on my own at a later time; it’s obviously a matter of finding the directory containing the object files. I’d probably have this issue in C, too. That said, if anyone knows what the issue is, I won’t mind if they tell.


try adding -static-libstdc++. AROS doesnt (yet) have a shared libstdc++ implementation, and the compiler needs to know we are staticaly linking so that it can link in the necessary support (pthreads).


You will want to look into using a mmakefile.src at some point to simplify building, since it will then use the build system and make sure the correct flags etc are used to compile the code. Theres plenty of examples for small single file projects, and c++ projects so it should be easy to see how to make one work and get familiar.


They are generaly of the form

#MM my-projects-meta-target : some-prequisite-meta-target

MY_SOURCES := sourcefile_a sourcefile_b

%build_prog mmake=my-projects-meta-target files=$(MY_SOURCES)


and make it with

"make my-projects-meta-target" from the top level AROS build directory.

.. Though you will need to check the actual macro invocation format ..

Posted on: 4/9 16:26
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Just a heads up: we might have a c++11 capable compiler but some things are not enabled. Our stdc implementation is missing stuff so the c++11 math features for instance (e.g in the std:: namespace) will be missing. Also some AROS/AmigaOS headers still need fixes for use in c++ code, but quite a bit should already be usable.

Posted on: 4/9 16:52
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2011/8/1 19:54
From not Virginia :-( nor Flagstaff :-( nor Gaeta :-( :-( :-(
Group:
Member
Posts: 62
Offline
Quote:

Kalamatee wrote:

try adding -static-libstdc++.

That did the trick. Thanks!
Quote:
You will want to look into using a mmakefile.src at some point to simplify building, since it will then use the build system and make sure the correct flags etc are used to compile the code.

OK. I’m used to makefiles, so hopefully that won’t be a problem.

Posted on: 4/9 19:48
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Quote:

wawa wrote:
Quote:

Kalamatee wrote:
... there should be rules in the build system to re-create the patch for gcc after the modification but im not 100% sure offhand.


would be great if they were, its pita, these diffs, but i can fix it and make a patch tomorrow, by hand.. errm by diff and commit it if its desirable.


Edit the code where it is extracted as part of building, then once modified issue "make crosstools-gcc-create-patch"

It will move your existing source to a tmp dir, extract the sources again and diff the results into a new file.



Posted on: 4/18 7:49
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: a more modern gcc?

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Quote:

Kalamatee wrote:
Quote:

simplex wrote:
I looked up the ucontext.h source and I think maybe you meant that I should change it to struct ucontext_t. I made that change and I’'ll update the moment I know something.



no, ucontext_t should be a typedef of type struct xxxx.




I would be interested to see the contents of your ucontext.h - could you perhaps email it to me at kalamatee@gmail.com

Posted on: 4/18 7:50
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer



« 1 2 3 4 (5) 6 »



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
4405
2 magorium
magorium
4095
3 nikolaos
nikolaos
3962
4 phoenixkonsole
phoenixkonsole
3903
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2777
7 mazze
mazze
2221
8 Kalamatee
Kalamatee
2139
9 clusteruk
clusteruk
2112
10 damocles
damocles
1789
© 2004-2018 AROS Exec