In my attempt to upgrade to Perl 5.36 several other ports were affected and had to be rebuilt/reinstalled. One of these was lang/rust -- which failed to build (I can send error strings). However, I decided to try downloading the lang/rust package and work around the build-from-source problems I was having. I did that, and look what happened (note the version of Perl): =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= unix# pwd /usr/ports unix# pkg install lang/rust Updating FreeBSD repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.pkg: 100% 7 MiB 1.4MB/s 00:05 Processing entries: 100% FreeBSD repository update completed. 34120 packages processed. All repositories are up to date. Updating database digests format: 100% The following 2 package(s) will be affected (of 0 checked): New packages to be INSTALLED: perl5.34: 5.34.1_3 rust: 1.72.0 Number of packages to be installed: 2 The process will require 1 GiB more space. 144 MiB to be downloaded. Proceed with this action? [y/N]: N =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= This defeats updating Perl from 5.34 to 5.36 -- what am I to do?
Thanks to the original poster for starting this bug report: I've had that same issue myself running FBSD v12.4, compiling ports. The port devel/cargo-c runs into the same issue since it needs Rust in order to finish building. The build issue comes toward the end of the Rust compile process, with the link to `cc` failing then saying -lzlibstatic not found. The log for the Rust compile is very long so I'll hold off on that unless there's a request. Rust compiled perfectly with Perl 5.34 in the system, but not since the change to the new default of 5.36. I noted on "freshports" that LLVM versions 15 and 16 state they're looking for Perl 5.34, but LLVM 17 shows Perl 5.36 as the version it looks for. There may be issues with that as well eventually. Until this all settles out, I'll hold off updating the ports.
(In reply to Robert from comment #1) I'm seeing the same issue when building lang/rust on 13.2-STABLE, resulting in a build fail: error: linking with `cc` failed: exit status: 1 along with: note: ld: error: unable to find library -lzlibstatic Curiously, on an identical 14-STABLE system, lang/rust builds just fine. perl5-5.34 / perl5-5.36 does not seem to be the issue, as it occurs with either version perl5-5.* installed.
lang/rust builds just fine here with perl 5.36. Do you have a full build log somewhere?
(In reply to Mikael Urankar from comment #3) i just tried again after doing a make clean, really hope i did my output piping right, here are 170,000 lines of make output. at the beginning it says it found a libzlib and then at the end it can’t link to it. i tried if it gets any better if i install the .36 perl version but it does not https://gaenseblum.eu/fileshare/buildlogfull.txt
Same issue here, upgrading ports using portmaster. It seems deinstalling assimp does the trick. It installs a /usr/local/lib/libzlibstatic.a. -- Martin
Can you retry after rebuilding assimp with BUILD_SHARED_LIBS appended to CMAKE_OFF and removing lib/libzlibstatic.a from pkg-plist? Ports generally shouldn't add static libraries.
I used BUILD_STATIC_LIBS instead :-) Yes this gets rid of /usr/local/lib/libzlibstatic.a -- Martin
(In reply to Piotr Kubaj from comment #6) Do you mean like so? In the assimp Makefile? CMAKE_OFF= ASSIMP_BUILD_TESTS BUILD_SHARED_LIBS Because if I do that, I can’t run make install, because pkg-static: Unable to access file /usr/ports/multimedia/assimp/work/stage/usr/local/lib/libassimp.so:No such file or directory pkg-static: Unable to access file /usr/ports/multimedia/assimp/work/stage/usr/local/lib/libassimp.so.5:No such file or directory pkg-static: Unable to access file /usr/ports/multimedia/assimp/work/stage/usr/local/lib/libassimp.so.5.3.0:No such file or directory *** Error code 1
(In reply to skye gänseblum from comment #8) No, that was a mistake, I meant BUILD_STATIC_LIBS.
(In reply to Piotr Kubaj from comment #9) gotcha, sorry, i’m new here :o) and yes, can confirm, those changes made it go through finally! thanks a lot
I have the same Rust compilation issue on FreeBSD 13.2-p4. I have audio/picard installed, which pulls in assimp. So I have added BUILD_STATIC_LIBS to CMAKE_OFF in assimp Makefile and removed and recompiled the package. The result: ...drumroll... the same Rust compilation failure, cannot find zlibstatic. So I have removed assimp at all, and compilation went through. ❯ grep STATIC /usr/ports/multimedia/assimp/Makefile CMAKE_OFF= ASSIMP_BUILD_TESTS BUILD_STATIC_LIBS ❯ ls /usr/local/lib/*zlibstatic* ls: /usr/local/lib/*zlibstatic*: No such file or directory [...compilation and installation of audio/picard, which pulls in multimedia/assimp...] ❯ ls /usr/local/lib/*zlibstatic* /usr/local/lib/libzlibstatic.a What am I doing wrong?
Could be - not properly deinstalling the old assimp - not completely removing the port build dir before retrying (the libzlibstatic is cached from the first configure run) -- Martin
(In reply to Martin Birgmeier from comment #12) Maybe the second. The first is unlikely: as I've shown there is no libzlibstatic after deinstallation. Thanks!
Fixed for me after https://cgit.freebsd.org/ports/commit/?id=3018b7a319e228ce953bcda63d31c36f65eb1c3e (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274717). Close as Fixed?