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 must use zlibstatic. #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xpol
Copy link
Contributor

@xpol xpol commented Feb 4, 2017

The zlib C library will have dll library named zlib.dll.
This rock will create a dll named zlib.dll.

With the same name, in runtime, the system will try to find zlib C library's functions in this rock's zlib.dll which will fail.

Or, this rock's dll will have same name with zlib c library's dll.
@brimworks
Copy link
Owner

I'm a little confused here... This rock should be creating a zlib.dll which is on your LUA_CPATH and NOT on your PATH, so there should not be a naming collision since windows dynamic libraries are loaded based on the PATH environment variable and not on the LUA_CPATH. Similarly, the lua runtime should be looking for C extensions using the LUA_CPATH environment variable and not the PATH environment variable.

I'm reluctant to force static linkage of this C extension since it is very likely that another C extension will dynamically load zlib (it is a very common library). In that situation AFAIK things break in unexpected ways if the two zlib versions are not the same since some symbols may come from the statically linked zlib and others may come from the dynamically linked version.

Can you verify that your PATH and LUA_CPATH environment variables have the appropriate setting?

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

Successfully merging this pull request may close these issues.

2 participants