www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 8505

reply Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Issue 8505 remains a threads regression problem as far as I can see.
Works fine with LDC2 and DMD 2.059, fails dismally with DMD 2.060.

http://d.puremagic.com/issues/show_bug.cgi?id=3D8505

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Dec 26 2012
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 12/26/2012 7:30 AM, Russel Winder wrote:
 Issue 8505 remains a threads regression problem as far as I can see.
 Works fine with LDC2 and DMD 2.059, fails dismally with DMD 2.060.

 http://d.puremagic.com/issues/show_bug.cgi?id=8505

I know this is asking a lot, but very few people understand threads well enough to investigate this. Would you be willing to?
Dec 26 2012
next sibling parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
12/27/2012 2:12 AM, Walter Bright пишет:
 On 12/26/2012 7:30 AM, Russel Winder wrote:
 Issue 8505 remains a threads regression problem as far as I can see.
 Works fine with LDC2 and DMD 2.059, fails dismally with DMD 2.060.

 http://d.puremagic.com/issues/show_bug.cgi?id=8505

I know this is asking a lot, but very few people understand threads well enough to investigate this. Would you be willing to?

By looking at the code I see it's almost the same as in issue 8774. http://d.puremagic.com/issues/show_bug.cgi?id=8774 I think the root case is exactly the same - stack corruption with a nested closure. So if you have some time I'd ask you to take a look at 8774 as there are no threads nor standard library involved in the latest reduced test-case that was derived from similar code. Anyway I'm going to investigate 8505 too. -- Dmitry Olshansky
Dec 26 2012
parent Walter Bright <newshound2 digitalmars.com> writes:
On 12/26/2012 2:38 PM, Dmitry Olshansky wrote:
 So if you have some time I'd ask you to take a look at 8774 as there are no
 threads nor standard library involved in the latest reduced test-case that was
 derived from similar code.

Thank you for doing the reduction. I looked at it, though, and it is terrifyingly complex :-)
 Anyway I'm going to investigate 8505 too.

Thank you.
Dec 26 2012
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 12/27/2012 3:37 AM, Russel Winder wrote:
 On Wed, 2012-12-26 at 14:12 -0800, Walter Bright wrote:
 […]
 I know this is asking a lot, but very few people understand threads well enough
 to investigate this. Would you be willing to?

Willing, yes; caveat actually being able to build DMD, Druntime and Phobos from Git clones. Able, not so sure, apart from 2012-12-30 and 2013-01-01 I seem to have very few free hours between now and end of February. I'll see if I can get the Git clone / build bit working to lower the barrier to entry.

Thank you for giving it a go. For this issue, I don't think you need to build the compiler (just download the latest beta), but you will need to be able to build the library.
Dec 27 2012
prev sibling parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 12/27/2012 03:37 AM, Russel Winder wrote:

 Willing, yes; caveat actually being able to build DMD, Druntime and
 Phobos from Git clones.

This project may be helpful: https://github.com/carlor/dlang-workspace It has been announced here: http://forum.dlang.org/thread/ygwzndxbwzrxzlhuooty forum.dlang.org I had to do an additional step to get it working: $ chmod a+x posix/gen.sh Ali
Dec 27 2012
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 12/28/2012 6:35 AM, Russel Winder wrote:
 Also I think this needs to be made into a Git multi-module project so
 that the cloning and update pulling of the repositories is handled
 automatically by Git.

 I have rewritten the script to handle symbolic links and cleaning but
 this still leaves a problem with one of the components which insists on
 an exact relative position of components as real directories. This means
 there are too many assumptions in the DMD/Druntime/Phobos build for it
 to be considered stable.

Which component and where is the problem?
 Whilst I think SCons can easily handle all this better than the Make
 scripts currently there, I have no intention of promoting that solution
 as I realize many want to promote a D-based build solution for C, C++, D
 systems.

 Also of course, I am a n00b to the build of DMD/Druntime/Phobos and so
 have no right to have strong opinions :-)  What I can say is that the
 current system isn't really up to scratch for someone wading in to it
 from scratch.

Dec 28 2012
next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 12/29/12 6:01 AM, Russel Winder wrote:
 On Fri, 2012-12-28 at 10:53 -0800, Walter Bright wrote:
 […]
 Which component and where is the problem?

The Phobos build depends on Druntime and makes the assumptions that it is in ../druntime via the: ${MAKE} -C ../druntime … line in the posix.mak file. I would have thought DMD, Druntime and Phobos should be buildable independently but this seems not to be the case, in which case they should perhaps be a single multi-module project.

