Thread overview
The Linux shared library issue
Oct 25, 2005
David Rushby
Oct 26, 2005
Walter Bright
Oct 26, 2005
lgoss007
Nov 01, 2005
Garett Bass
Nov 01, 2005
Kris
October 25, 2005
So I belatedly discovered the "Shared libraries cannot be generated." note in the "Linux Bugs" section of dcompiler.html.  That makes dmd useless on Linux for extending most scripting languages, including Python.

I tried gdc as an alternative, but it crashed with an "internal compiler error" on the first program I tried to compile, and once I circumvented that problem, gdc generated code that segfaults.  The same code doesn't segfault with dmd under Windows, nor when compiled into something other than a shared library by gdc on Linux, so I'm pretty sure the mistake is not mine.  Most of the code in the gdc-generated shared library does work, so it's a bug in the implementation of a particular feature rather than a total inability to create shared libraries.

I'll report both bugs to the gdc maintainer(s), but I wouldn't use in production a compiler in which I discovered two fatal flaws within the first fifteen minutes.

Is there anything I can do to help get dmd's Linux shared library support working?  Is the code that needs to be fixed even open source?


October 26, 2005
"David Rushby" <David_member@pathlink.com> wrote in message news:djk8j7$277m$1@digitaldaemon.com...
> So I belatedly discovered the "Shared libraries cannot be generated." note
in
> the "Linux Bugs" section of dcompiler.html.  That makes dmd useless on
Linux for
> extending most scripting languages, including Python.

I didn't realize that, but you're right.

> Is there anything I can do to help get dmd's Linux shared library support working?  Is the code that needs to be fixed even open source?

The support is about half there in the back end of the compiler (need to generate 'pic' code to make it work). It's almost entirely a back end issue. I suppose I can't avoid the issue any longer :-(


October 26, 2005
In article <djn1ek$2v5n$1@digitaldaemon.com>, Walter Bright says...
>I suppose I can't avoid the issue any longer :-(

Yeah!!!


November 01, 2005
It would be really great to see uniform support between windows/linux in this regard.  This is the one feature I've been hoping would be there by the time I start to work on the linux version of my library.


November 01, 2005
You might be interested in what Pragma is doing with his dynamic-linker/loader project over here: http://dsource.org/forums/viewforum.php?f=70


"Garett Bass" <garettbass@studiotekne.com> wrote in message news:dk8u58$17lc$1@digitaldaemon.com...
> It would be really great to see uniform support between windows/linux in this regard.  This is the one feature I've been hoping would be there by the time I start to work on the linux version of my library.
>