Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (43 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Headlines

 
  Register To Post  

(1) 2 »
thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
Hi all,

We trying to build latest version of odyssey, what mean up2date version of webkit, which in turns mean, that it need all that fresh c++11 addons like threads support and co.

In our gcc on adtools (that include and 4.9.x and latest 5.3.0), thread support is not enabled. Simple anabling it will not works of course, there need to do some code changes.

I for myself not a good coder, so can't do it right and fast, and so, we need someone to do that more or less simple work. Simple it because deadwood already doing that for AROS, and there is aros-diff which he use for building 4.8.x gcc with eanbled thread support for c++ together with all the stuff: https://github.com/ezrec/AROS-mirror/b ... tools/gcc-4.8.3-aros.diff

I already create a BZ on adtools about:
https://github.com/sba1/adtools/issues/12

But Sebastian seems busy with all other stuff, so i trying to find luck from our skilled devs , like for example Salas00, BSZili or anyone else who may have interest doing this.

In the BZ i already describe everything, as well as provide simple test code and all the info. All we need, its just follow deadwood's diff logic, and doing the same in terms of thread support but for our 5.3.0 gcc, and provide changes to Sebastian, so he can apply it to adtools repo.

Currently, that is what we need to fix to continue porting process of newer odyssey. And that should do someone skilled enough, if we want new version of odyssey on os4.

As i say, everything cleary descibed in that BZ on adtools:
https://github.com/sba1/adtools/issues/12

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
Nice move ! Let's hope some of our talented and skilled coders can join the team !

--
AmigaONE X1000 and Radeon RX 560
Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
@K-L
Don't want to give up so early, so just curious where all that brave devs who asking sources before ?:) For sure that not hard after we have AROS diff. I just don't want to do all myself again (and i not skilled enough to make it all allright inside gcc).

Basically just adding that c++11 threading support to adtools will be enough , and will help not only to odyssey, but it just in whole good to have it implemented in gcc. With that AROS diff i assume it should only take 1-2 days of few hours free time in each :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
@kas1e
Take a look at the recent comments by sba1 at https://github.com/sba1/adtools/issues/12 and see if it is progress. I don't quite understand exactly what he is saying but it sounds like he has added something to enable threads.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
@xenic
Yes, Sebastian added it few days ago, and we do some tests with him in that terms: it works in general. At least simple c++11 threaded test cases (see test/ directory in adtools repo).

That all is some "initial" attempt, where Sebastian enable posix-threads, which works over our pthreads.library. There is through some shortcomings currently: we need to provide special linker-script to be able to link final binary which use those c++11 threads. The problem is, that the pthread constructor is called too late, and without shiftin-sections a bit (via that special ld-script) , we will crash. Sebastian says that is fixable in principe in the libthread.a itself , but that in turn mean new SDK and all that wait-when-released-shit. So that "in progress" mean later Sebatian will change it all so no special linker script need to provide.

If anyone want right now to have compiler with enabled posix-threads, he need:

Usuall stuff to download it all:

mkdir /amiga
cd 
/amiga
git 
clone https://github.com/sba1/adtools
cd adtools/
bin/adtclone
bin
/adtcheckout binutils 2.23.2
bin
/adtcheckout gcc 5



Then change in adtools/native-build/makefile:

CROSS_PREFIX?=$(ROOT_DIR)/root-cross
on
CROSS_PREFIX?=/usr/local/amiga/

(so to have compiler installed in /usr/local/amiga/)

and in gcc-build/Makefile add --enable-threads=posix in 2 places.

Then we do (for me on cygwin it is gcc-cross flag, on native probably just gcc flag)

# make -C native-build gcc-cross
wait till sdk and some other archives downloads,unpacks,and binutils start configure procedure.
CTRL+C (to interrupt whole process)
and then:

# make -C native-build additionals-libs gcc-cross

So, build system will also unpack additional-libs (pthreads, zlib and co) to SDK directory.

After we done, we can do "ppc-amigaos-gcc -v" , and there will be : "Thread model: posix"

Simple test case: here

That special linker script (to shift some stuff a bit): here

To compile:

//compile object:
ppc-amigaos-g++ -std=c++11 -ffunction-sections -fdata-sections -MD -c test-thread.cpp -o test-thread.o

//link to binary with special ld-script:
ppc-amigaos-g++ -std=c++11 test-thread.-o test-thread -lpthread  -Wl,--gc-sections -Wl,-T,test-thread-ldscript

//run test case:
5. Ram Disk:> test-thread
Start join
Hello
World
Thread is about to finish
Join done
5. Ram Disk
:>


That all didn't mean it all fully works and as should, but at least such simple test case works, and code in odyssey related to c++11 threads compiles too. So more tests and bug-reports are need it of course.


Edited by kas1e on 2016/1/27 10:22:00
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
@kas1e
Glad to hear there is progress on the threads addition to gcc. Just out of curiosity, I gathered some required packages for Odyssey and installed them in my gcc 5.3.0 SDK. After some file editing and changes, I managed to get Odyssey sources configured. However, compiling stopped after 4 files because of the threads issue. I won't know if it's possible to compile Odyssey on an OS4 system until a thread-fixed gcc 5 is available. It's possible that the cmake configuration didn't work correctly and a compile won't be possible anyway.


Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
@xenic
You better wait when i will commit all os4 specific changes to odyssey's repo, and deadwood will merge it , so you then can easy build it on os4 as well (probably).

You also may want to write mail to deadwood, and he will add you to the our mail-list where we discuss all the things, so you can know where we are at moment.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
@kas1e
I'll try an OS4 compile again when threads are not an issue. Another problem is that Odyssey requires cmake 2.8.12 but the OS4 version on OS4Depot is version 2.8.5. I had to make a number of changes to cmake files to get it to configure and I won't know if I ended up with a correct configuration until we have a thread capable gcc 5. Other programmers might take an interest in Odyssey if it's possible to compile it under OS4.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
Good luck with the work. I hope it gets realised :)

Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
I'm glad to hear that there's progress with C++11 threading. I'd love to be able to simply use C++11 (or newer) features on AmigaOS, especially the new threading standard.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: thread support compiled in the C++ runtime
Quite a regular
Quite a regular


