pierre-quelin / dvbhdhomerun

hdhomerun dvb driver for linux with working debian packaging!
GNU General Public License v2.0
1 stars 1 forks source link

Can not be installed on Ubuntu Bionic #1

Open pierre-quelin opened 5 years ago

pierre-quelin commented 5 years ago

Hello Pierre,

I hope that you don't mind that I am contacting you by using this email I found on launchpad. I would have filed a bug/question on github, if that option was available.

Here is my problem:

I downloaded your fork of dvbhdhomerun from your github https://github.com/pierre-quelin/dvbhdhomerun/blob/master/etc/dvbhdhomerun and was able to build the debian packages on my ubuntu bionic system running currently the following kernel:

$ uname -a 
Linux UbuntuDesktop 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I am able to install the dvbhdhomerun-source and dvbhdhomerun-utils packages; but I get an error when trying to install the dvbhdhomerun-dkms package:

$ sudo gdebi
'/media/Data/Downloads/dvbhdhomerun/dvbhdhomerun-dkms_0.0.16+nmu4ubuntu1~bionic_all.deb'
Reading package lists... Done Building dependency tree        
Reading state information... Done
Reading state information... Done

Source for the dvbhdhomerun kernel driver.
 This package provides the source code for the dvbhdhomerun kernel
modules, to be build with dkms. The dvbhdhomerun-utils package is
required in order to make use of these modules. Linux headers do no
provide the necessary includes to compile so curl is used to download
them at build time. Do you want to install the software package? [y/N]:y
(Reading database ... 393626 files and directories currently installed.)
Preparing to
unpack .../dvbhdhomerun-dkms_0.0.16+nmu4ubuntu1~bionic_all.deb ...

------------------------------
Deleting module version: 0.0.16+nmu4ubuntu1~bionic
completely from the DKMS tree.
------------------------------
Done.
Stopping userhdhomerun and unloading old kernel modules
userhdhomerun: no process found
modprobe: FATAL: Module dvb_hdhomerun not found.
Unpacking dvbhdhomerun-dkms (0.0.16+nmu4ubuntu1~bionic) over
(0.0.16+nmu4ubuntu1~bionic) ... Setting up dvbhdhomerun-dkms
(0.0.16+nmu4ubuntu1~bionic) ... Loading new
dvbhdhomerun-0.0.16+nmu4ubuntu1~bionic DKMS files... Building for
4.15.0-48-generic Building initial module for 4.15.0-48-generic
Error! Bad return status for module build on kernel: 4.15.0-48-generic
(x86_64)
Consult /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/make.log
for more information.

The make.log file, that you can find attached to this email, says that it does not find the dvbdev.h file; but I can see the file under: /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/headers/4.15/dvbdev.h

Unfortunately, I don't know how to tell the compiler the location of the file. Could you please tell me how I can fix it; or even better, could you add a commit to your github allowing the kernel module to also compile on Ubuntu?

Many thanks in advance for any help.

Ludi

file : make.log

DKMS make.log for dvbhdhomerun-0.0.16+nmu4ubuntu1~bionic for kernel 4.15.0-48-generic (x86_64)
lundi 15 avril 2019, 20:29:21 (UTC+0200)
make -C /lib/modules/4.15.0-48-generic/build M=/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build modules
Downloading kernel headers...
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-48-generic'
#=#=#                                                                         
##O#- #                                                                       
##O=#  #                                                                      
#=#=-#  #                                                                     

######################################################################## 100,0%  CC [M]  /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_init.o
  CC [M]  /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_data.o
  CC [M]  /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_control.o
  CC [M]  /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_core.o
  CC [M]  /var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_fe.o
/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_data.c:22:10: fatal error: dvbdev.h: No such file or directory
 #include <dvbdev.h>
          ^~~~~~~~~~
