Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 954217 - games-simulation/openrct2 cannot build with dev-cpp/nlohmann_json-3.12.0
Summary: games-simulation/openrct2 cannot build with dev-cpp/nlohmann_json-3.12.0
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-22 15:03 UTC by Andrew Udvare
Modified: 2025-04-23 15:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,39.20 KB, text/x-log)
2025-04-22 15:05 UTC, Andrew Udvare
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2025-04-22 15:03:35 UTC
Definitely a compatibility issue with the new nlohmann_json that OpenRCT devs did not anticipate.

In file included from /usr/include/nlohmann/adl_serializer.hpp:14,
                 from /usr/include/nlohmann/json.hpp:34,
                 from /var/tmp/portage/games-simulation/openrct2-0.4.21/work/OpenRCT2-0.4.21/src/openrct2/core/Json.hpp:14,
                 from /var/tmp/portage/games-simulation/openrct2-0.4.21/work/OpenRCT2-0.4.21/src/openrct2/AssetPack.cpp:13:
/usr/include/nlohmann/detail/conversions/from_json.hpp: In function ‘void nlohmann::json_abi_v3_12_0::detail::from_json(const BasicJsonType&, std::filesystem::__cxx11::path&)’:
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:27: error: ‘u8string_view’ is not a member of ‘std’; did you mean ‘wstring_view’?
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                           ^~~~~~~~~~~~~
      |                           wstring_view
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:64: error: ‘char8_t’ was not declared in this scope; did you mean ‘wchar_t’?
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                                                                ^~~~~~~
      |                                                                wchar_t
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:21: error: expected primary-expression before ‘(’ token
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                     ^
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:27: error: ‘u8string_view’ is not a member of ‘std’; did you mean ‘wstring_view’?
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                           ^~~~~~~~~~~~~
      |                           wstring_view
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:64: error: expected ‘>’ before ‘char8_t’
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                                                                ^~~~~~~
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:64: error: expected ‘(’ before ‘char8_t’
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                                                                ^~~~~~~
      |                                                                (
/usr/include/nlohmann/detail/conversions/from_json.hpp:544:72: error: expected primary-expression before ‘>’ token
  544 |     p = std_fs::path(std::u8string_view(reinterpret_cast<const char8_t*>(s.data()), s.size()));
      |                                                                        ^
In file included from /usr/include/nlohmann/adl_serializer.hpp:15:
/usr/include/nlohmann/detail/conversions/to_json.hpp: In function ‘void nlohmann::json_abi_v3_12_0::detail::to_json(BasicJsonType&, const std::filesystem::__cxx11::path&)’:
/usr/include/nlohmann/detail/conversions/to_json.hpp:447:16: error: ‘u8string’ in namespace ‘std’ does not name a type
  447 |     const std::u8string s = p.u8string();
      |                ^~~~~~~~
/usr/include/nlohmann/detail/conversions/to_json.hpp:26:1: note: ‘std::u8string’ is defined in header ‘<string>’; this is probably fixable by adding ‘#include <string>’
   25 | #include <nlohmann/detail/iterators/iteration_proxy.hpp>
  +++ |+#include <string>
   26 | #include <nlohmann/detail/meta/cpp_future.hpp>
/usr/include/nlohmann/detail/conversions/to_json.hpp:448:21: error: ‘s’ was not declared in this scope
  448 |     j = std::string(s.begin(), s.end());
      |                     ^

Reproducible: Always

Steps to Reproduce:
1. emerge -1 =dev-cpp/nlohmann_json-3.12.0
2. emerge -1 openrct2
Actual Results:  
Fails to build.

Expected Results:  
Should build.

Portage 3.0.68 (python 3.12.10-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-14, glibc-2.41-r1, 6.14.0-gentoo-limelight x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.14.0-gentoo-limelight-x86_64-11th_Gen_Intel-R-_Core-TM-_i9-11900K_@_3.50GHz-with-glibc2.41
KiB Mem:    65709404 total,  19597664 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 21 Apr 2025 23:15:00 +0000
Head commit of repository gentoo: d710ecda3cacbcbcaa5787c777d0b4ee41b55c00
Head commit of repository brave-overlay: 1e6c0bacfd42780050b455bb4a604035bcafb71f

Head commit of repository guru: c5d550fbafa2a4fbbe73447a6eeb3d21adb6ea02

Timestamp of repository menelkir: Sat, 19 Apr 2025 01:50:17 +0000
Head commit of repository menelkir: 6e4760e5b9b46a0dc4aeaef2e744acb2c4be4055

Timestamp of repository pentoo: Sat, 19 Apr 2025 08:50:19 +0000
Head commit of repository pentoo: 736a5eab62d30e9ac9b80e8d5d39353885616630

Head commit of repository tatsh-overlay: c997f659f41beb7c9e5cbf0d553c740edd9dc1e5

sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo, 1.17-r2::gentoo
dev-build/cmake:           3.31.7::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.2::gentoo
dev-lang/python:           3.11.12::gentoo, 3.12.10::gentoo, 3.13.3::gentoo, 3.13.3-r100::gentoo
dev-lang/rust-bin:         1.82.0-r103::gentoo, 1.83.0-r2::gentoo, 1.84.0-r2::gentoo, 1.85.0-r1::gentoo, 1.85.1::gentoo, 1.86.0-r1::gentoo
llvm-core/clang:           19.1.7::gentoo, 20.1.3::gentoo
llvm-core/lld:             19.1.7::gentoo
llvm-core/llvm:            15.0.7-r7::gentoo, 17.0.6-r3::gentoo, 19.1.7::gentoo, 20.1.3::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-apps/systemd:          257.5::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20250301::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.14::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r1::gentoo
Repositories:

gentoo
crossdev
guru
pentoo
tatsh-overlay

Installed sets: @admin, @android, @bashcomp, @cdr, @charles, @chrome, @cups, @dbeaver, @emulators, @exfat, @firefox, @fonts, @gimp, @git, @haskell, @i3, @ibus, @kde, @kernel, @libimobiledevice, @libreoffice, @media, @misc, @mlocate, @mupen64plus, @nfs, @pass, @portage-utilities, @python, @qemu, @rar, @retroarch, @sm64, @stepmania, @thunderbird, @tmux, @vim, @virtualbox, @vscode, @wine, @x11, @xirvik-vpn, @yt-dlp
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 10 --quiet-build=y --usepkg --verbose-conflicts --buildpkg-exclude 'acct-*/* app-arch/rar app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox-modules */*-bin dev-util/intel-ocl-sdk games-util/steam-launcher media-fonts/* media-video/magewell-pro-capture media-video/makemkv net-im/ripcord sys-kernel/linux-firmware sys-kernel/*-sources virtual/* media-video/cxadc *-drivers/* sys-apps/systemd www-client/google-chrome*'"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks export-pms-vars fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo https://mirrors.rit.edu/gentoo/"
INSTALL_MASK="/boot/amd-uc.img /etc/avahi/services/sftp-ssh.service /etc/conf.d /etc/cron.daily /etc/cron.monthly /etc/cron.weekly /etc/dracut.conf /etc/grub.d /etc/init.d /etc/modules-load.d/ddccontrol-i2c-dev.conf /etc/portage/savedconfig/sys-kernel/linux-firmware-* /etc/xdg/menus/applications-merged/lsp-plugins.menu /etc/xdg/autostart/org.kde.plasma-welcome.desktop /etc/user/init.d /usr/lib/modules-load.d/fwupd-msr.conf /usr/lib/modules-load.d/joycond.conf /usr/lib/rc"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB en_US"
MAKEOPTS="--jobs=10 --load-average=10"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi activities aio alsa amd64 aptx avahi bash-completion bluetooth bluray branding bzip2 cairo cdda cddb cdio cdr cet cjk clang colord crypt cuda cups curl dav1d dbus declarative dri dts dvb dvd dvdr egl encode exif faudio ffmpeg flac fluidsynth gamepad gdbm gif gles2 gpm gsm gstreamer gui hardened heif hwaccel ibus iconv icu idn ipv6 jack jemalloc joystick jpeg jpeg2k kde kf6compat kwallet lame lcms ldac libass libcaca libnotify libretro libtirpc lm-sensors lto lv2 lvm lz4 lzma mad man matroska mng mod modplug modules-sign mp3 mp4 mpeg multilib ncurses nls nvenc ogg opencl opengl openmp opus pam pango pcre pdf pgo pic pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 rar readline samba screencast sdl seccomp semantic-desktop snappy sound speex spell ssl startup-notification svg syslog system-av1 system-binutils system-boost system-bootloader system-cmark system-crontab system-ffmpeg system-harfbuzz system-heimdal system-info system-ipxe system-jpeg system-jsoncpp system-lcms system-leveldb system-libcxx system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-mathjax system-mesa system-mitkrb5 system-numpy system-png system-python system-qemu system-seabios system-sqlite system-ssl system-tbb system-webp system-wfconfig system-wide system-wlroots system-zlib systemd taglib test-rust theora threads tiff tpm truetype twolame udev udisks unicode upower usb v4l vaapi vcd vdpau vim-syntax vlc vorbis vpx vulkan wavpack wayland webengine webp widgets wmf wxwidgets x264 x265 xattr xcb xft xinerama xml xpm xv xvid xxhash zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gcc_14" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev libinput joystick wacom" KERNEL="linux" L10N="en en-GB en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="ppc x86_64" RUBY_TARGETS="ruby32" VIDEO_CARDS="nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

games-simulation/openrct2-0.4.21::gentoo was built with the following:
USE="flac opengl truetype vorbis -dedicated -scripting -test" ABI_X86="(64)"
Comment 1 Andrew Udvare 2025-04-22 15:05:00 UTC
Created attachment 925673 [details]
build log