Phobos must build druntime because on Posix the druntime library is integrated within the final library, libphobos.a. Andrei
Dec 29 2012
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 12/29/2012 3:01 AM, Russel Winder wrote:
 On Fri, 2012-12-28 at 10:53 -0800, Walter Bright wrote:
 […]
 Which component and where is the problem?

The Phobos build depends on Druntime and makes the assumptions that it is in ../druntime via the: ${MAKE} -C ../druntime … line in the posix.mak file.

That is controlled by the line: DRUNTIME_PATH = ../druntime in posix.mak. What would be a better default?
 I would have thought DMD, Druntime and Phobos should be buildable
 independently but this seems not to be the case, in which case they
 should perhaps be a single multi-module project.

The order to build things is dmd, druntime, phobos. Perhaps it was not the best idea to make them separate projects, but I think we're stuck with that now.
 How do GDC and LDC relate to Druntime and Phobos?

I don't know.
Dec 29 2012
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 12/29/2012 1:40 PM, Russel Winder wrote:
 I think having DMD, Druntime and Phobos as distinct Git repositories is
 right, which means that using a super-project such as
 https://github.com/carlor/dlang-workspace with the three as submodules
 makes a great deal of sense. Then GDC and LDC can organize things as
 they need.

I didn't know there was such a thing as a super-project!
Dec 29 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-12-29 22:43, Walter Bright wrote:

 I didn't know there was such a thing as a super-project!

That has been suggested several times before. -- /Jacob Carlborg
Dec 30 2012
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 12/30/2012 10:56 AM, Jacob Carlborg wrote:
 That has been suggested several times before.

Yeah, well, there is a *lot* of information posted here every day. I doubt anyone could keep up with it all, at least I can't.
Dec 30 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-12-30 20:33, Walter Bright wrote:

 Yeah, well, there is a *lot* of information posted here every day. I
 doubt anyone could keep up with it all, at least I can't.

It sure is. Some information are repeated more often than others. -- /Jacob Carlborg
Dec 30 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, 2012-12-26 at 14:12 -0800, Walter Bright wrote:
[=E2=80=A6]
 I know this is asking a lot, but very few people understand threads well =

 to investigate this. Would you be willing to?

Willing, yes; caveat actually being able to build DMD, Druntime and Phobos from Git clones. Able, not so sure, apart from 2012-12-30 and 2013-01-01 I seem to have very few free hours between now and end of February. I'll see if I can get the Git clone / build bit working to lower the barrier to entry. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 27 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, 2012-12-27 at 11:34 -0800, Ali =C3=87ehreli wrote:
 On 12/27/2012 03:37 AM, Russel Winder wrote:
=20
  > Willing, yes; caveat actually being able to build DMD, Druntime and
  > Phobos from Git clones.
=20
 This project may be helpful:
=20
    https://github.com/carlor/dlang-workspace

Sadly this does not work with symbolic links due to use of .. within a shell script that uses cd. The script needs rewriting to set up absolute paths at the outset and then work with them rather than relative paths. I guess I should do the rewrite and submit a pull request. We'll see.
 It has been announced here:
=20
    http://forum.dlang.org/thread/ygwzndxbwzrxzlhuooty forum.dlang.org
=20
 I had to do an additional step to get it working:
=20
    $ chmod a+x posix/gen.sh

Only needed if you want to do: $ posix/gen.sh rather than=20 $ bash posix/gen.sh --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 28 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 2012-12-28 at 12:34 +0000, Russel Winder wrote:
 On Thu, 2012-12-27 at 11:34 -0800, Ali =C3=87ehreli wrote:
 On 12/27/2012 03:37 AM, Russel Winder wrote:
=20
  > Willing, yes; caveat actually being able to build DMD, Druntime and
  > Phobos from Git clones.
=20
 This project may be helpful:
=20
    https://github.com/carlor/dlang-workspace

Sadly this does not work with symbolic links due to use of .. within a shell script that uses cd. The script needs rewriting to set up absolute paths at the outset and then work with them rather than relative paths. =20 I guess I should do the rewrite and submit a pull request. We'll see.

It also needs to have a clean as well as a generate. Looks like a sever rewrite is coming up! --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 28 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, 2012-12-27 at 11:34 -0800, Ali =C3=87ehreli wrote:
 On 12/27/2012 03:37 AM, Russel Winder wrote:
=20
  > Willing, yes; caveat actually being able to build DMD, Druntime and
  > Phobos from Git clones.
