Thread overview
SCons and D
Jun 08, 2017
Russel Winder
Jun 08, 2017
bachmeier
Jun 08, 2017
Russel Winder
Jun 08, 2017
bachmeier
Jun 09, 2017
Russel Winder
Jun 09, 2017
bachmeier
Jun 10, 2017
Russel Winder
Jun 11, 2017
bachmeier
June 08, 2017
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.)

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 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

June 08, 2017
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?
June 08, 2017
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 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?

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:
   https://bitbucket.org/russel/scons

SCons mainline on BitBucket:
   https://bitbucket.org/scons/scons


-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 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

June 08, 2017
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.
June 09, 2017
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.


-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 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

June 09, 2017
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).
June 10, 2017
On Fri, 2017-06-09 at 18:51 +0000, bachmeier via Digitalmars-d wrote:
> 
[…]
> 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='.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.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 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

June 11, 2017
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.