Linux Build error on xbmc-18.5-Leia
#1
libdrm version 2.4.81
mesa version 19.2.7
gcc version 4.9.4
linux 4.14.156
I'm trying to compile 18.5 , but getting error (all build log)

[ 43%] Building CXX object build/cores/RetroPlayer/rendering/VideoRenderers/CMakeFiles/rp-videorenderers.dir/RPRendererGuiTexture.cpp.o
cd /usr/src/xbmc-18.5-Leia/b/build/cores/RetroPlayer/rendering/VideoRenderers && /usr/bin/ccache /usr/bin/c++   -I/usr/src/xbmc-18.5-Leia -I/usr/src/xbmc-18.5-Leia/lib -I/usr/src/xbmc-18.5-Leia/lib/gtest/include -I/usr/src/xbmc-18.5-Leia/xbmc -I/usr/src/xbmc-18.5-Leia/xbmc/platform/linux -I/usr/src/xbmc-18.5-Leia/xbmc/cores/VideoPlayer -I/usr/src/xbmc-18.5-Leia/b/build -I/opt/avahi/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/opt/lcms/include -I/opt/lirc/include -I/opt/xbmc-libs/include -I/opt/python/include/python2.7 -I/opt/samba/include -I/usr/include/libxml2 -I/usr/X11R6/include -I/opt/media/include -I/usr/src/xbmc-18.5-Leia/b/build/cpluff/include -I/usr/src/xbmc-18.5-Leia/b/build/include -I/opt/curl/include -I/usr/src/xbmc-18.5-Leia/b/build/cores/RetroPla[/syntax]yer/messages -I/usr/X11R6/include/freetype2 -I/usr/src/xbmc-18.5-Leia/b/build/libdvd/include -I/usr/include/lzo -I/opt/sqlite/include -I/usr/include/drm  -I/opt/X11/include -I/opt/alsa/include -O2 -fomit-frame-pointer -std=c++11 -DPLATFORM_SETTINGS_FILE=x11.xml -Wall -O3 -DNDEBUG   -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 -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_LINUX_NETWORK -DHAVE_STD__U16_STRING=1 -DHAVE_STD__U32_STRING=1 -DHAVE_CHAR16_T=1 -DHAVE_CHAR32_T=1 -DHAVE_STDINT_H=1 -DHAS_BUILTIN_SYNC_ADD_AND_FETCH=1 -DHAS_BUILTIN_SYNC_SUB_AND_FETCH=1 -DHAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP=1 -DHAVE_INOTIFY=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAS_ALSA=1 -DHAS_AVAHI=1 -DHAS_ZEROCONF=1 -DHAS_DBUS=1 -DHAVE_LCMS2=1 -DHAS_LIRC=1 -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1 -DHAS_FILESYSTEM_NFS=1 -DHAS_PYTHON=1 -DHAS_FILESYSTEM_SMB=1 -DHAVE_LIBUDEV=1 -DHAVE_LIBXSLT=1 -DHAVE_LIBVA=1 -DHAS_GLX=1 -DHAS_AIRPLAY=1 -DFFMPEG_VER_SHA=\"4.0.4-Leia-18.4\" -DUSE_STATIC_FFMPEG=1 -I/usr/include/fribidi -DHAS_GL=1 -DHAS_EGL=1 -DHAVE_X11=1 -DHAVE_LIBXRANDR=1 -DHAS_UPNP=1 -DHAS_DVD_DRIVE -DHAS_CDDA_RIPPER -DBIN_INSTALL_PATH=\"/opt/xbmc/lib64/kodi\" -DINSTALL_PATH=\"/opt/xbmc/share/kodi\" -std=c++11 -o CMakeFiles/rp-videorenderers.dir/RPRendererGuiTexture.cpp.o -c /usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp: In member function ‘virtual void KODI::RETRO::CRPRendererGuiTexture::RenderInternal(bool, uint8_t)’:
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:187:106: error: expected primary-expression before ‘,’ token
   glVertexAttribPointer(posLoc, 3, GL_FLOAT, 0, sizeof(PackedVertex), BUFFER_OFFSET(offsetof(PackedVertex, x)));
                                                                                                          ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:23:55: note: in definition of macro ‘BUFFER_OFFSET’
 #define BUFFER_OFFSET(i) (static_cast<char*>(NULL) + (i))
                                                       ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:187:108: error: ‘x’ was not declared in this scope
   glVertexAttribPointer(posLoc, 3, GL_FLOAT, 0, sizeof(PackedVertex), BUFFER_OFFSET(offsetof(PackedVertex, x)));
                                                                                                            ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:23:55: note: in definition of macro ‘BUFFER_OFFSET’
 #define BUFFER_OFFSET(i) (static_cast<char*>(NULL) + (i))
                                                       ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:187:109: error: ‘offsetof’ was not declared in this scope
   glVertexAttribPointer(posLoc, 3, GL_FLOAT, 0, sizeof(PackedVertex), BUFFER_OFFSET(offsetof(PackedVertex, x)));
                                                                                                             ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:23:55: note: in definition of macro ‘BUFFER_OFFSET’
 #define BUFFER_OFFSET(i) (static_cast<char*>(NULL) + (i))
                                                       ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:188:107: error: expected primary-expression before ‘,’ token
   glVertexAttribPointer(tex0Loc, 2, GL_FLOAT, 0, sizeof(PackedVertex), BUFFER_OFFSET(offsetof(PackedVertex, u1)));
                                                                                                           ^
/usr/src/xbmc-18.5-Leia/xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererGuiTexture.cpp:23:55: note: in definition of macro ‘BUFFER_OFFSET’
 #define BUFFER_OFFSET(i) (static_cast<char*>(NULL) + (i))
                                                       ^
make[2]: *** [build/cores/RetroPlayer/rendering/VideoRenderers/CMakeFiles/rp-videorenderers.dir/RPRendererGuiTexture.cpp.o] Error 1
make[2]: Leaving directory `/usr/src/xbmc-18.5-Leia/b'
make[1]: *** [build/cores/RetroPlayer/rendering/VideoRenderers/CMakeFiles/rp-videorenderers.dir/all] Error 2
make[1]: Leaving directory `/usr/src/xbmc-18.5-Leia/b'
make: *** [all] Error 2
Error during build
Reply
#2
Welcome to the forum.

If you are already providing the URL to your pastebin'd compiling log, which is good, please don't splatter a portion of it in the forum as well.
We prefer to keep this forum as uncluttered as possible, hence the "Do not post logs in the forum" sign. Smile
Reply
#3
(2019-12-09, 06:44)Klojum Wrote: Welcome to the forum.

If you are already providing the URL to your pastebin'd compiling log, which is good, please don't splatter a portion of it in the forum as well.
We prefer to keep this forum as uncluttered as possible, hence the "Do not post logs in the forum" sign. Smile
OK. Sorry for that
Reply
#4
It is unclear what distro you are compiling on.
It is unclear what configure options were given to cmake.
Reply
#5
(2019-12-09, 12:42)asavah Wrote: It is unclear what distro you are compiling on.
It is unclear what configure options were given to cmake.

Distro is self compiled called sinux. Here is conf.log and build.log from scratch
Reply
#6
Your gcc might be too old-ish, should be supported for Leia tho.
It might be that old debian/ubuntu releases which have gcc 4.9.x carry some extra patches which you don't have.
Given that your OS is your own project it is very difficult for anyone to provide useful insight without knowing the details of your buildsystem ( I know the pain, I have a pet OS too).

Try adding
Code:
#include <cstddef>

around here https://github.com/xbmc/xbmc/blob/Leia/x...re.cpp#L13
Reply
#7
(2019-12-10, 15:39)asavah Wrote: Your gcc might be too old-ish, should be supported for Leia tho.
It might be that old debian/ubuntu releases which have gcc 4.9.x carry some extra patches which you don't have.
Given that your OS is your own project it is very difficult for anyone to provide useful insight without knowing the details of your buildsystem ( I know the pain, I have a pet OS too).

Try adding
Code:
#include <cstddef>

around here https://github.com/xbmc/xbmc/blob/Leia/x...re.cpp#L13  
This patch worked, thanks a lot. I looked at requirements here but it says that gcc >= 4.9 is enough
Reply

Logout Mark Read Team Forum Stats Members Help
Build error on xbmc-18.5-Leia0