Should "std.net.curl" be moved from Phobos to Deimos?

Jordi Sayol g.sayol at yahoo.es
Thu Nov 28 07:25:03 PST 2013


El 26/11/13 19:44, Andrei Alexandrescu ha escrit:
> On 11/25/13 4:36 PM, Adam D. Ruppe wrote:
>> On Tuesday, 26 November 2013 at 00:13:57 UTC, Andrei Alexandrescu wrote:
>>> First I'd like to gather an understanding on why we seem to have this
>>> problem (far as I understand, the likes of php and python are doing
>>> fine with curl, but maybe I'm wrong).
>>
>> A major difference is there's only one php/python binary, usually build
>> on the same system that uses it. Phobos, on the other hand, is generally
>> built on the packager's computer, which isn't always binary compatible
>> with the deployment box.
>>
>> On Windows, the problem is simply that curl isn't packaged with dmd, for
>> some weird reason, meaning people have to get curl.lib separately.
>> That's idiotic. But then again, so are a lot of the dmd Windows
>> deficiencies.
> 
> Please let me know whether my understanding of the situation is correct:
> 
> 1. If people have a working installation of libcurl on their machine, we work with it.
> 
> 2. Otherwise, phobos works fine but attempting to use std.net.curl will fail.
> 
> Is this correct? If not, please explain exactly why. If yes, this setup seems entirely appropriate to me.

Point 2. is correct only with phobos static library but not with shared one. A simple "Hello World" program cannot be linked against shared phobos library if libcurl is not available on system, at least on Linux. It cannot run either.

-- 
Jordi Sayol


More information about the Digitalmars-d mailing list