www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - I'd like to try D, but...

reply Neal Becker <ndbecker2 gmail.com> writes:
My main interest is building python-callable modules (which I currently do 
with C++/boost::python).  Problem is, D can't be used for this, because it 
can't produce shared libraries (except on i386).  This is, as I understand 
it, because the D library/libraries are not built as PIC.

This issue has been around for a _long_ time now.  Is there any hope?
Jun 23 2010
next sibling parent dsimcha <dsimcha yahoo.com> writes:
== Quote from Neal Becker (ndbecker2 gmail.com)'s article
 My main interest is building python-callable modules (which I currently do
 with C++/boost::python).  Problem is, D can't be used for this, because it
 can't produce shared libraries (except on i386).  This is, as I understand
 it, because the D library/libraries are not built as PIC.
 This issue has been around for a _long_ time now.  Is there any hope?

Toolchain issues haven't been getting much attention lately because most efforts have been focused on fixing frontend bugs and finalizing the spec. Now that TDPL is out, the D2 spec is finalized and most of the more severe front end bugs are fixed, toolchain issues should start getting a lot more attention, both from Walter and from the community.
Jun 23 2010
prev sibling next sibling parent Justin Johansson <no spam.com> writes:
Neal Becker wrote:
 My main interest is building python-callable modules (which I currently do 
 with C++/boost::python).  Problem is, D can't be used for this, because it 
 can't produce shared libraries (except on i386).  This is, as I understand 
 it, because the D library/libraries are not built as PIC.
 
 This issue has been around for a _long_ time now.  Is there any hope?

While not wanting to intermingle your topic with mine just above (about killing D1), I cannot envisage much hope so long as the limited development resources are spread so thinly between D1, Safe D, D2 and some vacuous D3. My suggestion to close ranks around D2 are prompted by a desire to see practical completion and implementation of the D language as it now stands, right down to the coalface which includes support for shared libraries on all platforms. Until then, I won't be abandoning C++ as the lack of D's shared library support for Linux has in the past been a serious show-stopper for me. Cheers Justin Johansson
Jun 23 2010
prev sibling next sibling parent reply BCS <none anon.com> writes:
Hello Neal,

 My main interest is building python-callable modules (which I
 currently do with C++/boost::python).  Problem is, D can't be used for
 this, because it can't produce shared libraries (except on i386).
 This is, as I understand it, because the D library/libraries are not
 built as PIC.

DMD will generate PIC. IIRC the issue is something to do with resolving all the right references in all the right places. Also: http://pyd.dsource.org/
 This issue has been around for a _long_ time now.  Is there any hope?
 

... <IXOYE><
Jun 23 2010
parent reply Neal Becker <ndbecker2 gmail.com> writes:
BCS wrote:

 Hello Neal,
 
 My main interest is building python-callable modules (which I
 currently do with C++/boost::python).  Problem is, D can't be used for
 this, because it can't produce shared libraries (except on i386).
 This is, as I understand it, because the D library/libraries are not
 built as PIC.

DMD will generate PIC. IIRC the issue is something to do with resolving all the right references in all the right places. Also: http://pyd.dsource.org/

Yes, I'm very interested in pyd. Is this still actively developed/maintained/used?
Jun 30 2010
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
Neal Becker:
 Yes, I'm very interested in pyd.  Is this still actively 
 developed/maintained/used?

It used to work well enough on D1. I have used it some times, Pyd was one of my motivations to learn D in the first place, because writing Python extensions in D with Pyd is for me much better than using Cython or SWIG. With just a bit of work it can probably work on the latest D1. And with some more work it can be ported to D2. As D2 gets more debugged more D1 libs will be ported to D2. Bye, bearophile
Jun 30 2010
prev sibling parent Sean Kelly <sean invisibleduck.org> writes:
Neal Becker Wrote:

 BCS wrote:
 
 Hello Neal,
 
 My main interest is building python-callable modules (which I
 currently do with C++/boost::python).  Problem is, D can't be used for
 this, because it can't produce shared libraries (except on i386).
 This is, as I understand it, because the D library/libraries are not
 built as PIC.

DMD will generate PIC. IIRC the issue is something to do with resolving all the right references in all the right places. Also: http://pyd.dsource.org/

