Similar to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278254 I was upgrading to the latest unifi8(8.2.93) with the mongodb60(6.0.15_2) depdancy in ports (was previously running on mongodb50). After upgrade, mongo refuses to start. I tried to get a version on mongo, to make sure it was the latest binary, with a "mongo --version" and it returned ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZN6snappy8CompressEPKcmPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" Cursory search lead to the bug report about mongodb50. Having nothing to lose, I changed the Makefile options to "OPTIONS_DEFAULT= SASL SSL", and after a [~20hr compile in a slow azure VM] it fired right up. before recompiling in ports, I also tried the pkg version (its quicker), but that too seems to have LTO turned on. information you may need/want about the system FreeBSD some.host.name 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
Thanks for the report and investigation. Will disable LTO in the port soon.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=dea4bdb17bc39cbdd2511d0f379a951f502f2b4d commit dea4bdb17bc39cbdd2511d0f379a951f502f2b4d Author: Ronald Klop <ronald@FreeBSD.org> AuthorDate: 2024-06-18 11:14:55 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2024-06-18 11:17:46 +0000 databases/mongodb60: turn off LTO by default Got an error report that was fixed by turning this off. ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZN6snappy8CompressEPKcmPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" PR: 279821 databases/mongodb60/Makefile | 6 +++--- databases/mongodb60/pkg-descr | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-)
Committed a fix. Enjoy.