=20
 This project may be helpful:
=20
    https://github.com/carlor/dlang-workspace

Also I think this needs to be made into a Git multi-module project so that the cloning and update pulling of the repositories is handled automatically by Git. I have rewritten the script to handle symbolic links and cleaning but this still leaves a problem with one of the components which insists on an exact relative position of components as real directories. This means there are too many assumptions in the DMD/Druntime/Phobos build for it to be considered stable. Whilst I think SCons can easily handle all this better than the Make scripts currently there, I have no intention of promoting that solution as I realize many want to promote a D-based build solution for C, C++, D systems. Also of course, I am a n00b to the build of DMD/Druntime/Phobos and so have no right to have strong opinions :-) What I can say is that the current system isn't really up to scratch for someone wading in to it from scratch. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 28 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 2012-12-28 at 10:53 -0800, Walter Bright wrote:
[=E2=80=A6]
 Which component and where is the problem?

The Phobos build depends on Druntime and makes the assumptions that it is in ../druntime via the: ${MAKE} -C ../druntime =E2=80=A6 line in the posix.mak file. I would have thought DMD, Druntime and Phobos should be buildable independently but this seems not to be the case, in which case they should perhaps be a single multi-module project. How do GDC and LDC relate to Druntime and Phobos? --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 29 2012
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Saturday, 29 December 2012 at 11:01:20 UTC, Russel Winder 
wrote:
 How do GDC and LDC relate to Druntime and Phobos?

GDC and LDC both use druntime/Phobos, but integrate it into their own build system instead of relying on the makefiles in the upstream repositories. David
Dec 29 2012
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Saturday, 29 December 2012 at 11:01:20 UTC, Russel Winder 
wrote:

 I would have thought DMD, Druntime and Phobos should be 
 buildable
 independently but this seems not to be the case

Not much in D compiles without druntime, for the vast majority purposes it's a necessity. Also, there are bits of the language itself that are dependant on phobos (x**y) The 3 are pretty inextracably linked together.
Dec 29 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, 2012-12-29 at 13:16 -0800, Walter Bright wrote:
[=E2=80=A6]
 The order to build things is dmd, druntime, phobos. Perhaps it was not th=

 idea to make them separate projects, but I think we're stuck with that no=

[=E2=80=A6] I get the feeling GDC and LDC would be hard to manage if druntime and Phobos were tightly integrated with DMD so that split is actually good. I think having DMD, Druntime and Phobos as distinct Git repositories is right, which means that using a super-project such as https://github.com/carlor/dlang-workspace with the three as submodules makes a great deal of sense. Then GDC and LDC can organize things as they need. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 29 2012
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, December 29, 2012 13:43:11 Walter Bright wrote:
 On 12/29/2012 1:40 PM, Russel Winder wrote:
 I think having DMD, Druntime and Phobos as distinct Git repositories is
 right, which means that using a super-project such as
 https://github.com/carlor/dlang-workspace with the three as submodules
 makes a great deal of sense. Then GDC and LDC can organize things as
 they need.

I didn't know there was such a thing as a super-project!

You can integrate git repositories into other git repositories as submodules. http://git-scm.com/book/en/Git-Tools-Submodules - Jonathan M Davis
Dec 29 2012
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, 2012-12-29 at 13:49 -0800, Jonathan M Davis wrote:
 On Saturday, December 29, 2012 13:43:11 Walter Bright wrote:
 On 12/29/2012 1:40 PM, Russel Winder wrote:
 I think having DMD, Druntime and Phobos as distinct Git repositories =



 right, which means that using a super-project such as
 https://github.com/carlor/dlang-workspace with the three as submodule=



 makes a great deal of sense. Then GDC and LDC can organize things as
 they need.

I didn't know there was such a thing as a super-project!

You can integrate git repositories into other git repositories as submodu=

=20
 http://git-scm.com/book/en/Git-Tools-Submodules
=20
 - Jonathan M Davis

cf. https://github.com/russel/dlang-workspace/tree/submodules --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 29 2012
prev sibling parent Russel Winder <russel winder.org.uk> writes:
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, 2012-12-30 at 19:56 +0100, Jacob Carlborg wrote:
 On 2012-12-29 22:43, Walter Bright wrote:
=20
 I didn't know there was such a thing as a super-project!

That has been suggested several times before.

https://github.com/russel/dlang-workspace/tree/submodules based on: https://github.com/carlor/dlang-workspace --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Dec 30 2012