Yes, I'm very interested in pyd. Is this still actively developed/maintained/used?

I'm not sure that Kirk is maintaining it any longer but he's still around if you want to reach him. Here's his blog: http://kirkmcdonald.blogspot.com/
Jun 30 2010
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2010-06-23 15:42, Neal Becker wrote:
 My main interest is building python-callable modules (which I currently do
 with C++/boost::python).  Problem is, D can't be used for this, because it
 can't produce shared libraries (except on i386).  This is, as I understand
 it, because the D library/libraries are not built as PIC.

 This issue has been around for a _long_ time now.  Is there any hope?

Shared/dynamic libraries are working fine on Mac OS X with Tango. It also works with D2 with some modifications: http://d.puremagic.com/issues/show_bug.cgi?id=4080 -- /Jacob Carlborg
Jun 24 2010
parent reply Sean Kelly <sean invisibleduck.org> writes:
Jacob Carlborg Wrote:

 On 2010-06-23 15:42, Neal Becker wrote:
 My main interest is building python-callable modules (which I currently do
 with C++/boost::python).  Problem is, D can't be used for this, because it
 can't produce shared libraries (except on i386).  This is, as I understand
 it, because the D library/libraries are not built as PIC.

 This issue has been around for a _long_ time now.  Is there any hope?

Shared/dynamic libraries are working fine on Mac OS X with Tango. It also works with D2 with some modifications: http://d.puremagic.com/issues/show_bug.cgi?id=4080

Oops, I suppose I should take care of that ticket :-)
Jun 24 2010
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2010-06-24 21:20, Sean Kelly wrote:
 Jacob Carlborg Wrote:

 On 2010-06-23 15:42, Neal Becker wrote:
 My main interest is building python-callable modules (which I currently do
 with C++/boost::python).  Problem is, D can't be used for this, because it
 can't produce shared libraries (except on i386).  This is, as I understand
 it, because the D library/libraries are not built as PIC.

 This issue has been around for a _long_ time now.  Is there any hope?

Shared/dynamic libraries are working fine on Mac OS X with Tango. It also works with D2 with some modifications: http://d.puremagic.com/issues/show_bug.cgi?id=4080

Oops, I suppose I should take care of that ticket :-)

That would be appreciated. -- /Jacob Carlborg
Jun 25 2010
prev sibling parent reply Neal Becker <ndbecker2 gmail.com> writes:
Sean Kelly wrote:

 Jacob Carlborg Wrote:
 
 On 2010-06-23 15:42, Neal Becker wrote:
 My main interest is building python-callable modules (which I currently
 do
 with C++/boost::python).  Problem is, D can't be used for this, because
 it
 can't produce shared libraries (except on i386).  This is, as I
 understand it, because the D library/libraries are not built as PIC.

 This issue has been around for a _long_ time now.  Is there any hope?

Shared/dynamic libraries are working fine on Mac OS X with Tango. It also works with D2 with some modifications: http://d.puremagic.com/issues/show_bug.cgi?id=4080

Oops, I suppose I should take care of that ticket :-)

Is a similar patch going to work on other systems (Linux?)
Jun 28 2010
parent Jacob Carlborg <doob me.com> writes:
On 2010-06-29 00:45, Neal Becker wrote:
 Sean Kelly wrote:

 Jacob Carlborg Wrote:

 On 2010-06-23 15:42, Neal Becker wrote:
 My main interest is building python-callable modules (which I currently
 do
 with C++/boost::python).  Problem is, D can't be used for this, because
 it
 can't produce shared libraries (except on i386).  This is, as I
 understand it, because the D library/libraries are not built as PIC.

 This issue has been around for a _long_ time now.  Is there any hope?

Shared/dynamic libraries are working fine on Mac OS X with Tango. It also works with D2 with some modifications: http://d.puremagic.com/issues/show_bug.cgi?id=4080

Oops, I suppose I should take care of that ticket :-)

Is a similar patch going to work on other systems (Linux?)

Yes, I'm working on it (for linux). But I've encountered a problem: http://www.curoles.com/j/dso/dso.html this is not my site but I've come as far as on that site, don't know if it's a problem with the compiler or the runtime. -- /Jacob Carlborg
Jun 29 2010