Bin gespannt 🤩
Beiträge von cocobrother
-
-
-
-
Cool 👍🏻👍🏻
-
kls 2.5.4 kompiliert durch unter Fedora 34 mit GCC 11.01 soweit erstmal danke 🙏. Ausgiebig testen kann ich es erst heute Abend.
-
Lösch mal das 'register'.
funktioniert….
-
Das hab ich auch noch aber das kompilieren läuft durch. Version 2.5.3
util.c: In statischer Elementfunktion »static u_int32_t SI::CRC32::crc32(const char*, int, u_int32_t)«:
util.c:269:17: Warnung: ISO-C++17 erlaubt Speicherklassenangabe »register« nicht [-Wregister]
269 | register int i;
| ^
-
kls i will Check…
-
Vorschlag:
Diff
Alles anzeigen--- tools.h 2021/01/19 20:38:28 5.3 +++ tools.h 2021/05/05 15:16:45 @@ -53,17 +53,15 @@ // In case some plugin needs to use the STL and gets an error message regarding one // of these functions, you can #define DISABLE_TEMPLATES_COLLIDING_WITH_STL before -// including tools.h. -#if !defined(__STL_CONFIG_H) // for old versions of the STL -#if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_STL_ALGOBASE_H) +// including any VDR header files. +#if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) template<class T> inline T min(T a, T b) { return a <= b ? a : b; } template<class T> inline T max(T a, T b) { return a >= b ? a : b; } #endif template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; } -#if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_MOVE_H) +#if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; } #endif -#endif template<class T> inline T constrain(T v, T l, T h) { return v < l ? l : v > h ? h : v; }
Plugins, die STL verwenden, müssen dann halt DISABLE_TEMPLATES_COLLIDING_WITH_STL definieren.
kann man das auch bei 2.5.3 anwenden? Hab ja das gleiche Problem bei Fedora 34.
-
Keine Ahnung 🤷♂️ aber Programmierer werden ihre Gründe haben.
-
Ok und das bedeutet Baustelle vom VDR oder Baustelle von Fedora (GCC)?
-
Wurde viellleicht irgendwo DISABLE_TEMPLATES_COLLIDING_WITH_STL definiert?
In tools.h werden einige Defines abgefragt, um Kollisionen mit stdlib zu vermeiden:
Code
Alles anzeigen// In case some plugin needs to use the STL and gets an error message regarding one // of these functions, you can #define DISABLE_TEMPLATES_COLLIDING_WITH_STL before // including tools.h. #if !defined(__STL_CONFIG_H) // for old versions of the STL #if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_STL_ALGOBASE_H) template<class T> inline T min(T a, T b) { return a <= b ? a : b; } template<class T> inline T max(T a, T b) { return a >= b ? a : b; } #endif template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; } #if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_MOVE_H) template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; } #endif #endif
Möglicherweise hat sich da bei GCC 11 was geändert?
Nein wurde nicht gesetzt!
-
Wurde viellleicht irgendwo DISABLE_TEMPLATES_COLLIDING_WITH_STL definiert?
In tools.h werden einige Defines abgefragt, um Kollisionen mit stdlib zu vermeiden:
Code
Alles anzeigen// In case some plugin needs to use the STL and gets an error message regarding one // of these functions, you can #define DISABLE_TEMPLATES_COLLIDING_WITH_STL before // including tools.h. #if !defined(__STL_CONFIG_H) // for old versions of the STL #if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_STL_ALGOBASE_H) template<class T> inline T min(T a, T b) { return a <= b ? a : b; } template<class T> inline T max(T a, T b) { return a >= b ? a : b; } #endif template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; } #if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_MOVE_H) template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; } #endif #endif
Möglicherweise hat sich da bei GCC 11 was geändert?
Werde ich heute Nachmittag überprüfen und dann mich wieder Melden.
-
Hallo,
ich habe heute auf Fedora 34 mit GCC 11 versucht den vdr zu kompilieren.
gcc (GCC) 11.0.1 20210324 (Red Hat 11.0.1-0).Dabei habe ich folgende Warnungen erhalten.
Das kompilieren schlug fehl.
channels.c: In statischer Elementfunktion »static int cChannels::MaxChannelNameLength()«:
channels.c:1068:36: Fehler: »max« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »std::max«?
1068 | maxChannelNameLength = max(Utf8StrLen(Channel->Name()), maxChannelNameLength);
| ^~~
| std::max
In Datei, eingebunden von /usr/include/c++/11/bits/specfun.h:45,
von /usr/include/c++/11/cmath:1927,
von /usr/include/c++/11/math.h:36,
von tools.h:18,
von i18n.h:14,
von config.h:19,
von channels.h:13,
von channels.c:10:
/usr/include/c++/11/bits/stl_algobase.h:300:5: Anmerkung: »std::max« ist hier deklariert
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
channels.c: In statischer Elementfunktion »static int cChannels::MaxShortChannelNameLength()«:
channels.c:1080:41: Fehler: »max« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »std::max«?
1080 | maxShortChannelNameLength = max(Utf8StrLen(Channel->ShortName(true)), maxShortChannelNameLength);
| ^~~
| std::max
In Datei, eingebunden von /usr/include/c++/11/bits/specfun.h:45,
von /usr/include/c++/11/cmath:1927,
von /usr/include/c++/11/math.h:36,
von tools.h:18,
von i18n.h:14,
von config.h:19,
von channels.h:13,
von channels.c:10:
/usr/include/c++/11/bits/stl_algobase.h:300:5: Anmerkung: »std::max« ist hier deklariert
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
make: *** [Makefile:145: channels.o] Fehler 1