Bug 278254 - databases/mongodb50: Fails to start with snappy 1.2.0 and LTO=on
Summary: databases/mongodb50: Fails to start with snappy 1.2.0 and LTO=on
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ronald Klop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-08 10:56 UTC by Einar Bjarni Halldórsson
Modified: 2024-04-08 17:27 UTC (History)
2 users (show)

See Also:
ronald: maintainer-feedback+
ronald: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2024-04-08 10:56:21 UTC
After upgrading snappy 1.1.0 -> 1.2.0, mongodb50 fails to start:

ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZN6snappy8CompressEPKcmPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE"

Built with poudriere, running on 13.2-RELEASE-p9

I'm building mongodb50 now with 'LTO=off' to see if that helps
Comment 1 Einar Bjarni Halldórsson 2024-04-08 11:13:19 UTC
After building mongodb with 'LTO=off', mongod starts normally with snappy 1.2.0
Comment 2 Ronald Klop freebsd_committer freebsd_triage 2024-04-08 17:12:02 UTC
Thanks for reporting this. And for testing with LTO=off.

I will turn LTO off in the default pkg build.

What was the architecture you were running mongodb on? Amd64 or aarch64 or something else?
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-04-08 17:17:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9220f0b1125626b100a823b801cec4d8362ec523

commit 9220f0b1125626b100a823b801cec4d8362ec523
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2024-04-08 17:13:22 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-04-08 17:16:25 +0000

    databases/mongodb50: turn off LTO

    After upgrading snappy 1.1.0 -> 1.2.0, mongodb50 fails to start:

    ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZN6snappy8CompressEPKcmPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE"

    Apparentally turning off LTO fixes this.

    PR:     278254

 databases/mongodb50/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-04-08 17:24:07 UTC
A commit in branch 2024Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b3aa1ea86f1e120da135245c95f0e9cfaa00687b

commit b3aa1ea86f1e120da135245c95f0e9cfaa00687b
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2024-04-08 17:13:22 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-04-08 17:23:04 +0000

    databases/mongodb50: turn off LTO

    After upgrading snappy 1.1.0 -> 1.2.0, mongodb50 fails to start:

    ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZN6snappy8CompressEPKcmPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE"

    Apparentally turning off LTO fixes this.

    (cherry picked from commit 9220f0b1125626b100a823b801cec4d8362ec523)

    PR:     278254

 databases/mongodb50/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 5 Ronald Klop freebsd_committer freebsd_triage 2024-04-08 17:26:23 UTC
Even though I'm still curious what CPU architecture you were using I'm already closing this issue as all needed actions are done for now.
Comment 6 Einar Bjarni Halldórsson 2024-04-08 17:27:10 UTC
I’m on amd64