Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Compile error with gcc-15 #1739

Open
heitbaum opened this issue Dec 9, 2024 · 6 comments
Open

[Bug] Compile error with gcc-15 #1739

heitbaum opened this issue Dec 9, 2024 · 6 comments
Labels
Triage: Needed (managed by bot) issue that was just created and needs someone looking at it

Comments

@heitbaum
Copy link
Contributor

heitbaum commented Dec 9, 2024

Describe the problem

test compiling LE13 with gcc has identified some code compatibility and issues.

Possible fix

No response

Steps to reproduce

Compile with gcc-15-20241124

Debug log

<<< inputstream.adaptive:target seq 381 <<<
BUILD      inputstream.adaptive (target)
    TOOLCHAIN      cmake (auto-detect)
Executing (target): cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_TOOLCHAIN_FILE=/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/etc/cmake-x86_64-libreelec-linux-gnu.conf -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers
-- Found components for RapidJSON
-- RAPIDJSON_ROOT_DIR  = /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr
-- RAPIDJSON_INCLUDES  = /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include
CMake Deprecation Warning at lib/mpegts/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at lib/webm_parser/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- ADP_VERSION=22.1.10
-- Addon dependency check ...
--  - Added API usage definition: ADDON_GLOBAL_VERSION_MAIN_USED (Version: "2.0.2", Min. Version: "2.0.0")
--  - Added API usage definition: ADDON_GLOBAL_VERSION_GENERAL_USED (Version: "1.0.5", Min. Version: "1.0.4")
--  - Added API usage definition: ADDON_GLOBAL_VERSION_GUI_USED (Version: "5.15.1", Min. Version: "5.15.0")
--  - Added API usage definition: ADDON_GLOBAL_VERSION_FILESYSTEM_USED (Version: "1.1.9", Min. Version: "1.1.7")
--  - Added API usage definition: ADDON_GLOBAL_VERSION_TOOLS_USED (Version: "1.0.4", Min. Version: "1.0.0")
--  - Added API usage definition: ADDON_INSTANCE_VERSION_INPUTSTREAM_USED (Version: "3.3.0", Min. Version: "3.3.0")
--  - Added API usage definition: ADDON_INSTANCE_VERSION_VIDEOCODEC_USED (Version: "2.1.0", Min. Version: "2.1.0")
-- Configuring done (37.0s)
-- Generating done (0.1s)
-- Build files have been written to: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers/.x86_64-libreelec-linux-gnu
Executing (target): ninja
[1/62] Building CXX object CMakeFiles/inputstream.adaptive.dir/src/main.cpp.o
FAILED: CMakeFiles/inputstream.adaptive.dir/src/main.cpp.o
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -DADDON_GLOBAL_VERSION_FILESYSTEM_USED -DADDON_GLOBAL_VERSION_GENERAL_USED -DADDON_GLOBAL_VERSION_GUI_USED -DADDON_GLOBAL_VERSION_MAIN_USED -DADDON_GLOBAL_VERSION_TOOLS_USED -DADDON_INSTANCE_VERSION_INPUTSTREAM_USED -DADDON_INSTANCE_VERSION_VIDEOCODEC_USED -DBUILD_KODI_ADDON -D__STDC_FORMAT_MACROS -Dinputstream_adaptive_EXPORTS -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers/src -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers/lib/mpegts -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers/lib/webm_parser/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers/lib/cdm -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -std=c++20 -fPIC   -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_UDMABUF=1 -DHAVE_LINUX_DMA_HEAP=1 -DHAVE_LINUX_DMA_BUF=1 -DHAVE_MKOSTEMP=1 -DHAVE_LINUX_MEMFD=1 -DHAVE_STATX=1 -DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -fvisibility=hidden -MD -MT CMakeFiles/inputstream.adaptive.dir/src/main.cpp.o -MF CMakeFiles/inputstream.adaptive.dir/src/main.cpp.o.d -o CMakeFiles/inputstream.adaptive.dir/src/main.cpp.o -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/inputstream.adaptive-22.1.10-Piers/src/main.cpp
In file included from ../src/common/CommonAttribs.h:17,
                 from ../src/common/AdaptationSet.h:11,
                 from ../src/common/AdaptiveTree.h:12,
                 from ../src/Session.h:13,
                 from ../src/main.h:11,
                 from ../src/main.cpp:9:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/type_traits: In substitution of 'template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && !(is_same_v<std::in_place_t, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, _Up>) && (__not_constructing_bool_from_optional<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<PLAYLIST::CSegmentList>::optional(_Up&&) [with _Up = PLAYLIST::CSegmentList]':
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/type_traits:3547:46:   required from 'constexpr const bool std::is_constructible_v<PLAYLIST::CSegmentList, const PLAYLIST::CSegmentList&>'
 3547 |   inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/optional:871:7:   required by substitution of 'template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && !(is_same_v<std::in_place_t, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, _Up>) && (__not_constructing_bool_from_optional<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<PLAYLIST::CSegmentList>::optional(_Up&&) [with _Up = PLAYLIST::CSegmentList]'
  871 |           && is_constructible_v<_Tp, _Up>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/common/CommonSegAttribs.h:27:74:   required from here
   27 |   void SetSegmentList(const CSegmentList& segmentList) { m_segmentList = segmentList; }
      |                                                                          ^~~~~~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/optional:874:2:   required by the constraints of 'template<class _Tp> template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && !(is_same_v<std::in_place_t, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, _Up>) && (__not_constructing_bool_from_optional<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<_Tp>::optional(_Up&&)'
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/optional:871:14: error: satisfaction of atomic constraint 'is_constructible_v<_Tp, _Up> [with _Tp = _Tp; _Up = _Up]' depends on itself
  871 |           && is_constructible_v<_Tp, _Up>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/type_traits: In substitution of 'template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && !(is_same_v<std::in_place_t, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, _Up>) && (__not_constructing_bool_from_optional<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<PLAYLIST::CSegmentTemplate>::optional(_Up&&) [with _Up = PLAYLIST::CSegmentTemplate]':
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/type_traits:3547:46:   required from 'constexpr const bool std::is_constructible_v<PLAYLIST::CSegmentTemplate, const PLAYLIST::CSegmentTemplate&>'
 3547 |   inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/optional:871:7:   required by substitution of 'template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && !(is_same_v<std::in_place_t, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, _Up>) && (__not_constructing_bool_from_optional<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<PLAYLIST::CSegmentTemplate>::optional(_Up&&) [with _Up = PLAYLIST::CSegmentTemplate]'
  871 |           && is_constructible_v<_Tp, _Up>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/type_traits:3623:7:   required from 'constexpr const bool std::is_nothrow_copy_constructible_v<PLAYLIST::CSegmentTemplate>'
 3623 |     = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/common/CommonSegAttribs.h:31:71:   recursively required from 'constexpr std::optional<PLAYLIST::CSegmentTemplate>::optional(const std::optional<PLAYLIST::CSegmentTemplate>&)'
   31 |   std::optional<CSegmentTemplate> GetSegmentTemplate() const { return m_segmentTemplate; }
      |                                                                       ^~~~~~~~~~~~~~~~~
