[Buildroot] [PATCH 4/4 v3] kodi: allow enablement of libamcodec as codec if selected

daggs daggs at gmx.com
Sat Jul 2 17:58:21 UTC 2016


Greetings Bernd,
>
> Greetings,
> > 
> > > +else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
> > > +KODI_DEPENDENCIES += libamcodec
> > > +KODI_CONF_OPTS += --enable-codec=amcodec
> > 
> > Hi,
> > 
> > using this defconfig
> > 
> > BR2_arm=y
> > BR2_cortex_a15=y
> > BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
> > BR2_TOOLCHAIN_BUILDROOT_CXX=y
> > BR2_PACKAGE_KODI=y
> > BR2_PACKAGE_MESA3D=y
> > BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
> > BR2_PACKAGE_MESA3D_OPENGL_EGL=y
> > BR2_PACKAGE_MESA3D_OPENGL_ES=y
> > BR2_PACKAGE_XORG7=y
> > BR2_PACKAGE_LIBAMCODEC=y
> > 
> > $ grep -i unsafe .config
> > BR2_COMPILER_PARANOID_UNSAFE_PATH=y
> > 
> > compiling Kodi fails:
> > 
> > CPP     xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.o
> > arm-buildroot-linux-uclibcgnueabihf-g++: ERROR: unsafe header/library path used in cross-compilation: '/usr/include/amcodec'
> > 
> > due to not compile-safe code used here:
> > https://github.com/xbmc/xbmc/blob/Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in#L29
> > 
> > Regards, Bernd
> > 
> will take a look on this, thanks.
> 
> Dagg.

I've looked into this issue, the root of the issue can be found at output/build/kodi-16.1-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in
where we see the following:
ifeq (@USE_LIBAMCODEC@,1)
SRCS += AMLCodec.cpp
SRCS += DVDVideoCodecAmlogic.cpp
INCLUDES += -I$(prefix)/include/amcodec
INCLUDES += -I$(prefix)/include/amplayer
endif

as prefix is set to /usr (see output/build/kodi-16.1-Jarvis/config.log), I'm not sure fixing prefix is the answer.
in general, replacing the include lines with the follows:
INCLUDES += -I$(shell $(CC) --print-sysroot)/$(prefix)/include/amcodec
INCLUDES += -I$(shell $(CC) --print-sysroot)/$(prefix)/include/amplayer

but I'm not this is the right way to fix this, thoughts?

Dagg.


More information about the buildroot mailing list