Subject: ld cannot find library with .so.1 extension

From: "Ben Weiss" <[email-masked]>
Date: Wed, 12 Jan 2022 17:29:40 -0600

Hi all,

I am working on my first Alpine package, the Softether VPN.
Trying to build the package, ld complained "Cannot find -lz". Checking the ld man page, I see -lfile will search for (summarizing here) libfile.a and libfile.so . I checked all of the other -l parameters, they all end in .a or .so- only libz ends in .so.1 (which is a symlink to libz.so.1.2.11). I tried simply creating a libz.so -> libz.so.1.2.11 symlink, and my package happily compiled.

So, my question is-
Should libz have a libz.so -> libz.so.(version) symlink in addtion to the .so.1 symlink, or is there a parameter or something else I am unaware of that will make ld find the library with the .so* extension?

Thanks!
-- 
  Ben Weiss
  [email-masked]

---

From: "alice" <[email-masked]>
Date: Thu, 13 Jan 2022 05:23:45 +0100

> So, my question is-
> Should libz have a libz.so -> libz.so.(version) symlink in addtion to
> the .so.1 symlink, or is there a parameter or something else I am
> unaware of that will make ld find the library with the .so* extension?
zlib-dev has this symlink- you need to add that package.

---

From: "Ben Weiss" <[email-masked]>
Date: Thu, 13 Jan 2022 12:08:12 -0600

> zlib-dev has this symlink- you need to add that package.

Ach, I had thought I installed that. Indeed, I did not.
Yes, that solved the problem.

Thank you.