bas-t / descrambler

Standalone version of FFdecsawrapper
GNU General Public License v3.0
7 stars 11 forks source link

Build fails due to removed DMX_KERNEL_CLIENT declaration (SOLVED, Gentoo Linux) #17

Closed Strunzdesign closed 4 years ago

Strunzdesign commented 4 years ago

Related to this removal of the DMX_KERNEL_CLIENT declaration

https://patchwork.kernel.org/patch/9934253/

the build process fails here on my box. The build output:

powerstation descrambler # make clean
powerstation descrambler # make      
g++ -Wall -D__user=  -o objs/forward.o -c  -DRELEASE_VERSION=\"v1.0-7-g45f84c0\" -D__KERNEL_STRICT_NAMES -Isrc src/forward.c
g++ -Wall -D__user=  -o objs/process_req.o -c  -DRELEASE_VERSION=\"v1.0-7-g45f84c0\" -D__KERNEL_STRICT_NAMES -Isrc src/process_req.c
g++ -Wall -D__user=  -o objs/msg_passing.o -c  -DRELEASE_VERSION=\"v1.0-7-g45f84c0\" -D__KERNEL_STRICT_NAMES -Isrc src/msg_passing.c
g++ -Wall -D__user=  -o objs/plugin_getsid.o -c  -DRELEASE_VERSION=\"v1.0-7-g45f84c0\" -D__KERNEL_STRICT_NAMES -Isrc src/plugin_getsid.c
g++ -Wall -D__user=  -o objs/plugin_ringbuf.o -c  -DRELEASE_VERSION=\"v1.0-7-g45f84c0\" -D__KERNEL_STRICT_NAMES -Isrc src/plugin_ringbuf.c
g++ -Wall -D__user=  -o objs/plugin_showioctl.o -c  -DRELEASE_VERSION=\"v1.0-7-g45f84c0\" -D__KERNEL_STRICT_NAMES -Isrc src/plugin_showioctl.c
src/plugin_showioctl.c: In function ‘void demux_ioctl(parser_cmds*, poll_ll*, cmdret_t*, int*, long unsigned int, unsigned char*)’:
src/plugin_showioctl.c:252:34: error: ‘DMX_KERNEL_CLIENT’ was not declared in this scope
                    (dmx->flags & DMX_KERNEL_CLIENT ? " KERNEL_CLIENT" : ""));
                                  ^~~~~~~~~~~~~~~~~
src/plugin_showioctl.c:303:34: error: ‘DMX_KERNEL_CLIENT’ was not declared in this scope
                    (dmx->flags & DMX_KERNEL_CLIENT ? " KERNEL_CLIENT" : ""));
                                  ^~~~~~~~~~~~~~~~~
src/plugin_showioctl.c:327:12: error: ‘DMX_GET_CAPS’ was not declared in this scope
       case DMX_GET_CAPS:
            ^~~~~~~~~~~~
src/plugin_showioctl.c:327:12: note: suggested alternative: ‘DMX_OUT_TAP’
       case DMX_GET_CAPS:
            ^~~~~~~~~~~~
            DMX_OUT_TAP
src/plugin_showioctl.c:330:70: error: invalid use of incomplete type ‘struct demux_ioctl(parser_cmds*, poll_ll*, cmdret_t*, int*, long unsigned int, unsigned char*)::dmx_caps’
           tmprintf("","DMX_GET_CAPS(%d): %u num:%d\n", fdptr->fd, dmx->caps,
                                                                      ^~
src/plugin_showioctl.c:329:18: note: forward declaration of ‘struct demux_ioctl(parser_cmds*, poll_ll*, cmdret_t*, int*, long unsigned int, unsigned char*)::dmx_caps’
           struct dmx_caps *dmx = (struct dmx_caps*)data;
                  ^~~~~~~~
src/plugin_showioctl.c:331:21: error: invalid use of incomplete type ‘struct demux_ioctl(parser_cmds*, poll_ll*, cmdret_t*, int*, long unsigned int, unsigned char*)::dmx_caps’
                  dmx->num_decoders);
                     ^~
src/plugin_showioctl.c:329:18: note: forward declaration of ‘struct demux_ioctl(parser_cmds*, poll_ll*, cmdret_t*, int*, long unsigned int, unsigned char*)::dmx_caps’
           struct dmx_caps *dmx = (struct dmx_caps*)data;
                  ^~~~~~~~
src/plugin_showioctl.c:334:12: error: ‘DMX_SET_SOURCE’ was not declared in this scope
       case DMX_SET_SOURCE:
            ^~~~~~~~~~~~~~
src/plugin_showioctl.c:334:12: note: suggested alternative: ‘DMX_GET_STC’
       case DMX_SET_SOURCE:
            ^~~~~~~~~~~~~~
            DMX_GET_STC
make: *** [Makefile:59: objs/plugin_showioctl.o] Error 1
powerstation descrambler # 

Regards, Florian

Strunzdesign commented 4 years ago

I was able to make it compile again, but not in a shape for a pull request. FYI:

Furthermore, I had to add this to the bottom of "/usr/include/linux/dvb/ca.h":

typedef struct ca_pid {
  unsigned int pid;
  int index;          /* -1 == disable */
} ca_pid_t;

#define CA_SET_PID 42424242

This should be added directly inside the repo, but I have no clue yet where to place this best. But this should be a straight forward task.

The system is working again, with a Linux kernel 5.3.8 :)

Regards, Florian

bas-t commented 4 years ago

It is already in the repo. What OS are you running?

Strunzdesign commented 4 years ago

Hi,

I'm running Gentoo Linux. Can I help you with this in any way?

Strunzdesign commented 4 years ago

I just noticed the "dmx.patch" file in your repo... sorry, my fault. I'm going to apply this now :)

bas-t commented 4 years ago

Sure, I just pushed a fix. Thanks for noticing the flaw.

Strunzdesign commented 4 years ago

Ok, great, thank you very much! Your last change brought to light which steps are required to make it work in the way it was intended to, so I adapted it for me in "the Gentoo way":

Afterwards, I installed linux-headers again, got the patched files in /usr/include/linux, and was able to compile and install ffdecsawrapper using a vanilla clone of your repo! :-)

However, this is the Gentoo way of handling patches to system packages, and the dmx.patch file had to be changed in a way that it is incompatible with the use case provided by your configure script. I have no idea why the source tarball of linux-headers has the relevant files in a subfolder called "uapi", but eventually, the files appear in the system at the expected location.

Thank you very much for your efforts, with kind regards, Florian

P.S. For me, this issue is fixed now, thanks!

bas-t commented 4 years ago

Way to go! Closing.