std.net.curl and ldc v1.0.0+
Suliman via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Tue Sep 27 23:23:48 PDT 2016
On Monday, 26 September 2016 at 18:52:04 UTC, Joseph Rushton
> Hello all,
> I've run into a nasty little issue with `std.net.curl` and ldc
> v1.0.0. If I build v1.0.0 freshly from source, and then use it
> to compile the following tiny program:
> void main ()
> import std.net.curl : get;
> auto website = "http://dlang.org/".get;
> ... the program compiles correctly, but when I run it, I get a
> segfault. A stacktrace is given here:
> This doesn't however occur if I build my program with the
> pre-built ldc v1.0.0 downloadable from GitHub.
> I'm guessing this is in some way related to the fact that as of
> ldc v1.0.0, libcurl.so is dynamically loaded at runtime rather
> than being linked to phobos at build time. So this makes me
> wonder: is there something extra required when building LDC
> that I might be missing? I note that dmd now automatically
> links against libdl in order to support dynamic loading of
> ... so could I be missing something similar when building LDC?
> I note that if I manually link in -ldl when compiling my
> program above, it makes no difference to the segfault.
> Can anyone advise what could be wrong?
> Thanks & best wishes,
> -- Joe
I suggest you to try https://github.com/ikod/dlang-requests it's
much better than curl
More information about the digitalmars-d-ldc