www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - SCons and D

reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
It seems I am on a bit of a roll getting changesets relating to D
support for SCons into an appropriate state so that they get merged
into the mainline SCons repository. So maybe now is a time to get any
"pet peeves" with D support in SCons fixed.

For myself, I am currently working on a new tool "dub" to handle
getting dependencies from the Dub repository. It works for unit_testing
in my D projects, but I need to write some proper SCons tests before
submitting a pull request to the SCons mainline.

Anyone wanting to try the dub tool now will need to use dub.py from my
SCons_D_Experiments Git repository on BitBucket or GitHub.

(The dmd, ldc, and gdc tools in that repository are just mirrors of
what is in the mainline Mercurial repository on BitBucket, unless some
experiments rather than bug fixes are needed.)

--=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
Jun 08
next sibling parent reply bachmeier <no spam.net> writes:
On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
 It seems I am on a bit of a roll getting changesets relating to 
 D support for SCons into an appropriate state so that they get 
 merged into the mainline SCons repository. So maybe now is a 
 time to get any "pet peeves" with D support in SCons fixed.

 For myself, I am currently working on a new tool "dub" to 
 handle getting dependencies from the Dub repository. It works 
 for unit_testing in my D projects, but I need to write some 
 proper SCons tests before submitting a pull request to the 
 SCons mainline.

 Anyone wanting to try the dub tool now will need to use dub.py 
 from my SCons_D_Experiments Git repository on BitBucket or 
 GitHub.

 (The dmd, ldc, and gdc tools in that repository are just 
 mirrors of what is in the mainline Mercurial repository on 
 BitBucket, unless some experiments rather than bug fixes are 
 needed.)
I'd like to give this a try, but do you have a link to your repository?
Jun 08
parent Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Thu, 2017-06-08 at 14:37 +0000, bachmeier via Digitalmars-d wrote:
 On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
 It seems I am on a bit of a roll getting changesets relating to=C2=A0
 D support for SCons into an appropriate state so that they get=C2=A0
 merged into the mainline SCons repository. So maybe now is a=C2=A0
 time to get any "pet peeves" with D support in SCons fixed.
=20
 For myself, I am currently working on a new tool "dub" to=C2=A0
 handle getting dependencies from the Dub repository. It works=C2=A0
 for unit_testing in my D projects, but I need to write some=C2=A0
 proper SCons tests before submitting a pull request to the=C2=A0
 SCons mainline.
=20
 Anyone wanting to try the dub tool now will need to use dub.py=C2=A0
 from my SCons_D_Experiments Git repository on BitBucket or=C2=A0
 GitHub.
=20
 (The dmd, ldc, and gdc tools in that repository are just=C2=A0
 mirrors of what is in the mainline Mercurial repository on=C2=A0
 BitBucket, unless some experiments rather than bug fixes are=C2=A0
 needed.)
=20 I'd like to give this a try, but do you have a link to your=C2=A0 repository?
Sorry I failed to add the actual links: SCons_D_Experiment on BitBucket: https://bitbucket.org/russel/scons_d_experiment SCons_D_Experiment on GitHub: https://github.com/russel/SCons_D_Experiment My SCons clone on BitBucket:=C2=A0 https://bitbucket.org/russel/scons SCons mainline on BitBucket:=C2=A0 https://bitbucket.org/scons/scons --=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
Jun 08
prev sibling parent reply bachmeier <no spam.net> writes:
On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
 It seems I am on a bit of a roll getting changesets relating to 
 D support for SCons into an appropriate state so that they get 
 merged into the mainline SCons repository. So maybe now is a 
 time to get any "pet peeves" with D support in SCons fixed.
When I create a shared library I get an error message. SharedLibrary('lib2', ['lib2.d']) leads to dmd -oflib2.so -shared -defaultlib=libphobos2.so -L-soname=lib2.so lib2.os Error: unrecognized file extension os Apparently using the .os extension works for C but not with dmd.
Jun 08
parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Thu, 2017-06-08 at 22:03 +0000, bachmeier via Digitalmars-d wrote:
 On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
 It seems I am on a bit of a roll getting changesets relating to=C2=A0
 D support for SCons into an appropriate state so that they get=C2=A0
 merged into the mainline SCons repository. So maybe now is a=C2=A0
 time to get any "pet peeves" with D support in SCons fixed.
=20 When I create a shared library I get an error message. =20 SharedLibrary('lib2', ['lib2.d']) =20 leads to =20 dmd -oflib2.so -shared -defaultlib=3Dlibphobos2.so=C2=A0 -L-soname=3Dlib2.so lib2.os Error: unrecognized file extension os =20 Apparently using the .os extension works for C but not with dmd.
Hummm=E2=80=A6 there is a passing test for creating shared objects, the tes= t must be wrong in some way. Can you email me a small project that exhibits the problem for you, and I will add it to the test suite. --=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
Jun 09
parent reply bachmeier <no spam.net> writes:
On Friday, 9 June 2017 at 07:52:59 UTC, Russel Winder wrote:
 On Thu, 2017-06-08 at 22:03 +0000, bachmeier via Digitalmars-d 
 wrote:
 On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
 It seems I am on a bit of a roll getting changesets relating 
 to D support for SCons into an appropriate state so that 
 they get merged into the mainline SCons repository. So maybe 
 now is a time to get any "pet peeves" with D support in 
 SCons fixed.
When I create a shared library I get an error message. SharedLibrary('lib2', ['lib2.d']) leads to dmd -oflib2.so -shared -defaultlib=libphobos2.so -L-soname=lib2.so lib2.os Error: unrecognized file extension os Apparently using the .os extension works for C but not with dmd.
Hummm… there is a passing test for creating shared objects, the test must be wrong in some way. Can you email me a small project that exhibits the problem for you, and I will add it to the test suite.
I sent you an email with my code. The solution I found was to use SharedLibrary('lib2', ['lib2.d'], SHOBJSUFFIX='.o') instead of the above SharedLibrary call (which I took from the documentation).
Jun 09
parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Fri, 2017-06-09 at 18:51 +0000, bachmeier via Digitalmars-d wrote:
=20
[=E2=80=A6]
 I sent you an email with my code. The solution I found was to use
Could I get you to send it again I appear either not to have received it or I have deleted it before reading it.
 SharedLibrary('lib2', ['lib2.d'], SHOBJSUFFIX=3D'.o')
=20
 instead of the above SharedLibrary call (which I took from the=C2=A0
 documentation).
Certainly that works, but it would be better that you didn't have to do that. This should work "out of the box" without hassle. Also the tests in the test suite for the D tools do not have this and they pass. This would lead to the hypothesis that the D compilers are behaving differently for you and for me, which I suspect means we are working on different platforms, which would indicate a gap in the CI testing for SCons. --=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
Jun 09
parent bachmeier <no spam.net> writes:
On Saturday, 10 June 2017 at 05:36:38 UTC, Russel Winder wrote:

 Could I get you to send it again I appear either not to have 
 received it or I have deleted it before reading it.

 SharedLibrary('lib2', ['lib2.d'], SHOBJSUFFIX='.o')
 
 instead of the above SharedLibrary call (which I took from the
 documentation).
Certainly that works, but it would be better that you didn't have to do that. This should work "out of the box" without hassle. Also the tests in the test suite for the D tools do not have this and they pass. This would lead to the hypothesis that the D compilers are behaving differently for you and for me, which I suspect means we are working on different platforms, which would indicate a gap in the CI testing for SCons.
I sent you another message. I fixed it by adding one line to dmd.py to set that variable.
Jun 10