Skip to content

[rbp] fixed compile on raspberrypi #2727

Merged
merged 1 commit into from May 11, 2013

6 participants

@huceke
huceke commented May 11, 2013

fixing the following compile error on raspberrypi introduced by #2691

make: Entering directory `/media/usbdisk/xbmc/xbmc-bcm/xbmc-rbp/xbmc/windowing/egl'
CPP xbmc/windowing/egl/EGLNativeTypeAmlogic.o
In file included from /media/usbdisk/xbmc/xbmc-bcm/buildroot-rbp/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/include/linux/fb.h:5:0,
from EGLNativeTypeAmlogic.cpp:31:
/media/usbdisk/xbmc/xbmc-bcm/buildroot-rbp/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/include/linux/i2c.h:126:7: error: multiple types in one declaration
/media/usbdisk/xbmc/xbmc-bcm/buildroot-rbp/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/include/linux/i2c.h:126:7: error: declaration does not declare anything [-fpermissive]
make: *** [EGLNativeTypeAmlogic.o] Fehler 1

@huceke huceke [rbp] fixed compile on raspberrypi
fixing the following compile error on raspberrypi introduced by xbmc#2691

make: Entering directory `/media/usbdisk/xbmc/xbmc-bcm/xbmc-rbp/xbmc/windowing/egl'
CPP     xbmc/windowing/egl/EGLNativeTypeAmlogic.o
In file included from /media/usbdisk/xbmc/xbmc-bcm/buildroot-rbp/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/include/linux/fb.h:5:0,
                 from EGLNativeTypeAmlogic.cpp:31:
                 /media/usbdisk/xbmc/xbmc-bcm/buildroot-rbp/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/include/linux/i2c.h:126:7: error: multiple types in one declaration
                 /media/usbdisk/xbmc/xbmc-bcm/buildroot-rbp/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/include/linux/i2c.h:126:7: error: declaration does not declare anything [-fpermissive]
                 make: *** [EGLNativeTypeAmlogic.o] Fehler 1
2da5c65
@huceke
huceke commented May 11, 2013

@davilla: Please check it

@jmarshallnz jmarshallnz commented on the diff May 11, 2013
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
#include <stdlib.h>
#include <linux/fb.h>
#include <sys/ioctl.h>
#include <EGL/egl.h>
+#include "EGLNativeTypeAmlogic.h"
+#include "guilib/gui3d.h"
+#include "utils/AMLUtils.h"
+#include "utils/StringUtils.h"
+
@jmarshallnz
Team Kodi member
jmarshallnz added a note May 11, 2013

This suggests there's missing includes in one of those headers. You can probably figure out which one by moving them one by one.

@stupid-boy
stupid-boy added a note May 11, 2013

problem is that /xbmc/linux/PlatformDefs.h defines 'byte unsigned cha' at 158, RPI's /usr/include/linux/i2c.h uses 'byte' as param name at line 26. reordering includes fixes compilation, as long as param is included (somehow ) before define.

@davilla
davilla added a note May 11, 2013

ouch, we should really stop using byte in xbmc/linux/PlatformDefs.h

@theuni
Team Kodi member
theuni added a note May 11, 2013

For sure, not the first time that's bitten us on rpi.

@popcornmix
Team Kodi member
popcornmix added a note May 11, 2013

Surely byte should be typdef'd rather than hash-define'd?
(even better replace it with uint8_t).

@davilla
davilla added a note May 11, 2013

a typedef will not save you from this :) replacing the usage of byte with uint8_t is much, much better.

union i2c_smbus_data {
__u8 byte;
__u16 word;
__u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length /
/
and one more for user-space compatibility */
};

@jmarshallnz
Team Kodi member
jmarshallnz added a note May 11, 2013

Looks like it's used by our friend rarlib as well as iso9660. The latter should be trivial to eliminate. The former should be handled by at the very least moving the #define, or better, move and switch to a typedef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@huceke huceke referenced this pull request May 11, 2013
Merged

Amlcodec #2691

@davilla davilla merged commit cba3d7d into xbmc:master May 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.