See User information
@xenic
From what I remember, it's the new WebKit that uses C++11 threads. This is why deadwood had to implement them when he updated WebKit for Odyssey 1.25.

This is just like television, only you can see much further.
Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
@BSzili
I guess I incorrectly assumed that the "kasle" branch had the new WebKit. Initially nothing compiled with gcc 5.3.0 but when I added the -std=gnu++11 flag several files compiled but I got these errors:

error: 'once_flag' in namespace 'std' does not name a type
static std::once_flag initializeCompilationThreadsOnceFlag;
error: 'call_once' is not a member of 'std'
std::call_once(initializeCompilationThreadsOnceFlag,

I've never used c++ and thought "call_once" had something to do threads. I guess I need to reevaluate the cmake configuration. Thanks for setting me straight.



Edited by xenic on 2016/1/28 18:36:25
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: thread support compiled in the C++ runtime
Quite a regular
Quite a regular


See User information
@xenic
No, you were correct. His branch is based on 1.25, which uses the new WebKit with the C++11 thread requirement.

This is just like television, only you can see much further.
Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
@xenic
Quote:

error: 'once_flag' in namespace 'std' does not name a type
static std::once_flag initializeCompilationThreadsOnceFlag;
error: 'call_once' is not a member of 'std'
std::call_once(initializeCompilationThreadsOnceFlag,


That is exactly tasty c++11 threads :) So, to pass it all, you need to build 5.3.0 with posix-thread enabled as i describe previously :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
@kas1e
OK. It's good to know I was on the right track. However, I still need to check out the cmake configuration files. For example, cmake isn't finding the compiler ID and when I ran Snoopy it turned out that cmake (or gcc) is looking for cc1 in an Odyssey directory instead of in the SDK.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
@xenic

Quote:

OK. It's good to know I was on the right track. However, I still need to check out the cmake configuration files. For example, cmake isn't finding the compiler ID and when I ran Snoopy it turned out that cmake (or gcc) is looking for cc1 in an Odyssey directory instead of in the SDK.


As we discussed in my other thread about cmake I had a similar thing, but I noticed that it skipped past that bit was actually failing on creating a directory in CMakeFiles dir it had actually created the test files! Then somehow failed to realise this.

I'd look for an cmake option that disables testing of the tool chain, if that's possible.

Go to top
Re: thread support compiled in the C++ runtime
Just can't stay away
Just can't stay away


See User information
@broadblues
Quote:
As we discussed in my other thread about cmake I had a similar thing, but I noticed that it skipped past that bit was actually failing on creating a directory in CMakeFiles dir it had actually created the test files! Then somehow failed to realise this.

I'd look for an cmake option that disables testing of the tool chain, if that's possible.


Once I added the path to 'cc1' in the SDK:S/gcc-startup file the problem with finding the compiler ID was resolved. I've reached the point where I'm getting a compile but it stops when it encounters an error. I need to find a way to get cmake to report the errors and continue so I can identify all the errors not related to the threads issue.




Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: thread support compiled in the C++ runtime
Just popping in
Just popping in


See User information
Hi all.

I've made a few inquiries and posts on this topic in the "We so need an updated browser" thread.

Looking at github repo, it looks like someone last commented there back in July.

Does anyone know where the bouncing boing ball landed on this?

Pardon the potential cross-post. In this thread, I'm inquiring specifically about the adtools/git repo posts on C++11 threading support in the GNU C++ Standard Library for adtools in GCC 5.3.0 -- irrespective of its use (i.e. supporting a browser port, the topic which led me this problem).

It's clear to me that a full C++11 Std Lib is a foundational problem/solution, and that threads/pthreads is the sub-issue (or more specifically the lack thereof).

If I can find a way to throw in some hours/people at the issue, I'm absolutely going to coordinate with the adtools maintainers before/during/after doing anything.

At this point, I'm wondering about people's thoughts/up-to-date awareness on these 2 issues...

thread support compiled in the C++ runtime #12

and

Issue with std::mutex (c++11) #34

Go to top
Re: thread support compiled in the C++ runtime
Home away from home
Home away from home


See User information
@stonecracker

May i say that i absolutely adore your efforts on this?

You came (pretty much) from nowhere and the first thing you do is not ask for software but offer to help with some fundamental missing SDK stuff.

Kudos, sir!

I'm going to watch this space as i cannot really help with coding, only with testing as some of my ports would benefit from c++11.

Please keep on, we so need help

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: thread support compiled in the C++ runtime
Quite a regular
Quite a regular


See User information
@stonecracker

Great!


+1

Retired
Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project