Bug 279821 - databases/mongodb60 fails to start with LTO on
Summary: databases/mongodb60 fails to start with LTO on
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Ronald Klop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-17 18:55 UTC by zentex
Modified: 2024-06-18 11:34 UTC (History)
0 users

See Also:
ronald: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zentex 2024-06-17 18:55:35 UTC
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",
Comment 1 Ronald Klop freebsd_committer freebsd_triage 2024-06-17 20:22:09 UTC
Thanks for the report and investigation. Will disable LTO in the port soon.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-06-18 11:19:24 UTC
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(-)
Comment 3 Ronald Klop freebsd_committer freebsd_triage 2024-06-18 11:34:40 UTC
Committed a fix. Enjoy.