Bug 2366921 - Review Request: glaze - Extremely fast, in memory, JSON and interface library for modern C++
Summary: Review Request: glaze - Extremely fast, in memory, JSON and interface library...
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Benson Muite
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/stephenberry/glaze
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-16 18:45 UTC by Jannik Müller
Modified: 2025-05-30 00:41 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
benson_muite: fedora-review?


Attachments (Terms of Use)
The .spec file difference from Copr build 9056878 to 9101658 (2.48 KB, patch)
2025-05-29 16:36 UTC, Fedora Review Service
no flags Details | Diff

Description Jannik Müller 2025-05-16 18:45:55 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/nightishaman/hyprland/fedora-rawhide-aarch64/09056249-glaze/glaze.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/nightishaman/hyprland/fedora-rawhide-aarch64/09056249-glaze/glaze-5.2.1-1.fc43.src.rpm
Description: One of the fastest JSON libraries in the world. Glaze reads and writes from object memory, simplifying interfaces and offering incredible performance. 
Fedora Account System Username: nightishaman

NOTE: Needed for Hyprland version 0.46 and above

Comment 1 Fedora Review Service 2025-05-16 18:49:19 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9056878
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2366921-glaze/fedora-rawhide-x86_64/09056878-glaze/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Benson Muite 2025-05-19 17:25:54 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "MIT License", "*No copyright* MIT
     License", "Apache License 2.0", "Apache License 2.0 and/or Boost
     Software License 1.0", "Apache License (v2.0) or MIT license and/or
     MIT License". 298 files have unknown license. Detailed output of
     licensecheck in /home/fedora-packaging/reviews/glaze/2366921-
     glaze/licensecheck.txt
[ ]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[ ]: Package is not known to require an ExcludeArch tag.
[ ]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 33829 bytes in 1 files.
[ ]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: glaze-devel-5.2.1-1.fc43.noarch.rpm
          glaze-5.2.1-1.fc43.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.6.1
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmp8tj_eds9')]
checks: 32, packages: 2

 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 7 filtered, 0 badness; has taken 0.3 s 




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.7.0
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 3 filtered, 0 badness; has taken 0.1 s 



Source checksums
----------------
https://github.com/stephenberry/glaze/archive/v5.2.1/glaze-5.2.1.tar.gz :
  CHECKSUM(SHA256) this package     : ae3f7f0c7bd3a800466a030856a3532e0bb4fd9ef757a1123690900d6f8fec2e
  CHECKSUM(SHA256) upstream package : ae3f7f0c7bd3a800466a030856a3532e0bb4fd9ef757a1123690900d6f8fec2e


Requires
--------
glaze-devel (rpmlib, GLIBC filtered):
    cmake-filesystem



Provides
--------
glaze-devel:
    cmake(glaze)
    glaze-devel
    glaze-static



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2366921
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: R, Java, PHP, Python, SugarActivity, Ocaml, Haskell, Perl, fonts
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comments:
a) Some files are under other licenses:
Apache License (v2.0) or MIT license and/or MIT License
-------------------------------------------------------
glaze-5.2.1-build/glaze-5.2.1/include/glaze/util/fast_float.hpp


Apache License 2.0 and/or Boost Software License 1.0
----------------------------------------------------
glaze-5.2.1-build/glaze-5.2.1/include/glaze/util/dragonbox.hpp

Can fast_float from Fedora be used instead of bundled:
https://src.fedoraproject.org/rpms/fast_float

Can dragonbox from Fedora be used instead of bundled:
https://src.fedoraproject.org/rpms/dragonbox

b) Tests do not seem to run:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2366921-glaze/fedora-rawhide-x86_64/09056878-glaze/builder-live.log.gz
They require ut:
https://github.com/stephenberry/glaze/blob/main/tests/CMakeLists.txt#L5C18-L5C48
which is available in Fedora:
https://src.fedoraproject.org/rpms/ut

c) Is it worth packaging the example and documentation?

