www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - The Linux shared library issue

reply David Rushby <David_member pathlink.com> writes:
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?
Oct 24 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"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

 the "Linux Bugs" section of dcompiler.html.  That makes dmd useless on

 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 :-(
Oct 25 2005
next sibling parent lgoss007 yahoo.com writes:
In article <djn1ek$2v5n$1 digitaldaemon.com>, Walter Bright says...
I suppose I can't avoid the issue any longer :-(

Yeah!!!
Oct 26 2005
prev sibling parent reply "Garett Bass" <garettbass studiotekne.com> writes:
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. 
Nov 01 2005
parent "Kris" <fu bar.com> writes:
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.
 

Nov 01 2005