Bug 282807 - editors/libreoffice 24.8.3: Build failure: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
Summary: editors/libreoffice 24.8.3: Build failure: error: implicit instantiation of u...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-17 07:16 UTC by O. Hartmann
Modified: 2024-11-19 22:02 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2024-11-17 07:16:35 UTC
On recent CURRENT (FreeBSD 15.0-CURRENT #26 main-n273671-f334c0b8b3cb: Sat Nov 16 20:19:46 CET 2024 amd64), build of port editors/libreoffice fails due to the error shown below.

Config is:

root@thor:/usr/ports # make -C editors/libreoffice showconfig
===> The following configuration options are available for libreoffice-24.8.3.2:
     COINMP=off: Enable CoinMP (deprecated) math solver
     CUPS=on: CUPS printing system support
     DOCS=on: Build and/or install documentation
     GNOME=off: GNOME desktop environment support
     GTK3=off: GTK 3 GUI toolkit support
     GTK4=off: GTK+ 4 GUI toolkit support (experimental, broken)
     JAVA=on: Add Java support (XML filters, macros, DB connections)
     LTO=off: Use Link-Time Optimization
     MARIADB=off: Build with MariaDB/MySQL-SDBC driver
     MMEDIA=on: Enable multimedia backend for Impress
     PDFIUM=on: Enable PDFium secure engine
     PGSQL=on: Build with PostgreSQL-SDBC driver
     SDK=off: Build with SDK
     TEST=off: Run all regression tests
     WEBDAV=off: Enable WebDAV protocol
====> Select Qt GUI engine version: you can only select none or one of them
     QT5=on: Qt5 GUI toolkit support (default visual style)
     QT6=off: Qt6 GUI toolkit support (experimental visual style)
====> Select KDE GUI engine version: you can only select none or one of them
     KF5=off: KF5/Qt5 GUI toolkit support (implies QT5)
     KF6=off: KF6/Qt6 GUI toolkit support (implies QT6)
===> Use 'make config' to modify these settings
[...]


The error occuring during "make all" is:

[...]
In file included from /usr/include/c++/v1/__format/parser_std_format_spec.h:39:
/usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
  820 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
      |                                          ^
Comment 1 robbak 2024-11-19 02:58:36 UTC
This is likely the same issue as bug 281540, caused by the introduction of libc++ 19 in 15_CURRENT. The answer there was just marking the port broken until it is fixed upstream.
Comment 2 robbak 2024-11-19 19:57:36 UTC
Look at the error log, and see where the error is happening. In my case, it looked like this - 

In file included from /usr/home/obj/ports/usr/ports/editors/libreoffice/work/libreoffice-24.8.3.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:20:
In file included from /usr/home/obj/ports/usr/ports/editors/libreoffice/work/libreoffice-24.8.3.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx:36:
In file included from /usr/local/include/poppler/GfxState.h:41:
In file included from /usr/local/include/poppler/Object.h:39:
In file included from /usr/include/c++/v1/set:1495:
In file included from /usr/include/c++/v1/functional:552:
In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /usr/include/c++/v1/vector:325:
In file included from /usr/include/c++/v1/__format/formatter_bool.h:16:
In file included from /usr/include/c++/v1/__format/concepts.h:16:
In file included from /usr/include/c++/v1/__format/format_parse_context.h:16:
/usr/include/c++/v1/string_view:300:42: error: implicit instantiation of undefined template 'std::char_tr
aits<unsigned short>'


The error wasn't in libreoffice, but in the poppler headers. Rebuilding poppler resolved the error for me.

You can expect to have other similar problems with other libraries that weren't built on libc++ 19 until you have rebuilt all of them.
Comment 3 Rainer Hurling freebsd_committer freebsd_triage 2024-11-19 21:11:00 UTC
(In reply to robbak from comment #2)

> The error wasn't in libreoffice, but in the poppler headers.
> Rebuilding poppler resolved the error for me.
Many thanks for this hint! It also works for me  \o/
Comment 4 imbutler 2024-11-19 22:02:48 UTC
graphics/poppler commit 6bf6ee19368dea736b8a402d115c797f271a0f47 should have bumped PORTREVISION :-(