../src/common/CommonSegAttribs.h:31:71:   required from here
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/15.0.0/optional:874:2:   required by the constraints of 'template<class _Tp> template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && !(is_same_v<std::in_place_t, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, _Up>) && (__not_constructing_bool_from_optional<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<_Tp>::optional(_Up&&)'

Stream manifest file(s)

No response

Additional info

Using gcc15-20241124

Operating system(s)

Linux

Operating system version(s)

LibreELEC LE13 master

InputStream Adaptive version(s)

22.1.10

Kodi version(s)

Piers - 65703fe91c077d8cc11be4ba10221b56cd38d30b

@heitbaum heitbaum added the Triage: Needed (managed by bot) issue that was just created and needs someone looking at it label Dec 9, 2024
@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Dec 10, 2024

there is a release date for gcc 15 or is it still under development?
if it is in wip it seems to me premature to make changes

time ago i introduced this CI mainly for gcc 14
https://github.com/xbmc/inputstream.adaptive/blob/Piers/.github/workflows/build-ubuntu.yml
could be changed to gcc 15 if there is a stable package (with appropriate code fixes)

@heitbaum
Copy link
Contributor Author

there is a release date for gcc 15 or is it still under development? if it is in wip it seems to me premature to make changes

time ago i introduced this CI mainly for gcc 14 https://github.com/xbmc/inputstream.adaptive/blob/Piers/.github/workflows/build-ubuntu.yml could be changed to gcc 15 if there is a stable package (with appropriate code fixes)

I haven’t checked into this exact error yet. But I have been fixing the -std=c23 and bool problems that have surfaced with the use of gcc-15. I would agree not jumping in to make the changes, until we work out if this is a gcc bug, or that it is now adhering being pedantic to a xxx standard. Gcc-15 is now in Stage 3 (which is bug fixing) which is why I have started the process with the LE code base to fix as much of upstream (rather that after gcc-15 is released.)

Most of the patching and porting to gcc-15 for LE is now done, just a couple packages remaining with most of the patches submitted upstream - so that hopefully the fixed packages can be incorporated (apart from the unmaintained legacy packages that have no upstream.)

I didn’t attempt this one yet as my c++ is not that great, but happy to take a look once I complete the rest of the porting.

@CastagnaIT
Copy link
Collaborator

I remind you that kodi 22 must be built with C++ 20, not 23
https://github.com/xbmc/xbmc/blob/0f04ca7184785c0d404687349ed3eb795241d060/docs/CODE_GUIDELINES.md#2-language-standard
this also applies also to binary add-ons

@heitbaum
Copy link
Contributor Author

The error error: satisfaction of atomic constraint 'is_constructible_v<_Tp, _Up> [with _Tp = _Tp; _Up = _Up]' depends on itself seems to be discussed in length with clang versus gcc in

interestingly it does build with -std=c++17 but not with -std=c++20 using gcc-15

@heitbaum
Copy link
Contributor Author

I remind you that kodi 22 must be built with C++ 20, not 23 https://github.com/xbmc/xbmc/blob/0f04ca7184785c0d404687349ed3eb795241d060/docs/CODE_GUIDELINES.md#2-language-standard this also applies also to binary add-ons

I can confirm that it is building with c++20 for the original error.

@CastagnaIT
Copy link
Collaborator

mmh ok
I tried doing some searches but i don't understand what solution should be there
sound more like a GCC bug

maybe change /src/common/CommonSegAttribs.h
std::optional<CSegmentTemplate> GetSegmentTemplate() const { return m_segmentTemplate; }
with
const std::optional<CSegmentTemplate>& GetSegmentTemplate() const { return m_segmentTemplate; }
could be workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Needed (managed by bot) issue that was just created and needs someone looking at it
Projects
None yet
Development

No branches or pull requests

2 participants