zstd icon indicating copy to clipboard operation
zstd copied to clipboard

lib/Makefile: fix MinGW installation issues

Open Keno opened this issue 6 months ago • 3 comments

  1. Install the .dll into bin/ not lib/
  2. Install the .dll.a import library into lib/
  3. Do not attempt to create symlinks for so-versioned binaries
  4. Incorporate the LIBVER_MAJOR per windows convention.

Keno avatar Jul 18 '25 03:07 Keno

The title states : "Correct a few Windows build issues"

Do you actually mean: "Fix a few mingw/msys installation issues ?"

Cyan4973 avatar Jul 19 '25 04:07 Cyan4973

Yes, they're installation issues. I think it would be accurate to say that they are mingw issues in that mingw is the only Windows toolchain that lib/Makefile supports in practice [1]. I used Windows in the title since that's what the Makefile actually checks for, I don't have any problem with mingw instead though. I don't think any of the issues are msys specific.

[1] With respect to the soname change, I believe the -somajor-sominor.dll convention was originally introduced by cygwin in 2000 (https://cygwin.com/pipermail/cygwin/2000-August/040045.html is the earliest discussion I could find), for which it was then added to libtool in 2001. Subsequent toolchains then copied the convention when they added themselves to libtool, making it the de facto standard for everything that used libtool to target windows, so not technically specific to either mingw nor msys, but probably most closely associated with mingw in practice. It's also been adopted as the major convention by non-autotools toolchains. For example, the meson (https://github.com/mesonbuild/meson/blob/ab261f9951f235c776b8664fbdbf0365a8cf535d/mesonbuild/build.py#L2364) build for libzstd will produce libzstd-1.dll, not libzstd.dll. That said, it is true that windows naming conventions are a bit all over the place here. My primary objective was making the makefil build match meson, since we use both downstream, depending on the environment.

Keno avatar Jul 19 '25 05:07 Keno

Please rebase.

This branch has conflicts that must be resolved

cclauss avatar Oct 23 '25 13:10 cclauss