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

Arnout Vandecappelle arnout at mind.be
Sat Jul 2 20:15:59 UTC 2016


On 02-07-16 19:58, daggs wrote:
> 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

 That is just wrong, the cpp file does #include <amcodec/codec.h> so there is no
need for this additional -I...

 So IMHO the fix is to remove those INCLUDES lines.

 Regards,
 Arnout

> 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.
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF



More information about the buildroot mailing list