Comment 3 Jannik Müller 2025-05-19 21:44:32 UTC
a) Unfortunately, I can't use a system library for that. I checked and glaze has significantly modified the header files. For dragonbox, it looks very similar, but it would require reverting the changes. For fast_float, they integrated and wrote around the library deeply which would require a significant amount of work to use the system library.
Therefore, I would prefer bundling it as an exception for this case.

b) I disabled the tests, because I didnt see them as significant as this is a developer-only package. If you wish for that, I can re-enable them which would introduce some longer compile time. Switching to Fedora "ut" won't be a problem.

c) I don't think so, I will remove that.

Comment 4 Benson Muite 2025-05-24 07:48:41 UTC
(In reply to Jannik Müller from comment #3)
> a) Unfortunately, I can't use a system library for that. I checked and glaze
> has significantly modified the header files. For dragonbox, it looks very
> similar, but it would require reverting the changes. For fast_float, they
> integrated and wrote around the library deeply which would require a
> significant amount of work to use the system library.
> Therefore, I would prefer bundling it as an exception for this case.
> 

Ok.

> b) I disabled the tests, because I didnt see them as significant as this is
> a developer-only package. If you wish for that, I can re-enable them which
> would introduce some longer compile time. Switching to Fedora "ut" won't be
> a problem.

Please enable them. It is possible to make running tests conditional to reduce
build times, but they help check correctness during rebuilds.

> 
> c) I don't think so, I will remove that.

A noarch docs subpackage would be helpful.  It does not seem
that anything needs to be built, just adding

%package        doc
Summary:        Documentation for %{name}
BuildArch:      noarch

%description    doc
Documentation and example files for %{name}.

and then

%files doc
%license LICENSE
%doc examples/
%doc docs/

Comment 5 Ben Beasley 2025-05-25 11:56:25 UTC
(In reply to Jannik Müller from comment #3)
> a) Unfortunately, I can't use a system library for that. I checked and glaze
> has significantly modified the header files. For dragonbox, it looks very
> similar, but it would require reverting the changes. For fast_float, they
> integrated and wrote around the library deeply which would require a
> significant amount of work to use the system library.
> Therefore, I would prefer bundling it as an exception for this case.

For xxhashct, it is a simple as:

  # Unbundled (header-only)
  BuildRequires:  xxhashct-static

(The -static, instead of or in addition to -devel, is required by https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries.)

And then, in %prep:

  # Unbundle xxhash64ct
  cat > include/glaze/api/xxh64.hpp <<'EOF'
  #include <xxh64.hpp>
  EOF

And in %package devel:

  # Unbundled (header-only)
  Requires:       xxhashct-static

If you were to unbundle fast_float and/or dragonbox, it would be a little messier. It is still possible, because all upstream has done is wrap the C++ symbols in a "glz" namespace and add a "GLZ_" prefix to the preprocessor macros. The namespace can be handled by re-including the header with a namespace alias, like

  cat > include/glaze/util/fast_float.hpp <<'EOF'
  #include <fast_float/fast_float.h>
  namespace glz::fast_float = fast_float;
  EOF

However, the preprocessor macros are a little trickier. Something like this is not beautiful, but it works:

  # Unbundle fast_float
  macros="$(
    awk '/#define GLZ_FASTFLOAT/ { print $2 }' \
        include/glaze/util/fast_float.hpp |
      grep -vE 'FASTFLOAT_DETAIL|_H$' |
      sort -u |
      tr '\n' ' '
  )"
  cat > include/glaze/util/fast_float.hpp <<'EOF'
  #include <fast_float/fast_float.h>
  namespace glz::fast_float = fast_float;
  // GLZ_-prefixed versions of "public" FASTFLOAT_ macros:
  EOF
  while read -r macro
  do
    cat >> include/glaze/util/fast_float.hpp <<EOF
  #if defined FASTFLOAT_${macro}
  #define GLZ_FASTFLOAT_${macro} FASTFLOAT_${macro}
  #endif
  EOF
  done <<<"${macros}"

