Thread overview
Shared library support
Jan 15, 2016
John Colvin
Jan 15, 2016
Guillaume Piolat
Jan 15, 2016
Russel Winder
Jan 16, 2016
Joakim
January 15, 2016
What is the state of shared library support across the different platforms that LDC supports? What is supposed to work currently and what is not?

I seem to be in a perennial state of "try it and see" with this, but that makes it hard to tell the difference between expected failures (not implemented yet), unexpected failures (something's broken) and user error. It would be really great if someone who really understand it could give me an overview :)
January 15, 2016
On Friday, 15 January 2016 at 14:46:35 UTC, John Colvin wrote:
> What is the state of shared library support across the different platforms that LDC supports? What is supposed to work currently and what is not?
>
> I seem to be in a perennial state of "try it and see" with this, but that makes it hard to tell the difference between expected failures (not implemented yet), unexpected failures (something's broken) and user error. It would be really great if someone who really understand it could give me an overview :)

On OSX it is supported and works (you can use TLS) BUT you can't unload them (same with DMD) and they need a workaround to work, see https://issues.dlang.org/show_bug.cgi?id=15060
This workaround make them leak but it's the only thing you can do so far.

On Windows I didn't managed to export symbols: https://github.com/ldc-developers/ldc/issues/1158
Did someone managed to?

On Linux I don't know where it stands.

January 15, 2016
On Fri, 2016-01-15 at 16:29 +0000, Guillaume Piolat via digitalmars-d- ldc wrote:
> 
[…]
> On Linux I don't know where it stands.
> 

I build static and dynamic link versions of LDC for Debian Sid and Fedora Rawhide. Seems to all work tickety boo. Or perhaps that should have been hunky dory.

-- 
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



January 16, 2016
On Friday, 15 January 2016 at 14:46:35 UTC, John Colvin wrote:
> What is the state of shared library support across the different platforms that LDC supports? What is supposed to work currently and what is not?
>
> I seem to be in a perennial state of "try it and see" with this, but that makes it hard to tell the difference between expected failures (not implemented yet), unexpected failures (something's broken) and user error. It would be really great if someone who really understand it could give me an overview :)

Only Linux and FreeBSD shared libraries are officially supported and tested by druntime upstream:

https://github.com/D-Programming-Language/druntime/blob/master/posix.mak#L97

Ldc piggybacks off Martin's shared library work and should support those two also.  I believe all other platforms are in various incomplete states, at least as reported by others like Jacob and Guillaume.