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

Linking error with LDC on Win64 due to strange subpackage libs-ldc #1629

Closed
kinke opened this issue Nov 20, 2016 · 3 comments
Closed

Linking error with LDC on Win64 due to strange subpackage libs-ldc #1629

kinke opened this issue Nov 20, 2016 · 3 comments

Comments

@kinke
Copy link

kinke commented Nov 20, 2016

Testing dub (v1.1) and vibe.d (v0.7.30) with an early LDC 1.1 (ldc-developers/ldc#1891), a project template cannot be linked on Win64 due to missing z.lib. This seems to come in via vibe.d's subpackages in %AppData%\dub\packages\vibe-d-0.7.30\vibe-d\dub.json, where there's a "libs-ldc": [ "z" ] item. Removing it gets the project to compile, link and run successfully, with both LDC2 and LDMD2.

I did a quick test on Ubuntu 16.04 (x86_64), removed the subpackage as well (and worked around #1611 with a manually added OpenSSL dependency), and it's also working. So this LDC-specific dependency (on zlib apparently) may not be required after all (isn't it part of druntime Phobos?) and only causes trouble on Windows.

@kinke kinke changed the title Linking error with LDC on Win64 due to strange subpackage ldc-libs Linking error with LDC on Win64 due to strange subpackage libs-ldc Nov 20, 2016
@s-ludwig
Copy link
Member

s-ludwig commented Dec 19, 2016

I had to add the explicit dependency a while ago (9df23d4, same was done for GDC: #1607). Did the build succeed on Linux without removing it? If that's the case, I would suggest to change this to "libs-ldc-posix": ["z"], so that older versions of LDC also still work, at least on Linux/macOS.

@kinke
Copy link
Author

kinke commented Dec 19, 2016

Did the build succeed on Linux without removing it?

It did. So your suggested fix makes sense, although zlib should be part of libphobos2-ldc for quite a while now.

@s-ludwig
Copy link
Member

Okay, I'll change it like that then. Based on the context of my commit, I guess that LDC 1.0.0 was still affected by this, which is still the latest stable release, so I'd like to keep the workaround for a while still.

s-ludwig added a commit that referenced this issue Dec 19, 2016
LDC on Windows chokes on the library dependency and the latest LDC releases already include libz in libphobos.

Conflicts:
	stream/dub.sdl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants