Windows MSYS2 build failure: use of deprecated -lzlib over -lz

Bug #1894350 reported by Fredrick Brennan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
New
Undecided
Unassigned

Bug Description

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzlib
collect2.exe: error: ld returned 1 exit status

When doing `pip install lxml` via the MINGW64 pip3 in a venv.

Quick fix:

$ ln -s /mingw64/lib/libz.a /mingw64/lib/libzlib.a
$ ln -s /mingw64/lib/libz.dll.a /mingw64/lib/libzlib.dll.a

But I was told in #msys2 on OFTC:

10:12:16 dwfreed copypaste: fix the python library, no packaging of zlib ships libzlib, it's all libz

So, -lzlib should become -lz

Tags: msys2 windows
Revision history for this message
scoder (scoder) wrote :

Thanks for the report. pip should normally download a wheel, and even for a local build, it should download the depdendencies automatically and not use locally installed libs.

Could you provide the complete command that you used for installing, the pip build log, and anything else that may help understand what's different in your system?

Revision history for this message
Willard Dawson (willard-dawson) wrote :

This error is also affecting me as I attempt to install https://github.com/zblurx/dploot using MSYS2 / MINGW64.

Revision history for this message
scoder (scoder) wrote :

Does a static build work for you?

STATIC_DEPS=true pip install lxml

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.