Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installer: install mingw libs and improve VS selection #281

Merged
merged 2 commits into from
Feb 17, 2018

Conversation

rainers
Copy link
Member

@rainers rainers commented Dec 24, 2017

  • add mingw libraries to installation
  • add installer page to select VS installation
  • no need to patch sc.ini as dmd detects VS

@MartinNowak You will still have to add lld-link.exe to the extra folders.

The additional page only appears if no VS installation is detected and looks like this:

dinstaller

@dlang-bot
Copy link
Contributor

dlang-bot commented Dec 24, 2017

Thanks for your pull request, @rainers!

Bugzilla references

Auto-close Bugzilla Severity Description
15131 normal curl.lib is not available in 32 bit mscoff format

@@ -487,6 +487,9 @@ int main(string[] args)
extract(cacheDir~"/"~libCurl, workDir~"/windows/old-dmd/");
// Get updated OMF import libraries
extract(cacheDir~"/"~omflibs, workDir~"/windows/old-dmd/dmd2/windows/lib/");

// grab mingw sources
run("git clone --depth 1 --branch 5.0-active https://git.code.sf.net/p/mingw/mingw-org-wsl.git " ~ workDir ~ "/clones/mingw");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about checking out a specific tag or commit here to avoid breakage if the branch gets updated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about checking out a specific tag or commit here to avoid breakage if the branch gets updated?

Maybe better, but 5.0-active is a release branch with only little activity, the real work seems to happen on 5.1-trunk.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I just saw the -active

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a cacheable tarball (for a fixed commit), just had lots of issues with sourceforge's git. Not too convinced that their service is reliable.

@MartinNowak
Copy link
Member

Looks great @rainers.

Saw it a little late, I'd rather target 2.079 with this change, since there isn't much time for testing the installer.

Maybe select and mark 2017 as (default)? A bit more information would be helpful to make that choice.

You will still have to add lld-link.exe to the extra folders.

We do I get the binaries from? Should we handle this like curl?

@rainers
Copy link
Member Author

rainers commented Dec 29, 2017

Saw it a little late, I'd rather target 2.079 with this change, since there isn't much time for testing the installer.

Yeah, unfortunately this didn't get enough attention. So targetting next release is fine with me. A nightly build having the mingw extras would be nice. Maybe we can set an Appveyor task to build the installer.

Maybe select and mark 2017 as (default)?

It's already the default but moving it into first place, too, makes sense.

We do I get the binaries from? Should we handle this like curl?

Where do you get these from? I see different sources:

lld-link.exe can be made available for download similarily. IIRC you recently built it yourself. If you want, I can do that, too (I'm usually building from LLVM master).

@MartinNowak
Copy link
Member

IIRC you recently built it yourself.

That was quite messy IIRC.

If you want, I can do that, too (I'm usually building from LLVM master).

Even better, let's put the manual in the wiki and/or do it via a build script.

Where do you get these from? I see different sources:

Then let's put it to http://downloads.dlang.org/other/
Do we have proper versions to build?

Maybe we can set an Appveyor task to build the installer.

That doesn't really fit into an automated release building. A task to build lld would work fine though.

@MartinNowak
Copy link
Member

I'll look into automating the lld-link build in the next couple of days.

@MartinNowak MartinNowak changed the base branch from stable to master December 29, 2017 22:10
@rainers
Copy link
Member Author

rainers commented Dec 30, 2017

Even better, let's put the manual in the wiki and/or do it via a build script.

Building lld is described on the LLVM page: https://lld.llvm.org/windows_support.html. TBH it didn't work out right so simple for me, too, but I think that happened because I was trying to integrate it with my current working copy of LLVM.

Then let's put it to http://downloads.dlang.org/other/

How about creating a new "extras" file there, the stuff in the semitwist file are pretty dated. I wouldn't mind if the 20 year old "debugger" in there would be removed, too.

Do we have proper versions to build?

I'm currently using the latest in the hope a couple of issues are resolved. Last time I checked /MAP is not supported (/lldmap exists instead with different output format) and quotes in the library search path are not removed.

A task to build lld would work fine though.

I suspect building LLD from scratch will take too long for an appveyor job.

@rainers
Copy link
Member Author

rainers commented Dec 30, 2017

I suspect building LLD from scratch will take too long for an appveyor job.

Just rebuilt locally with a quad-core mobile i7 and it took about 23 minutes without the cloning. Appveyor seems to have 2 cores, could be close for the timeout on appveyor (50 miutes IIRC).

@rainers
Copy link
Member Author

rainers commented Dec 30, 2017

I suspect building LLD from scratch will take too long for an appveyor job.

Takes about 40 minutes: #286

@MartinNowak MartinNowak added this to the 2.079.0 milestone Feb 17, 2018
@MartinNowak MartinNowak changed the base branch from master to stable February 17, 2018 15:32
@@ -487,6 +487,9 @@ int main(string[] args)
extract(cacheDir~"/"~libCurl, workDir~"/windows/old-dmd/");
// Get updated OMF import libraries
extract(cacheDir~"/"~omflibs, workDir~"/windows/old-dmd/dmd2/windows/lib/");

// grab mingw sources
run("git clone --depth 1 --branch 5.0-active https://git.code.sf.net/p/mingw/mingw-org-wsl.git " ~ workDir ~ "/clones/mingw");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having issues with sourceforge git reliability (right now). Any mirrors?

@@ -487,6 +487,9 @@ int main(string[] args)
extract(cacheDir~"/"~libCurl, workDir~"/windows/old-dmd/");
// Get updated OMF import libraries
extract(cacheDir~"/"~omflibs, workDir~"/windows/old-dmd/dmd2/windows/lib/");

// grab mingw sources
run("git clone --depth 1 --branch 5.0-active https://git.code.sf.net/p/mingw/mingw-org-wsl.git " ~ workDir ~ "/clones/mingw");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a cacheable tarball (for a fixed commit), just had lots of issues with sourceforge's git. Not too convinced that their service is reliable.

- add mingw libraries to installation
- add installer page to select VS installation
- no need to patch sc.ini as dmd detects VS
@MartinNowak MartinNowak force-pushed the vsdetect branch 3 times, most recently from d783b92 to 898cbe9 Compare February 17, 2018 18:25
@MartinNowak
Copy link
Member

I see, this depends on #289 now.

- build on appveyor using the build-mingw-libs and build-lld branches
- also fixes Issue 15131 - curl.lib is not available in 32 bit mscoff format
@rainers
Copy link
Member Author

rainers commented Feb 19, 2018

Thanks for taking care of these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants