-Werror=incompatible-pointer-types

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

-Werror=incompatible-pointer-types

Postby rolf » Jun 3rd, '17, 17:25

I've an ATSC dual channel tv tuner that is accessed on the LAN, SiliconDust HDHomeRun HDTC-2US

https://youtu.be/JNwJYqjhIy8

I have configured various distros on various machines to use kaffeine with this tuner for scheduled recordings of local OTA programs by following, generally, this: http://www.pclinuxos.com/forum/index.php?topic=94287.0

Part of the process is building kernel modules with the dvb_hdhomerun package, the latest, afaict, available here: https://github.com/h0tw1r3/dvbhdhomerun

Newer kernels won't work with this. The latest I have made to work is 4.6.7-nrj-desktop-1rosa-x86_64 on ROSA. 4.9.30-desktop-1.mga6 on my installation of MGA6 RC fails with the same message, below, as all the failures. I installed 4.4.68-tmb-desktop-1.mga5 along with the kernel-devel package and it works. That makes me believe it's something in the kernel, as none of the other software is changed.

I'll just post the konsole output from 'make' and the Makefile. Thanks.

Code: Select all
[rolf@z170i kernel]$ make
Downloading kernel header dependencies...
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
make -C /lib/modules/`uname -r`/build M=/home/rolf/git/dvbhdhomerun/kernel modules
make[1]: Entering directory '/usr/src/kernel-4.9.30-desktop-1.mga6'
  CC [M]  /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_init.o
  CC [M]  /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_data.o
  CC [M]  /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_control.o
