Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Build std.net.curl and documentation on Windows (second attempt) #466

merged 1 commit into from Feb 29, 2012


None yet
3 participants

brad-anderson commented Feb 29, 2012

Another attempt at enable std.net.curl on Windows. This is actually identical to the last one but comes after some discussion.

Under Walter's advice I've prepared a separate download containing cURL for Windows users. Phobos unit tests will break for anyone who does not have cURL on their machine unfortunately (and this includes the auto-tester).

You can find my packaging of it here: curl-7.24.0-dmd-win32.zip. It is dynamically linked which affords users easier use of the LGPL libraries this particular build of cURL uses. Alternatively you can use the version of cURL that was offered during the std.net.curl review which has fewer libraries it depends on (just SSL): libcurl_7.21.7.zip

@braddr Can we get cURL installed on the autotester machine? This pull request shouldn't be merged until this happens.

I have two more pull requests related to this which eases finding/downloading this cURL packaging for Windows users (one for the website and one for the installer).

Build std.net.curl and documentation on Windows 2
Also a missing std.net.isemail line

(second attempt)

andralex added a commit that referenced this pull request Feb 29, 2012

Merge pull request #466 from eco/win32-curl
Build std.net.curl and documentation on Windows (second attempt)

@andralex andralex merged commit 381f66d into dlang:master Feb 29, 2012


braddr commented on 9c2f390 Feb 29, 2012

I grabbed the curl .zip file and put the curl.lib directory in the linker's search path (same directory as all the dmc provided .libs). It changed the nature of the error, but the builder is still failing to build the unittests for windows. I don't have time to dig into this.

an example failed build:

A previous run of that same pull request from before the curl mess, which succeeded (though complained about a missing curl.lib):


brad-anderson replied Feb 29, 2012

I don't really understand the error:

Error: 'unittest' not found

But you do need the DLLs in the curl binary download to be somewhere in the path. I've opted to place them in the bin directory along with dmd as that is going to most likely be in the path for windows users but you can place them wherever you feel most appropriate (Windows\System32 would work, for instance).


braddr replied Feb 29, 2012

it's in the path. Note that the previous build attempt complained about it not existing and the current one doesn't complain. Further, it's in the same directory as the other required .lib files, such as ws2_32.lib, etc.


brad-anderson commented Feb 29, 2012

The DLLs or just the .lib? It's dynamically linked so the .lib is just an import library. The linker search path will be different then the DLL search path.

I'm sure there are more important things being worked on that the lack of autotester is getting in the way of. I'd be fine with making a new pull request of this if it'd be better to revert until Brad has a bit of time to look over this (but this time I'll put the request that it not be merged until the auto tester is working with it in big bold capital letters so @andralex doesn't eagerly merge it before it is ready :P).


braddr commented Feb 29, 2012

I put the group of dll's in the dmc/dm/bin directory that's in the search path for the auto-tester. No improvement. I also added logging of the search path to confirm that the tester is running with that path:

path: /home/Administrator/sandbox/d/d-tester/dmc/dm/bin:/home/Administrator/sandbox/d/d-tester/dmc/dm/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0


brad-anderson commented Feb 29, 2012

Very odd. I just reproduced the Error: 'unittest' not found message (with missing dll dialog boxes) by making the DLLs inaccessible. I also got the error (and a dialog box) if I put them in my C:\Windows\System32 directory which was unexpected. I just tested with my standard Windows installer install of DMD/DMC by putting it in C:\D\dm\bin and it worked (though that's hardly a reproduction of what you are doing, just of the PATH environment variable). Is it possible to put them in the same directory as the unittest.exe for phobos or will that conflict with the way you bootstrap the autotester? That's the [very first place](http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85\).aspx) Windows would search.


braddr commented Feb 29, 2012

Even in the same dir (ie the phobos top level source directory) as the unittest code, .obj, and .exe didn't help:



brad-anderson commented Feb 29, 2012

Alright, I'll try to create a static library for your use on the autotester. Want me to create a pull request to revert this in the meantime?


braddr commented Feb 29, 2012

I do think it should be reverted. I don't know what the right fix is, but the whole thing needs to "just work" and not for the auto-tester, but everyone. Obviously the current state is unacceptable.


brad-anderson commented Mar 1, 2012

@braddr Pull request to revert: D-Programming-Language#469

I don't know what the right fix is, but the whole thing needs to "just work" and not for the auto-tester, but everyone.

I agree. I've tried to do that for a large portion of regular Windows dmd users by making it automatically download and install when they use the installer. I'm having trouble coming up with a good solution for those who build from source as Walter doesn't want it packaged with phobos and I pretty much agree with him because cURL has a rather complicated build process and sorting it out will take a lot of work and mostly likely be fragile which is the last thing the autotester and developers need.

@schveiguy schveiguy referenced this pull request in schveiguy/phobos Apr 15, 2012


std.process ready for review? #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment