Created attachment 245869 [details] patch Currently having assimp installed breaks building Rust.
Hi Piotr, I don't quite understand how does this break rust. But in any case, please commit the patch in case this doesn't break any users. If any users use this static library - they should be bumped. Thanks, Yuri
Rust finds that there is libzlibstatic.a and assumes there's also a shared library, tries to link to it (-lzlibstatic) and that fails, because there's only a static library. This is obviously Rust's fault, but ports generally shouldn't install static libraries because other ports may use it and would need to be rebuilt when there's a library update (we definitely don't track it in ports). Just look at how many PORTREVISION bumps are there when Rust and Go are updated.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3018b7a319e228ce953bcda63d31c36f65eb1c3e commit 3018b7a319e228ce953bcda63d31c36f65eb1c3e Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2023-10-28 21:42:37 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-10-29 10:44:38 +0000 multimedia/assimp: remove static library PR: 274717 Approved by: yuri@ multimedia/assimp/Makefile | 3 ++- multimedia/assimp/pkg-plist | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274723#c12 for a simple way to allow rust to compile even if there is a version of zlib that is detected in /usr/local.
(In reply to John Hein from comment #4) In that case, I believe it's better to remove static zlib libraries from other ports as well. Ports should not install static libraries by default.
(In reply to Piotr Kubaj from comment #5) Some ports install static libraries. I agree with your sentiment in most case - I doubt it was intentional to install the static lib for assimp. That said, there could be a libzlib.so in /usr/local/lib, and the same problem would happen (unless we use the change to tell rust to explicitly use base libzlib).