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

Fail to build with Kodi 18 #81

Open
marillat opened this issue Jan 30, 2019 · 7 comments
Open

Fail to build with Kodi 18 #81

marillat opened this issue Jan 30, 2019 · 7 comments

Comments

@marillat
Copy link

marillat commented Jan 30, 2019

Debian unstable gcc 8.2.0 amd64 jsoncpp 1.7.4 and 1.84

Kodi packages come from https://www.deb-multimedia.org

/usr/lib/ccache/c++  -DADDON_GLOBAL_VERSION_MAIN_USED -DADDON_INSTANCE_VERSION_PVR_USED -DBUILD_KODI_ADDON -Dpvr_hdhomerun_EXPORTS -I/usr/include/kodi -I/usr/include/p8-platform -I/usr/include/jsoncpp -I/usr/include/libhdhomerun  -g -O2 -fdebug-prefix-map=/src/kodi-pvr-hdhomerun-3.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++11 -O3 -DNDEBUG -fPIC   -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_MEMFD=1 -DHAVE_MKOSTEMP=1 -DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -o CMakeFiles/pvr.hdhomerun.dir/src/HDHomeRunTuners.cpp.o -c /src/kodi-pvr-hdhomerun-3.4.3/src/HDHomeRunTuners.cpp
In file included from /usr/include/c++/8/bits/shared_ptr.h:52,
                 from /usr/include/c++/8/memory:81,
                 from /src/kodi-pvr-hdhomerun-3.4.3/src/HDHomeRunTuners.cpp:30:
/usr/include/c++/8/bits/shared_ptr_base.h: In static member function 'static const std::type_info& std::_Sp_make_shared_tag::_S_ti()':
/usr/include/c++/8/bits/shared_ptr_base.h:511:49: error: '__tag' was not declared in this scope
       return reinterpret_cast<const type_info&>(__tag);
                                                 ^~~~~
/usr/include/c++/8/bits/shared_ptr_base.h:511:49: note: suggested alternative: '__pad'
       return reinterpret_cast<const type_info&>(__tag);
                                                 ^~~~~
                                                 __pad
make[2]: *** [CMakeFiles/pvr.hdhomerun.dir/build.make:79: CMakeFiles/pvr.hdhomerun.dir/src/HDHomeRunTuners.cpp.o] Error 1````
@MilhouseVH
Copy link
Contributor

This looks to be a gcc regression, as I'm now seeing it too with gcc-8.3.0 (but not with stable gcc-8.2.0) - presumably your "unstable gcc 8.2.0" includes additional changes (including the regression) not present in the standard gcc-8.2.0 release. Anyway, I don't think this is a PVR HDHomerun issue, it's a gcc issue.

@MilhouseVH
Copy link
Contributor

@MilhouseVH
Copy link
Contributor

So apparently not a gcc regression, but the problem is with https://github.com/Silicondust/libhdhomerun/blob/9719cbc7a562dfc3ae638ba1f3769f9451db5389/hdhomerun_os_posix.h#L56-L58 because alignas(n) is incorrectly defined (see comment 4 on gcc bug).

@fuzzard
Copy link
Contributor

fuzzard commented Feb 23, 2019

Yeah, error is in the SD upstream library.

Windows header already has the proposed fix in place, but its not in the posix header.
https://github.com/Silicondust/libhdhomerun/blob/9719cbc7a562dfc3ae638ba1f3769f9451db5389/hdhomerun_os_windows.h#L63

Have sent a PR to silicondust, however i wouldnt hold your breathe. I dont have a build system setup at the moment, and dont have time to add a patch into the addon's build process. Ill try a little later if i can get some time.

Silicondust/libhdhomerun#19

@marillat
Copy link
Author

The patch is very simple

+++ b/src/HDHomeRunTuners.cpp
@@ -22,7 +22,7 @@
  *
  */
 
-#include "HDHomeRunTuners.h"
+
 
 #include <cstring>
 #include <ctime>
@@ -35,6 +35,8 @@
 #include <libXBMC_addon.h>
 #include <p8-platform/util/StringUtils.h>
 
+#include "HDHomeRunTuners.h"
+
 #include "client.h"
 #include "Utils.h"```

@fuzzard
Copy link
Contributor

fuzzard commented Feb 24, 2019

I figure always better to go upstream first, and then as a last resort workaround locally. Each their own though.

@MilhouseVH
Copy link
Contributor

Thanks @fuzzard, I agree that fixing the underlying issue with libhdhomerun would be the better solution - I've tested Silicondust/libhdhomerun#19 with gcc-8.2.0 and gcc-8.3.0, and both are now able to compile pvr.hdhomerun successfully. I'd say this issue can now be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants