Bug 274697 - editors/libreoffice: fix build with lld 17
Summary: editors/libreoffice: fix build with lld 17
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dima Panov
URL:
Keywords:
Depends on:
Blocks: 273753
  Show dependency treegraph
 
Reported: 2023-10-24 16:25 UTC by Dimitry Andric
Modified: 2023-11-01 22:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (office)


Attachments
editors/libreoffice: fix build with lld 17 (1.66 KB, patch)
2023-10-24 16:25 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-10-24 16:25:06 UTC
Building editors/libreoffice with lld 17 results in the following link
errors:

  ld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
  ld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined

Upstream fixed this only for Linux with:
https://github.com/LibreOffice/core/commit/baddc742c3fe260d20d7924ab134f0fbf179fd85

Add the same block to the more generic unxgcc.mk makefile, so it gets
picked up for FreeBSD too.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-10-24 16:25:25 UTC
Created attachment 245851 [details]
editors/libreoffice: fix build with lld 17
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-10-24 19:20:22 UTC
A commit in branch main references this bug:

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

commit 6338934b7c42825d661bca04efbaef58f9439c70
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-10-24 19:16:35 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2023-10-24 19:20:05 +0000

    editors/libreoffice: fix build with lld 17

    Building editors/libreoffice with lld 17 results in the following link
    errors:

        ld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
        ld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined

    Upstream fixed this only for Linux with:
    https://github.com/LibreOffice/core/commit/baddc742c3fe260d20d7924ab134f0fbf179fd85

    Add the same block to the more generic unxgcc.mk makefile, so it gets
    picked up for FreeBSD too.

    PR:     274697
    Author:    Dimitry Andric <dim@FreeBSD.org>

 .../files/patch-solenv_gbuild_platform_unxgcc.mk          | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
Comment 3 Dima Panov freebsd_committer freebsd_triage 2023-10-24 19:22:40 UTC
Committed, thanks!

Dimitry, feel free to fix any llvm17+ issues in office@ ports.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-11-01 22:47:18 UTC
A commit in branch main references this bug:

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

commit 94ce30c4a0b1044153991c5dd501c802c5c6a0f4
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-01 22:27:14 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-11-01 22:44:37 +0000

    editors/libreoffice: fix build with lld 17 (take 2)

    Building editors/libreoffice with lld 17 results in the following link
    errors:

      ld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
      ld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined

    Add -Wl,--undefined-version to LDFLAGS to suppress these error, as the
    previous fix did not work in all cases.

    PR:             274697
    Approved by:    office (blanket)
    Fixes:          6338934b7c42
    MFH:            2024Q4

 editors/libreoffice/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-11-01 22:47:19 UTC
A commit in branch main references this bug:

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

commit 628fb375a5d431df300ba95bde17757b94e9d17a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-01 22:23:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-11-01 22:44:37 +0000

    editors/libreoffice: revert previous fix for building with lld 17

    This reverts commit 6338934b7c42825d661bca04efbaef58f9439c70:

    Building editors/libreoffice with lld 17 results in the following link
    errors:

        ld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
        ld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined

    Upstream fixed this only for Linux with:
    https://github.com/LibreOffice/core/commit/baddc742c3fe260d20d7924ab134f0fbf179fd85

    Add the same block to the more generic unxgcc.mk makefile, so it gets
    picked up for FreeBSD too.

    PR:     274697
    Author:    Dimitry Andric <dim@FreeBSD.org>

 .../files/patch-solenv_gbuild_platform_unxgcc.mk          | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)