[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaRocks can't find libz.so or libz.dll when installing lzlib
- From: Hisham <h@...>
- Date: Wed, 29 Feb 2012 23:24:40 -0300
On Wed, Feb 29, 2012 at 8:43 PM, Choonster TheMage
<choonster.2010@gmail.com> wrote:
> On Thu, Mar 1, 2012 at 4:00 AM, Hisham <h@hisham.hm> wrote:
>> Please try the updated rockspec I just uploaded:
>>
>> http://luarocks.org/repositories/rocks/lzlib-0.3-2.rockspec
>>
>> I haven't tested it on Windows, but it should there (unless there's
>> anything Unix specific in the code of lzlib, which is unlikely). Let
>> me know your results.
>>
>> Thanks for the feedback!
>>
>> -- Hisham
>> http://hisham.hm/
>>
>
> I just downloaded and unpacked that through LuaRocks, but I got this
> error when I tried to build it:
> --------
>>luarocks make
> cl /MD /O2 -c -Folzlib.obj -IC:/Lua/5.1/include lzlib.c
> -IC:\Users\CoonPC\Downloads\zlib126\zlib-1.2.6
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> lzlib.c
> link -dll -def:zlib.def -out:zlib.dll C:/Lua/5.1/lib/lua5.1.lib
> lzlib.obj -libpath:C:\Users\CoonPC\Downloads\zlib125dll\dllx64
> Microsoft (R) Incremental Linker Version 10.00.40219.01
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Creating library zlib.lib and object zlib.exp
> lzlib.obj : error LNK2019: unresolved external symbol _deflateEnd
> referenced in function _lzstream_cleanup
> lzlib.obj : error LNK2019: unresolved external symbol _inflateEnd
> referenced in function _lzstream_cleanup
> lzlib.obj : error LNK2019: unresolved external symbol _snprintf
> referenced in function _lzstream_tostring
> lzlib.obj : error LNK2019: unresolved external symbol _deflateInit2_
> referenced in function _lzlib_deflate
> lzlib.obj : error LNK2019: unresolved external symbol _inflateInit2_
> referenced in function _lzlib_inflate
> lzlib.obj : error LNK2019: unresolved external symbol _inflate
> referenced in function _lzstream_decompress
> lzlib.obj : error LNK2019: unresolved external symbol _deflate
> referenced in function _lzstream_compress
> lzlib.obj : error LNK2019: unresolved external symbol _inflateReset
> referenced in function _lzstream_reset
> lzlib.obj : error LNK2019: unresolved external symbol _deflateReset
> referenced in function _lzstream_reset
> lzlib.obj : error LNK2019: unresolved external symbol _zlibVersion
> referenced in function _lzlib_version
> lzlib.obj : error LNK2019: unresolved external symbol _adler32
> referenced in function _lzlib_adler32
> lzlib.obj : error LNK2019: unresolved external symbol _crc32
> referenced in function _lzlib_crc32
> zlib.dll : fatal error LNK1120: 12 unresolved externals
>
> Error: Build error: Failed installing zlib.dll in
> C:\Lua\5.1\rocks/lzlib/0.3-2/lib
> --------
>
> I have ZLIB_LIB/INCDIR set to the same values as before in my
> luarocks-config.lua file. I'm using LuaRocks 2.0.2 that was bundled
> with Lua For Windows v5.1.4-45 if that matters.
>
> Thanks for the help so far.
Oops, there's a "libraries" entry missing from build.modules.zlib in
that rockspec. I'd upload a new version, but I suspect that just
adding build.modules.zlib.libraries = "z" there (like I did for
build.modules.gzip) won't work on Windows. What is the name of the
.lib file for zlib on Windows? Please try editing the rockspec and use
that name for the value of build.modules.zlib.libraries and
build.modules.gzip.libraries, but without the .lib extension (LuaRocks
auto-adds that extension).
Once we figure out what's the correct incantation for Windows, I can
add a build.platforms section in the rockspec to cope with the naming
differences between Unix and Windows.
-- Hisham