(You could also manually handle only the preprocessor macros that are actually needed, but that would be more brittle.)

I think a similar approach would be possible for dragonbox.

If you are *not* going to unbundle these (and the guidelines say that you “SHOULD make every effort” to do so), then you MUST follow the stipulations for bundling in https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling:

- Indicate what you bundle using virtual Provides
- Contact upstream publicly about a path to supporting system libraries

Comment 6 Ben Beasley 2025-05-25 12:00:52 UTC
(In reply to Benson Muite from comment #4)
> (In reply to Jannik Müller from comment #3)
> > b) I disabled the tests, because I didnt see them as significant as this is
> > a developer-only package. If you wish for that, I can re-enable them which
> > would introduce some longer compile time. Switching to Fedora "ut" won't be
> > a problem.
> 
> Please enable them. It is possible to make running tests conditional to
> reduce
> build times, but they help check correctness during rebuilds.

To back this up, https://docs.fedoraproject.org/en-US/packaging-guidelines/#_test_suites says:

  If the source code of the package provides a test suite, it should be
  executed in the %check section, whenever it is practical to do so.

It is quite common for such test suites to usefully detect things like architecture-specific issues or incompatibilities with new compiler versions, even in header-only libraries like this one.

Comment 7 Jannik Müller 2025-05-25 13:40:10 UTC
(In reply to Ben Beasley from comment #5)
> (In reply to Jannik Müller from comment #3)
> > a) Unfortunately, I can't use a system library for that. I checked and glaze
> > has significantly modified the header files. For dragonbox, it looks very
> > similar, but it would require reverting the changes. For fast_float, they
> > integrated and wrote around the library deeply which would require a
> > significant amount of work to use the system library.
> > Therefore, I would prefer bundling it as an exception for this case.
> 
> For xxhashct, it is a simple as:
> 
>   # Unbundled (header-only)
>   BuildRequires:  xxhashct-static
> 
> (The -static, instead of or in addition to -devel, is required by
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_packaging_header_only_libraries.)
> 
> And then, in %prep:
> 
>   # Unbundle xxhash64ct
>   cat > include/glaze/api/xxh64.hpp <<'EOF'
>   #include <xxh64.hpp>
>   EOF
> 
> And in %package devel:
> 
>   # Unbundled (header-only)
>   Requires:       xxhashct-static
> 
> If you were to unbundle fast_float and/or dragonbox, it would be a little
> messier. It is still possible, because all upstream has done is wrap the C++
> symbols in a "glz" namespace and add a "GLZ_" prefix to the preprocessor
> macros. The namespace can be handled by re-including the header with a
> namespace alias, like
> 
>   cat > include/glaze/util/fast_float.hpp <<'EOF'
>   #include <fast_float/fast_float.h>
>   namespace glz::fast_float = fast_float;
>   EOF
> 
> However, the preprocessor macros are a little trickier. Something like this
> is not beautiful, but it works:
> 
>   # Unbundle fast_float
>   macros="$(
>     awk '/#define GLZ_FASTFLOAT/ { print $2 }' \
>         include/glaze/util/fast_float.hpp |
>       grep -vE 'FASTFLOAT_DETAIL|_H$' |
>       sort -u |
>       tr '\n' ' '
>   )"
>   cat > include/glaze/util/fast_float.hpp <<'EOF'
>   #include <fast_float/fast_float.h>
>   namespace glz::fast_float = fast_float;
>   // GLZ_-prefixed versions of "public" FASTFLOAT_ macros:
>   EOF
>   while read -r macro
>   do
>     cat >> include/glaze/util/fast_float.hpp <<EOF
>   #if defined FASTFLOAT_${macro}
>   #define GLZ_FASTFLOAT_${macro} FASTFLOAT_${macro}
>   #endif
>   EOF
>   done <<<"${macros}"
> 
> (You could also manually handle only the preprocessor macros that are
> actually needed, but that would be more brittle.)
> 
> I think a similar approach would be possible for dragonbox.
> 
> If you are *not* going to unbundle these (and the guidelines say that you
> “SHOULD make every effort” to do so), then you MUST follow the stipulations
> for bundling in
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling:
> 
> - Indicate what you bundle using virtual Provides
> - Contact upstream publicly about a path to supporting system libraries

I really thank you both for your input. I appreciate that. I will try it, I wasn't sure whether it was possible, because in the commit history, they seemed to have added stuff. include/glaze/util/glaze_fast_float.hpp specifically is one such file, that isn't in fast_float itself. I will try to apply the commands for each package and hope it won't break anything.

Comment 8 Jannik Müller 2025-05-25 16:44:18 UTC
I tried as far as I could, unforunately Dragonbox is from the upstream source. The developer of Dragonbox hasn't released a new update in the last 3 years while the upstream source has been edited 7 months ago. glaze uses the version from 7 months ago, therefore the system library is missing definitions that are required for glaze.

I was able to include xxhash64ct and fast_float as system libraries.

Even without the above changed, enabling tests causes the build to fail:

[  5%] Building CXX object tests/cli_menu_test/CMakeFiles/cli_menu_test.dir/cli_menu_test.cpp.o
cd /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/redhat-linux-build/tests/cli_menu_test && /usr/bin/g++  -I/builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/include -isystem /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/external/ut/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -std=gnu++23 -fno-exceptions -fno-rtti -Wall -Wextra -pedantic -Wno-missing-braces -MD -MT tests/cli_menu_test/CMakeFiles/cli_menu_test.dir/cli_menu_test.cpp.o -MF CMakeFiles/cli_menu_test.dir/cli_menu_test.cpp.o.d -o CMakeFiles/cli_menu_test.dir/cli_menu_test.cpp.o -c /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/tests/cli_menu_test/cli_menu_test.cpp
In file included from /usr/include/c++/15/bits/unordered_map.h:33,
                 from /usr/include/c++/15/unordered_map:43,
                 from /usr/include/c++/15/functional:65,
                 from /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/include/glaze/api/api.hpp:6,
                 from /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/include/glaze/api/impl.hpp:6,
                 from /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/tests/api_test/api_test.cpp:7:
/usr/include/c++/15/bits/hashtable.h: In instantiation of ‘class std::_Hashtable<std::vector<std::__cxx11::basic_string<char> >, std::vector<std::__cxx11::basic_string<char> >, std::allocator<std::vector<std::__cxx11::basic_string<char> > >, std::__detail::_Identity, std::equal_to<std::vector<std::__cxx11::basic_string<char> > >, std::hash<std::vector<std::__cxx11::basic_string<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >’:
/usr/include/c++/15/bits/unordered_set.h:110:18:   required from ‘class std::unordered_set<std::vector<std::__cxx11::basic_string<char> > >’
  110 |       _Hashtable _M_h;
      |                  ^~~~
/builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/include/glaze/core/meta.hpp:226:45:   required from ‘constexpr const std::string_view glz::name_v<std::unordered_set<std::vector<std::__cxx11::basic_string<char> > > >’
  226 |          if constexpr (requires { T::glaze::name; }) {
      |                                             ^~~~
/builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/tests/api_test/api_test.cpp:180:36:   required from here
  180 |          std::string_view u = glz::name_v<std::unordered_set<std::vector<std::string>>>;
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/15/bits/hashtable.h:210:51: error: static assertion failed: hash function must be copy constructible
  210 |       static_assert(is_copy_constructible<_Hash>::value,
      |                                                   ^~~~~
/usr/include/c++/15/bits/hashtable.h:210:51: note: ‘std::integral_constant<bool, false>::value’ evaluates to false

It seems to be that the test uses a template which creates a realization that is not allowed in the cpp library. I would create an issue on upstream, but would suggest disabling the tests that are defective until upstream fixes it. I need the library to update Hyprland. Hyprland doesn't seem to use the broken features that are used in the test.

Do you agree with me?

Comment 9 Jannik Müller 2025-05-25 16:48:20 UTC
For reference, I tried with the newest version, which released a few days ago, too.

Comment 10 Jannik Müller 2025-05-25 16:49:59 UTC
(In reply to Jannik Müller from comment #9)
> For reference, I tried with the newest version, which released a few days
> ago, too.

https://github.com/stephenberry/glaze/issues/1759

Comment 11 Ben Beasley 2025-05-29 14:01:44 UTC
(In reply to Jannik Müller from comment #8)
> I tried as far as I could, unforunately Dragonbox is from the upstream
> source. The developer of Dragonbox hasn't released a new update in the last
> 3 years while the upstream source has been edited 7 months ago. glaze uses
> the version from 7 months ago, therefore the system library is missing
> definitions that are required for glaze.

This seems reasonable enough. You should write a spec-file comment explaining that, and (in the -devel subpackage), add:

# Blah, blah, my explanation here
Provides:       bundled(dragonbox) = 1.1.3^20241028git6c7c925

> I was able to include xxhash64ct and fast_float as system libraries.

Awesome!

Although I played with this a little more, and I think I made an error in my suggestion:

  namespace glz::fast_float = fast_float;

should have been

  namespace glz { namespace fast_float = ::fast_float; }

> Even without the above changed, enabling tests causes the build to fail:

I fiddled with this a bit. I got as far as adding:

  # For tests (header-only):
  BuildRequires:  eigen3-static
  # Missing -static virtual Provides for header-only
  BuildRequires:  asio-devel

…and then you can pass the following options to CMake to deal with the FetchContent invocations:

    -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=TRUE \
    -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS

I could not unbundle ut because Fedora’s ut package is based on https://github.com/boost-ext/ut, provides cmake(ut), and installs /usr/include/boost/ut.hpp. This package needs https://github.com/openalgz/ut, which should provide cmake(ut::ut) and be installed as /usr/include/ut/ut.hpp. They are not the same library. To unbundle ut, another new package would be required, maybe named openalgz-ut.

> It seems to be that the test uses a template which creates a realization
> that is not allowed in the cpp library. I would create an issue on upstream,
> but would suggest disabling the tests that are defective until upstream
> fixes it. I need the library to update Hyprland. Hyprland doesn't seem to
> use the broken features that are used in the test.

This seems likely, but I’m not sure how you are dealing with the bundled (openalgz-ut) and I don’t want to re-invent the wheel, so I cannot easily reproduce it and play with it myself at the moment.

Comment 12 Jannik Müller 2025-05-29 14:19:11 UTC
(In reply to Ben Beasley from comment #11)
> Although I played with this a little more, and I think I made an error in my
> suggestion:
> 
>   namespace glz::fast_float = fast_float;
> 
> should have been
> 
>   namespace glz { namespace fast_float = ::fast_float; }
> 

Yeah I fixed that already.


> I could not unbundle ut because Fedora’s ut package is based on
> https://github.com/boost-ext/ut, provides cmake(ut), and installs
> /usr/include/boost/ut.hpp. This package needs
> https://github.com/openalgz/ut, which should provide cmake(ut::ut) and be
> installed as /usr/include/ut/ut.hpp. They are not the same library. To
> unbundle ut, another new package would be required, maybe named openalgz-ut.
> 
> > It seems to be that the test uses a template which creates a realization
> > that is not allowed in the cpp library. I would create an issue on upstream,
> > but would suggest disabling the tests that are defective until upstream
> > fixes it. I need the library to update Hyprland. Hyprland doesn't seem to
> > use the broken features that are used in the test.
> 
> This seems likely, but I’m not sure how you are dealing with the bundled
> (openalgz-ut) and I don’t want to re-invent the wheel, so I cannot easily
> reproduce it and play with it myself at the moment.

Should I do write a package review for that now? I didn't think it would explode this far with so many packages I have to submit. I just want to fix Hyprland right now, so that the Fedora users can enjoy the newest version again. I don't know if I have the time to maintain more packages.
Although it might be necessary...

Comment 13 Ben Beasley 2025-05-29 15:04:53 UTC
(In reply to Jannik Müller from comment #12)
> Should I do write a package review for that now? I didn't think it would
> explode this far with so many packages I have to submit. I just want to fix
> Hyprland right now, so that the Fedora users can enjoy the newest version
> again. I don't know if I have the time to maintain more packages.
> Although it might be necessary...

I hacked together a quick proof of concept, as follows:

  - https://music.fedorapeople.org/openalgz-ut.spec
  - https://music.fedorapeople.org/openalgz-ut-0.0.5-1.fc42.src.rpm

Then I tried to unbundle with

  BuildRequires:  openalgz-ut

and in %prep

  # Adjust dependency name in tests to match Fedora’s openalgz-ut package.
  sed -r -i 's/\but::(ut)\b/\1/' tests/CMakeLists.txt

After that, things still weren’t quite right:

  cd /builddir/build/BUILD/glaze-5.2.1-build/glaze-5.2.1/redhat-linux-build/tests/compare_test && /usr/bin/cmake -E cmake_link_script CMakeFiles/compare_test.dir/link.txt --verbose=1
  /usr/bin/ld: cannot find -lut: No such file or directory

(At the same time, in a different parallel process, I did see the GCC 15 incompatibility you reported, “static assertion failed: hash function must be copy constructible.”)

So the CMake configs are trying to have it link a nonexistent libut.so for a header-only library. I also don’t like that my proposed openalgz-ut package Provides cmake(ut) rather than cmake(ut::ut), and that this is the same Provides as ut-devel. I didn’t have the time or interest to investigate any of this further. You are welcome to take my links above as a starting point and try to get everything working properly, if you like.

I think unbundling (openalgz-ut) here is less urgent since it’s only used for tests and isn’t installed as part of the binary RPMs, so if you can get glaze working with a bundled copy provided as an additional source, I think that would be reasonable too.

For the time being, I guess it could also be ok to build this without the tests in Fedora 42+ due to the GCC 15 issue, as long as you are sure it works with hyprland, although I defer to Benson as the actual reviewer here. It would be nice to at least prove it out with tests in a Fedora 41 scratch build, where you have GCC 14, to show that the GCC 15 regression is the only problem.

Comment 14 Jannik Müller 2025-05-29 16:32:49 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/nightishaman/hyprland/fedora-rawhide-x86_64/09101647-glaze/glaze.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/nightishaman/hyprland/fedora-rawhide-x86_64/09101647-glaze/glaze-5.3.0-1.fc43.src.rpm

Copr url for Fedora 41 build: https://copr.fedorainfracloud.org/coprs/nightishaman/hyprland/build/9101655/
I enabled Internet access for the Fedora 41 build to show that it is working when it fetches ut. I will bundle ut with it once I have time to do so, either before or after it is approved.
In the mean time, tests will be disabled for Fedora 42+ because of GCC 15.

Comment 15 Fedora Review Service 2025-05-29 16:36:46 UTC
Created attachment 2092169 [details]
The .spec file difference from Copr build 9056878 to 9101658

Comment 16 Fedora Review Service 2025-05-29 16:36:49 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9101658
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2366921-glaze/fedora-rawhide-x86_64/09101658-glaze/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 17 Ben Beasley 2025-05-30 00:41:29 UTC
Note that there has been some further discussion with the upstream maintainer beginning at https://github.com/stephenberry/glaze/issues/1759#issuecomment-2920748281. They believe they have fixed the GCC 15 problem, and they have some comments, suggestions, and questions about unbundling.


Note You need to log in before you can comment on or make changes to this bug.