Em Fri, 19 Oct 2012 00:11:47 -0300
Mauro Carvalho Chehab <mche...@redhat.com> escreveu:

> Em Thu, 18 Oct 2012 19:25:50 +0200 (CEST)
> "Hans Verkuil" <hverk...@xs4all.nl> escreveu:
> 
> > This message is generated daily by a cron job that builds media_tree for
> > the kernels and architectures in the list below.
> > 
> > Results of the daily build of media_tree:
> > 
> > date:        Thu Oct 18 19:00:14 CEST 2012
> > git hash:    ff30d37083096acb56fb6edc0209d7ba36731a55
> > gcc version:      i686-linux-gcc (GCC) 4.7.1
> > host hardware:    x86_64
> > host os:          3.4.07-marune
> > 
> > linux-git-arm-eabi-davinci: ERRORS
> ...
> ...ERRORS
> 
> I fixed today part of the issues by correcting the linux/Makefile. Now, the 
> tarball
> generated at linuxtv.org site will have everything needed.
> 
> However:
> 
> The UABI patches deadly-broke our out-of-tree building system. One of the 
> premises
> there is that there will be just one file with the same inside the entire 
> media
> tree. It was never a problem before to do it, as it is not allowed to have two
> drivers for the same thing.
> 
> The UABI patches did something weird, though: for some files, there are now 
> _two_versions_
> of the same API file, e. g. (from linux/Makefile):
> 
> # Both Kernelspace and Userspace API
> TARDIR += include/linux/dvb/                  include/uapi/linux/dvb/
> TARFILES += include/linux/usb/video.h         include/uapi/linux/dvb/video.h
> TARFILES += include/media/v4l2-subdev.h               
> include/uapi/linux/v4l2-subdev.h
> TARFILES += include/media/v4l2-common.h               
> include/uapi/linux/v4l2-common.h
> TARFILES += include/media/v4l2-mediabus.h     
> include/uapi/linux/v4l2-mediabus.h
> 
> Basically, all headers that used to have if __KERNEL__ inside were now 
> converted
> into two files, one with the "kernel" header, and another one with the pure 
> userspace
> version.
> 
> That violates the previous rule imposed by the out-of-tree building system.
> 
> Fixing it is not a trivial task, as it requires to replace this part of
> v4l/Makefile to something more smart:
>       
> links::
>       @echo creating symbolic links...
>       @find ../linux/drivers/media -name '*.[ch]' -type f -print0 | xargs -0n 
> 255 ln -sf --target-directory=.
>       @find ../linux/sound -name '*.[ch]' -type f -print0 | xargs -0n 255 ln 
> -sf --target-directory=.
>       @find ../linux/drivers/staging -name '*.[ch]' -type f -print0 | xargs 
> -0n 255 ln -sf --target-directory=.
>       @find ../linux/drivers/misc -name '*.[ch]' -type f -print0 | xargs -0n 
> 255 ln -sf --target-directory=.
> 
> So that would, for example, detect those duplicated files and select just
> the Kernel one, and add a "-I ../linux/include", in order to allow those
> includes to get the *uapi/* one.
> 
> Another alternative would be to not create links for *.h at all.
> 
> The build system logic could also be completely replaced by one that works 
> with subdirs.

Forget about the above.... Mental note to myself: don't try to fix anything 
late night
after an stressing day ;)

The reason for the breakage is right; the diagnosis is wrong. The files at 
linux/include
aren't c/c to v4l/ dir; they're linked with -I.

Yet, compiling here are giving several errors:

/home/v4l/media_build/v4l/dvb_frontend.c: In function 
'dvb_frontend_clear_cache':
/home/v4l/media_build/v4l/dvb_frontend.c:952:17: error: 'NO_STREAM_ID_FILTER' 
undeclared (first use in this function)
/home/v4l/media_build/v4l/dvb_frontend.c:952:17: note: each undeclared 
identifier is reported only once for each function it appears in
/home/v4l/media_build/v4l/dvb_frontend.c:969:11: error: 'LNA_AUTO' undeclared 
(first use in this function)
/home/v4l/media_build/v4l/dvb_frontend.c: At top level:
/home/v4l/media_build/v4l/dvb_frontend.c:1025:3: error: 'DTV_STREAM_ID' 
undeclared here (not in a function)
/home/v4l/media_build/v4l/dvb_frontend.c:1025:2: error: array index in 
initializer not of integer type
/home/v4l/media_build/v4l/dvb_frontend.c:1025:2: error: (near initialization 
for 'dtv_cmds')
/home/v4l/media_build/v4l/dvb_frontend.c:1026:3: error: 
'DTV_DVBT2_PLP_ID_LEGACY' undeclared here (not in a function)
/home/v4l/media_build/v4l/dvb_frontend.c:1026:2: error: array index in 
initializer not of integer type
/home/v4l/media_build/v4l/dvb_frontend.c:1026:2: error: (near initialization 
for 'dtv_cmds')
/home/v4l/media_build/v4l/dvb_frontend.c:1027:3: error: 'DTV_LNA' undeclared 
here (not in a function)
/home/v4l/media_build/v4l/dvb_frontend.c:1027:2: error: array index in 
initializer not of integer type
/home/v4l/media_build/v4l/dvb_frontend.c:1027:2: error: (near initialization 
for 'dtv_cmds')
/home/v4l/media_build/v4l/dvb_frontend.c:1060:2: error: array index in 
initializer not of integer type
/home/v4l/media_build/v4l/dvb_frontend.c:1060:2: error: (near initialization 
for 'dtv_cmds')

Very likely becase gcc is using the DVB uapi under /usr/include, instead of the 
one at
the building system.


Maybe that's because of the very large number of include dirs added by our 
building
system:

  gcc -I/home/v4l/media_build/v4l -Wp,-MD,/home/v4l/media_build/v4l/.dw2102.o.d 
 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.2/include 
-I/home/v4l/media_build/v4l/../linux/include 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/arch/x86/include 
-Iarch/x86/include/generated -Iinclude  -include 
/usr/src/kernels/3.6.1-1.fc17.x86_64/include/linux/kconfig.h 
-I/home/v4l/media_build/v4l/ -I/home/v4l/media_build/v4l/../linux/include 
-D__KERNEL__ -I/home/v4l/media_build/v4l/ -Wall -Wundef -Wstrict-prototypes 
-Wno-trigraphs -fno-strict-aliasing -fno-common 
-Werror-implicit-function-declaration -Wno-format-security 
-fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone 
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector 
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare 
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx 
-Wfram!
 e-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement 
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO 
-Idrivers/media/i2c -Idrivers/media/i2c 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core/ 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/tuners/ 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/tuners 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ 
-Idrivers/media/tuners/ -Idrivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/i2c/soc_camera 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/i2c 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ -Idriv!
 ers/media/tuners -Idrivers/media/dvb-core/ -Idrivers/media/common/b2c2/ 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends 
-Idrivers/media/dvb-core -Idrivers/media/dvb-frontends 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ 
-Idrivers/media/tuners/ -Idrivers/staging/media/cxd2099/ 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ 
-Idrivers/media/tuners/ -Idrivers/staging/media/cxd2099/ 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/i2c 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/i2c 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/tuners 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends 
-Idrivers/media/dvb-core -Idrivers/media/dvb-frontends -Idrivers/media/tuners 
-Idrivers/media/i2c -Idrivers/media/tuners -Idrivers/media/dvb-core 
-Idrivers/medi!
 a/dvb-frontends -Idrivers/media/i2c -Idrivers/media/tuners -Idrivers/me!
 dia/dvb-core -Idrivers/media/dvb-frontends -Idrivers/media/i2c 
-Idrivers/media/tuners -Idrivers/media/dvb-core -Idrivers/media/dvb-frontends 
-Idrivers/media/dvb-core -Idrivers/media/dvb-frontends -Idrivers/media/i2c 
-Idrivers/media/tuners -I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/i2c 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/tuners 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/i2c 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/tuners 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-core/ 
-Idrivers/media/dvb-frontends 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends/ 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/driver!
 s/media/tuners -I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/pci/ttpci 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-core 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/dvb-frontends 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/tuners 
-Idrivers/media/dvb-core -Idrivers/media/common/siano -Idrivers/media/dvb-core/ 
-Idrivers/media/common/b2c2/ 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/usb/gspca 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/usb/gspca 
-I/usr/src/kernels/3.6.1-1.fc17.x86_64/drivers/media/usb/gspca 
-Idrivers/media/tuners -Idrivers/media/dvb-core -Idrivers/media/dvb-frontends 
-Idrivers/media/i2c -Idrivers/media/i2c -Idrivers/media/tuners 
-Idrivers/media/dvb-core -Idrivers/media/dvb-frontends -Idrivers/media/i2c 
-Idrivers/media/tuners -Idrivers/media/dvb-core -Idrivers/media/dvb-frontends 
-Idrivers/media/i2c -Idrivers/media/tuners -Idrivers/media/i2c 
-Idrivers/media/i2c -Idrivers/media/tuners -Idrivers/media/dvb-cor!
 e -Idrivers/media/dvb-frontends -Idrivers/media/usb/dvb-usb -Idrivers/m!
 edia/i2c -Idrivers/media/tuners -Idrivers/media/dvb-core 
-Idrivers/media/dvb-frontends -Idrivers/media/i2c -Idrivers/media/tuners 
-Idrivers/media/dvb-core -Idrivers/media/dvb-frontends -Idrivers/media/dvb-core 
-Idrivers/media/common/siano -Idrivers/media/dvb-core -Isound 
-Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/ 
-Idrivers/media/tuners/ -Idrivers/media/dvb-frontends -Idrivers/media/dvb-core 
-g -include /home/v4l/media_build/v4l/compat.h  -DMODULE  -D"KBUILD_STR(s)=#s" 
-D"KBUILD_BASENAME=KBUILD_STR(dw2102)"  
-D"KBUILD_MODNAME=KBUILD_STR(dvb_usb_dw2102)" -c -o 
/home/v4l/media_build/v4l/dw2102.o /home/v4l/media_build/v4l/dw2102.c

Maybe all of these can be fixed at: v4l/scripts/make_makefile.pl, making it to 
handle
the tags "ccflags-y" that are added at Makefile.media. There are, currently, 
126 lines
there, where only 29 unique lines:

$ grep ccflags v4l/Makefile.media |sort|uniq
ccflags-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD:m=y) += 
-Idrivers/media/usb/dvb-usb
ccflags-$(CONFIG_VIDEO_OMAP3_DEBUG) += -DDEBUG
#ccflags-$(CONFIG_VIDEO_SAA7134:m=y) += -Idrivers/media/video/saa7134 
-DSAA7134_MPEG_GO7007=3
ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
ccflags-y += -Idrivers/media/common/b2c2/
ccflags-y += -Idrivers/media/common/siano
ccflags-y += -Idrivers/media/dvb-core
ccflags-y += -Idrivers/media/dvb-core/
ccflags-y += -Idrivers/media/dvb-core -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/dvb-core/ -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/i2c
ccflags-y += -Idrivers/media/tuners
ccflags-y += -Idrivers/media/tuners/
ccflags-y += -Idrivers/media/usb/dvb-usb
ccflags-y += -Idrivers/staging/media/cxd2099/
ccflags-y += -Isound
ccflags-y += -I$(srctree)/drivers/media/dvb-core
ccflags-y += -I$(srctree)/drivers/media/dvb-core/
ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
ccflags-y += -I$(srctree)/drivers/media/dvb-frontends/
ccflags-y += -I$(srctree)/drivers/media/i2c
ccflags-y += -I$(srctree)/drivers/media/i2c/soc_camera
ccflags-y += -I$(srctree)/drivers/media/pci/ttpci
ccflags-y += -I$(srctree)/drivers/media/tuners
ccflags-y += -I$(srctree)/drivers/media/tuners/
ccflags-y += -I$(srctree)/drivers/media/usb/gspca

(even so, there are redundant things there).

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to