Bug 278948 - sysutils/bareos-server: error: 'char_traits<fmt::detail::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period
Summary: sysutils/bareos-server: error: 'char_traits<fmt::detail::char8_type>' is depr...
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: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on: 283052
Blocks:
  Show dependency treegraph
 
Reported: 2024-05-13 09:47 UTC by Trond Endrestøl
Modified: 2024-12-02 20:21 UTC (History)
3 users (show)

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


Attachments
Patch for sysutils/bareos-server/Makefile adding CXXFLAGS+=-Wno-deprecated-declarations as a band-aid (455 bytes, patch)
2024-05-13 09:48 UTC, Trond Endrestøl
no flags Details | Diff
Allow build of bareos-server on FreeBSD 13.4 (352 bytes, patch)
2024-10-05 15:35 UTC, Tomáš Čiernik
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2024-05-13 09:47:33 UTC
FAILED: core/src/stored/CMakeFiles/bareossd.dir/device_resource.cc.o
ccache /usr/local/libexec/ccache/c++ -DFMT_HEADER_ONLY=1 -D_FILE_OFFSET_BITS=64 -Dbareossd_EXPORTS -I/construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src -I/construction/xports/sysutils/bareos-serv
er/work/bareos-Release-23.0.2/third-party/fmt/include -O2 -pipe -fno-omit-frame-pointer -DMDB_DSYNC=O_SYNC -DMDB_USE_POSIX_SEM=1 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/
include -Wsuggest-override -Wformat -Werror=format-security -fdebug-prefix-map=/construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core=. -fmacro-prefix-map=/construction/xports/sysutils/bareos-server/work
/bareos-Release-23.0.2/core=. -Wno-invalid-offsetof -Werror -Wall -Wextra -O2 -pipe -fno-omit-frame-pointer -DMDB_DSYNC=O_SYNC -DMDB_USE_POSIX_SEM=1 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
-isystem /usr/local/include   -std=gnu++17 -fPIC -pthread -MD -MT core/src/stored/CMakeFiles/bareossd.dir/device_resource.cc.o -MF core/src/stored/CMakeFiles/bareossd.dir/device_resource.cc.o.d -o core/src/stored/CMakeFiles/
bareossd.dir/device_resource.cc.o -c /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/stored/device_resource.cc
In file included from /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/stored/device_resource.cc:24:
In file included from /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/lib/parse_conf.h:27:
In file included from /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/include/bareos.h:130:
In file included from /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/include/baconfig.h:34:
In file included from /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/lib/message.h:36:
In file included from /construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/core/src/lib/message_destination_info.h:28:
In file included from /usr/include/c++/v1/string:625:
In file included from /usr/include/c++/v1/string_view:213:
/usr/include/c++/v1/__fwd/string_view.h:22:41: error: 'char_traits<fmt::detail::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a
 temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Werror,-Wdeprecated-declarations]
   22 | template <class _CharT, class _Traits = char_traits<_CharT> >
      |                                         ^
/construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/third-party/fmt/include/fmt/core.h:377:26: note: in instantiation of default argument for 'basic_string_view<fmt::detail::char8_type>' required here
  377 | template <typename Char> using std_string_view = std::basic_string_view<Char>;
      |                          ^~~~~
/construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/third-party/fmt/include/fmt/core.h:467:50: note: in instantiation of template type alias 'std_string_view' requested here
  467 |                                       S, detail::std_string_view<Char>>::value)>
      |                                                  ^
/construction/xports/sysutils/bareos-server/work/bareos-Release-23.0.2/third-party/fmt/include/fmt/format.h:713:57: note: in instantiation of template class 'fmt::basic_string_view<fmt::detail::char8_type>' requested here
  713 | inline auto compute_width(basic_string_view<char8_type> s) -> size_t {
      |                                                         ^
/usr/include/c++/v1/__string/char_traits.h:81:8: note: 'char_traits<fmt::detail::char8_type>' has been explicitly marked deprecated here
   81 | struct _LIBCPP_DEPRECATED_(
      |        ^
/usr/include/c++/v1/__config:978:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
  978 | #      define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
      |                                                     ^
1 error generated.
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /xports/sysutils/bareos-server
Comment 1 Trond Endrestøl 2024-05-13 09:48:33 UTC
Created attachment 250612 [details]
Patch for sysutils/bareos-server/Makefile adding CXXFLAGS+=-Wno-deprecated-declarations as a band-aid
Comment 2 Tomáš Čiernik 2024-10-05 15:35:49 UTC
Created attachment 254023 [details]
Allow build of bareos-server on FreeBSD 13.4

Please see new patch, which is based on the one attached by Trond. Without it build of bareos-server on FreeBSD 13.4 fails.
Comment 3 LisaSeamon 2024-10-17 07:02:43 UTC
MARKED AS SPAM
Comment 4 Adam McDougall 2024-11-30 00:51:52 UTC
Why was this marked as spam and watchers removed?
Comment 5 Adam McDougall 2024-11-30 00:54:41 UTC
I think I see what happened. I (ebay@looksharp.net) retain interest in the bug report though. Thanks.
Comment 6 Guido Falsi freebsd_committer freebsd_triage 2024-11-30 16:33:50 UTC
(In reply to Adam McDougall from comment #5)

Only comment 3 was marked as spam, because it was spam (probably AI generated).
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-12-02 20:14:39 UTC
A commit in branch main references this bug:

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

commit 848e10ca6a87ad5520d4f130c24a44dd23301dd3
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2024-12-02 20:12:52 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2024-12-02 20:12:52 +0000

    sysutils/bareos-server: Update to 23.1.0

    - Fix build on recent releases [1]
    - Fix rc script REQUIRE substitutions
    - Remove unused %%REQ_MYSQL%% in rc script
    - Do not install new sample dedup.conf file because it is invalid
      and causes the director to fail to start as is.

    PR:             283052, 278948 [1]
    Approved by:    acm (maintainer)

 sysutils/bareos-server/Makefile            | 14 ++++++++++----
 sysutils/bareos-server/distinfo            |  6 +++---
 sysutils/bareos-server/files/bareos-dir.in |  2 +-
 sysutils/bareos-server/pkg-plist           |  3 +++
 4 files changed, 17 insertions(+), 8 deletions(-)
Comment 8 Guido Falsi freebsd_committer freebsd_triage 2024-12-02 20:21:51 UTC
This issue should have been fixed by ports r848e10ca6a87ad5520d4f130c24a44dd23301dd3