www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dynamic libraries not runtime loadable on linux after all? confused by

reply "J" <j private-do-not-reply.org> writes:
I thought that runtime loading of dynamic libraries was 
implemented on Linux. But the code says otherwise.

I'm looking at the master branch of 
https://github.com/D-Programming-Language/druntime.git

When I look at druntime/src/rt/dmain2.d, commit 
45a0838a7108850a20da3be5850976024d91f5ed from July 15 2013, the 
following appears:

extern (C) void* rt_loadLibrary(in char[] name)
{
     version (Windows)
     {
       // ... omit windows implementation

     else version (Posix)
     {
         throw new Exception("rt_loadLibrary not yet implemented 
on Posix.");
     }
}

Is the implementation hiding on a different branch perhaps?  Why 
were folks saying it was done?

Thanks.

J
Jul 26 2013
next sibling parent reply "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Friday, July 26, 2013 21:42:57 J wrote:
 Is the implementation hiding on a different branch perhaps? Why
 were folks saying it was done?
No one said that it was done. We've only just added support for creating shared libraries to link in with the most recent release, so there's a good chance that more work will have to be done there. Much as it may be related, loading a shared library at runtime is a whole other ball game, and there definitely is a lot of work to be done there (particularly with regards to the GC). We're starting to get proper shared library support, but we definitely aren't done yet. We didn't even put anything about shared library support in the 2.063 changelog because of how new it was. - Jonathan M Davis
Jul 26 2013
parent reply "J" <j private-do-not-reply.org> writes:
On Friday, 26 July 2013 at 20:21:43 UTC, Jonathan M Davis wrote:
 On Friday, July 26, 2013 21:42:57 J wrote:
 Is the implementation hiding on a different branch perhaps? Why
 were folks saying it was done?
No one said that it was done. We've only just added support for creating shared libraries to link in with the most recent release, so there's a good chance that more work will have to be done there. Much as it may be related, loading a shared library at runtime is a whole other ball game, and there definitely is a lot of work to be done there (particularly with regards to the GC). We're starting to get proper shared library support, but we definitely aren't done yet. We didn't even put anything about shared library support in the 2.063 changelog because of how new it was. - Jonathan M Davis
I got to slide 12 of http://dconf.org/talks/nowak.pdf Martin Nowak's DConf2013 talk, and it seemed to indicate that Runtime.loadLibary() support was "currently" available; perhaps that meant only on Windows. Is there an open ticket I can follow the know how the Linux progress is coming? Thanks. J
Jul 26 2013
parent reply "J" <do-no-reply no.reply.com> writes:
Nobody is working on runtime loading of shared libaries for 
linux? Really??

On Friday, 26 July 2013 at 22:21:48 UTC, J wrote:
 Is there an open ticket I can follow the know how the Linux 
 progress is coming?
Jul 30 2013
next sibling parent "Meta" <jared771 gmail.com> writes:
On Tuesday, 30 July 2013 at 15:27:17 UTC, J wrote:
 Nobody is working on runtime loading of shared libaries for 
 linux? Really??

 On Friday, 26 July 2013 at 22:21:48 UTC, J wrote:
 Is there an open ticket I can follow the know how the Linux 
 progress is coming?
It's top priority, but I don't know of any place that you can follow development. You could check here: https://github.com/D-Programming-Language.
Jul 30 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Tuesday, 30 July 2013 at 15:27:17 UTC, J wrote:
 Nobody is working on runtime loading of shared libaries for 
 linux? Really??

 On Friday, 26 July 2013 at 22:21:48 UTC, J wrote:
 Is there an open ticket I can follow the know how the Linux 
 progress is coming?
It's a limited team of people who have many other commitments. You can lobby for it though if you want though through various channels. That said, someone probably is working on it somewhere, although perhaps not hugely actively, I don't know.
Jul 30 2013
prev sibling parent Martin Nowak <code dawg.eu> writes:
On 07/30/2013 05:27 PM, J wrote:
 Nobody is working on runtime loading of shared libaries for linux? Really??
I am working on the implementation and it's my top priority but I'm currently pretty short on time. I will be able to progress mid to end of august.
Jul 31 2013
prev sibling parent reply "Michael" <pr m1xa.com> writes:
On Friday, 26 July 2013 at 19:42:59 UTC, J wrote:
 I thought that runtime loading of dynamic libraries was 
 implemented on Linux.
If you need load a library with C interface, You can use something like http://hg.m1xa.com/codewithd/src (see simple.f95 and symload.d)
Jul 26 2013
parent "J" <j private-do-not-reply.org> writes:
Thanks Michael.

On Friday, 26 July 2013 at 20:46:12 UTC, Michael wrote:
 On Friday, 26 July 2013 at 19:42:59 UTC, J wrote:
 I thought that runtime loading of dynamic libraries was 
 implemented on Linux.
If you need load a library with C interface, You can use something like http://hg.m1xa.com/codewithd/src (see simple.f95 and symload.d)
Jul 26 2013