compilation terminated.
scripts/Makefile.build:330: recipe for target '/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_data.o' failed
make[2]: *** [/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_data.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_control.c:22:10: fatal error: dvbdev.h: No such file or directory
 #include <dvbdev.h>
          ^~~~~~~~~~
compilation terminated.
scripts/Makefile.build:330: recipe for target '/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_control.o' failed
make[2]: *** [/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_control.o] Error 1
-#O#- #   #                                                                   
/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_fe.c:30:10: fatal error: dvb_demux.h: No such file or directory
 #include "dvb_demux.h"
          ^~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:337: recipe for target '/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_fe.o' failed
make[2]: *** [/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_fe.o] Error 1
/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_init.c:29:10: fatal error: dvb_demux.h: No such file or directory
 #include "dvb_demux.h"
          ^~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:330: recipe for target '/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_init.o' failed
make[2]: *** [/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build/dvb_hdhomerun_init.o] Error 1
Makefile:1552: recipe for target '_module_/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build' failed
make[1]: *** [_module_/var/lib/dkms/dvbhdhomerun/0.0.16+nmu4ubuntu1~bionic/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-48-generic'
Makefile:27: recipe for target 'dvb_hdhomerun' failed
make: *** [dvb_hdhomerun] Error 2
make: *** Waiting for unfinished jobs....
 -#O#-  #   #                                                                 

########################                                                  34,5%
######################################################################## 100,0%
#=#=#                                                                         
##O#- #                                                                       
##O=#  #                                                                      

######################################################################## 100,0%#=#=-#  #                                                                     
 #=#=-#   #                                                                   

############                                                              17,9%
######################################################################## 100,0%
#=#=#                                                                         
##O#- #                                                                       
##O=#  #                                                                      
#=#=-#  #                                                                     

######################################################################## 100,0%-#O#- #   #                                                                   
 -#O#-  #   #                                                                 

###########                                                               15,4%
######################################################################## 100,0%
#=#=#                                                                         
##O#- #                                                                       
##O=#  #                                                                      
#=#=-#  #                                                                     

######################################################################## 100,0%-#O#- #   #                                                                   

####                                                                       6,5%
######################################################################## 100,0%
#=#=#                                                                         
##O#- #                                                                       
##O=#  #                                                                      

######################################################################## 100,0%#=#=-#  #                                                                     

#########################################################                 80,4%
######################################################################## 100,0%
pierre-quelin commented 5 years ago

A temporary solution.

1) Edit the kernel source files and change the include files like this in all files

#include <media/dvbdev.h>

2) Next install the kernel source package sudo apt-get install linux-source

3) extract the missing includes tar -xvjf /usr/src/linux-source-4.15.0.tar.bz2 --wildcards 'linux-source-4.15.0/drivers/media/dvb-core/*.h'

4) copy them in the kernel include path sudo mv linux-source-4.15.0/drivers/media/dvb-core/* /usr/src/linux-headers-4.15.0-48-generic/include/media/

5) Change the kernel Makefile all: headers dvb_hdhomerun become all: dvb_hdhomerun

6) Build the packages dpkg-buildpackage -b

7) install

sudo dpkg -i dvbhdhomerun-source_0.0.16+nmu4_all.deb
sudo dpkg -i dvbhdhomerun-dkms_0.0.16+nmu4_all.deb
sudo dpkg -i dvbhdhomerun-utils_0.0.16+nmu4_amd64.deb

8) Configure nano /etc/dvbhdhomerun

carlotodeschini commented 4 years ago

Hi, in order to build the modules in Ubuntu 18.04.03 server you have to fix also some other *.c file changing includes, for example, from:

#include "dvb_demux.h"
#include "dvb_frontend.h"
#include "dvb_net.h"
#include "dvbdev.h"
#include "dmxdev.h"

to:

#include <media/dvb_demux.h>
#include <media/dvb_frontend.h>
#include <media/dvb_net.h>
#include <media/dvbdev.h>
#include <media/dmxdev.h>  
pierre-quelin commented 1 year ago

Hello, For information I'm trying to build for recent kernel (Debian 11) and I think Ubuntu will work well too. I add CI to the branch and Artifact can now be downloaded from github. All comments are welcome ;-) Thank you