In file included from /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_control.c:30:0:
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_control.c: In function ‘dvb_hdhomerun_control_init’:
./include/linux/kfifo.h:333:1: warning: ignoring return value of ‘__kfifo_int_must_check_helper’, declared with attribute warn_unused_result [-Wunused-result]
 __kfifo_int_must_check_helper( \
 ^
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_control.c:272:2: note: in expansion of macro ‘kfifo_alloc’
  kfifo_alloc(&control_fifo_user, control_bufsize, GFP_KERNEL);
  ^
./include/linux/kfifo.h:333:1: warning: ignoring return value of ‘__kfifo_int_must_check_helper’, declared with attribute warn_unused_result [-Wunused-result]
 __kfifo_int_must_check_helper( \
 ^
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_control.c:282:2: note: in expansion of macro ‘kfifo_alloc’
  kfifo_alloc(&control_fifo_kernel, control_bufsize, GFP_KERNEL);
  ^
  LD [M]  /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun.o
  CC [M]  /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_core.o
  CC [M]  /home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.o
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.c:283:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
         .get_frontend = dvb_hdhomerun_fe_get_frontend,
                         ^
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.c:283:25: note: (near initialization for ‘dvb_hdhomerun_fe_ofdm_ops.get_frontend’)
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.c:345:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .get_frontend = dvb_hdhomerun_fe_get_frontend,
                  ^
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.c:345:18: note: (near initialization for ‘dvb_hdhomerun_fe_qam_ops.get_frontend’)
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.c:408:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .get_frontend = dvb_hdhomerun_fe_get_frontend,
                  ^
/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.c:408:18: note: (near initialization for ‘dvb_hdhomerun_fe_atsc_ops.get_frontend’)
cc1: some warnings being treated as errors
scripts/Makefile.build:299: recipe for target '/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.o' failed
make[2]: *** [/home/rolf/git/dvbhdhomerun/kernel/dvb_hdhomerun_fe.o] Error 1
Makefile:1483: recipe for target '_module_/home/rolf/git/dvbhdhomerun/kernel' failed
make[1]: *** [_module_/home/rolf/git/dvbhdhomerun/kernel] Error 2
make[1]: Leaving directory '/usr/src/kernel-4.9.30-desktop-1.mga6'
Makefile:27: recipe for target 'dvb_hdhomerun' failed
make: *** [dvb_hdhomerun] Error 2
[rolf@z170i kernel]$


Code: Select all
[rolf@p8z68 dvbhdhomerun]$ cat Makefile
KERNELRELEASE   := `uname -r`
KVERCLEAN       := $(shell echo $(KERNELRELEASE) | cut -f1 -d-)
KVERMAJ         := $(shell echo $(KVERCLEAN) | cut -f1 -d.)
KVERMIN         := $(shell echo $(KVERCLEAN) | cut -f2 -d.)
PWD             := $(shell pwd)
HEADERSUBFOLDER  = $(shell [ $(KVERMAJ) -eq 2 -a $(KVERMIN) -lt 7 ] && echo /dvb || echo )

dvb_hdhomerun-objs := dvb_hdhomerun_init.o dvb_hdhomerun_data.o dvb_hdhomerun_control.o
obj-m += dvb_hdhomerun.o
obj-m += dvb_hdhomerun_core.o
obj-m += dvb_hdhomerun_fe.o

ccflags-y       += -I$(src)/headers/$(KVERMAJ).$(KVERMIN) -D__DVB_CORE__

all: headers dvb_hdhomerun

headers: headers/$(KVERMAJ).$(KVERMIN)
        @echo Downloading kernel header dependencies...
        @$(foreach var,$(shell grep -h ^\\\#include\ \" $(PWD)/headers/$(KVERMAJ).$(KVERMIN)/*.[ch] 2>/dev/null | sort -u | sed 's/\#include "\(.*\)"/\1/'),curl -# -L -o $(PWD)/headers/$(KVERMAJ).$(KVERMIN)/$(var) https://github.com/torvalds/linux/raw/v$(KVERMAJ).$(KVERMIN)/drivers/media$(HEADERSUBFOLDER)/dvb-core/$(var);)

headers/$(KVERMAJ).$(KVERMIN):
        @echo Downloading kernel headers...
        @mkdir -p $(PWD)/headers/$(KVERMAJ).$(KVERMIN)
        @$(foreach var,$(shell grep -h ^\\\#include\ \" *.[ch] 2>/dev/null | grep -v hdhomerun | sort -u | sed 's/\#include "\(.*\)"/\1/'),curl -# -L -o $(PWD)/headers/$(KVERMAJ).$(KVERMIN)/$(var) https://github.com/torvalds/linux/raw/v$(KVERMAJ).$(KVERMIN)/drivers/media$(HEADERSUBFOLDER)/dvb-core/$(var);)

dvb_hdhomerun:
        $(MAKE) -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) modules

install: dvb_hdhomerun
        $(MAKE) -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) modules_install

clean:
        $(MAKE) -C /lib/modules/$(KERNELRELEASE)/build M=$(PWD) clean
[rolf@p8z68 dvbhdhomerun]$
rolf
 
Posts: 131
Joined: Mar 25th, '11, 02:58

Re: -Werror=incompatible-pointer-types

Postby doktor5000 » Jun 3rd, '17, 23:27

That is due to warning being treated as errors by default.
For details on the warning you get, see https://stackoverflow.com/questions/208 ... hats-wrong or https://stackoverflow.com/questions/319 ... pe-warning

You would need to disable warnings being treated as errors, e.g. by passing -Wno-error=incompatible-pointer-types
See https://stackoverflow.com/questions/115 ... -as-errors

But in the end you should report this upstream so this gets fixed.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: -Werror=incompatible-pointer-types

Postby rolf » Jun 3rd, '17, 23:36

Ok. Let me see what I can do and I'll mark as solved if I succeed. Thank you.
rolf
 
Posts: 131
Joined: Mar 25th, '11, 02:58

Re: -Werror=incompatible-pointer-types

Postby rolf » Jun 11th, '17, 21:07

-Wno-error=incompatible-pointer-types did not seem to get passed. If I use -wno-error=incompatible-pointer-types, it stll fails but the ouput is different, more verbose. I included that output in my report to the developer but no response in over a week. It looks probably abandoned: https://github.com/h0tw1r3/dvbhdhomerun/issues/8
rolf
 
Posts: 131
Joined: Mar 25th, '11, 02:58


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest