source compiling problem!

By attempting to compile the dvb driver for my card I get:

/usr/src/linux- error: static declaration of ‘usb_buffer_alloc’ follows non-static declaration
/usr/src/linux- note: previous declaration of ‘usb_buffer_alloc’ was here
/usr/src/linux- error: static declaration of ‘usb_buffer_free’ follows non-static declaration
/usr/src/linux- note: previous declaration of ‘usb_buffer_free’ was here
make[5]: *** [/home/msi_user/Install/s2-liplianin/v4l/au0828-core.o] Error 1
make[4]: *** [module/home/msi_user/Install/s2-liplianin/v4l] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2

any idea?

I have a prebuilt au0828 KMP here;
What is your PCI ID of the device? My one is for ID 0x05e1,0x0400.

Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (i586) Kernel
up 2:22, 2 users, load average: 0.24, 0.24, 0.17
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

On 12/11/2010 08:44 PM, malcolmlewis wrote:

Did you modify the source? In the region of the errors (lines 1378 and
following), I have

void *usb_alloc_coherent(struct usb_device *dev, size_t size,
gfp_t mem_flags, dma_addr_t *dma);
void usb_free_coherent(struct usb_device *dev, size_t size,
void *addr, dma_addr_t dma);

/* Compatible macros while we switch over */
static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size,
gfp_t mem_flags, dma_addr_t *dma)
return usb_alloc_coherent(dev, size, mem_flags, dma);
static inline void usb_buffer_free(struct usb_device *dev, size_t size,
void *addr, dma_addr_t dma)
return usb_free_coherent(dev, size, addr, dma);

Note that line 1378 defines usb_alloc_coherent() and 1384 defines
usb_buffer_alloc(). The second does not redefine the first. The same argument
applies to the second set of routines.

on a first look it looks like the source was wrote for gcc 4.3 or 4.1 and you are trying to build it with gcc 4.5 ( default in 11.3 )

you might want to install gcc 4.3 or 4.1 and build it with that
or hack the source to build with 4.5

something in “/home/msi_user/Install/s2-liplianin” is defining what is in the kernel usb header

First of all thanks you all!

  • malcomlewis, sorry for the involuntary misdirection, I am attempting to compile a “PCTV 452e”. I take care for many machines by friends, so I have here many cards but the problem only with this great and ominous pinnacle.
  • Iwfinger, I didn’t touch the code. In addition I installed a distribution-vanilla kernel with equal version number and getting exactly the same error again. You put me in the mood of starting writing code again, however my C knowledge is just theoretic and never I wrote for linux: basically it would mean that my little windows API experience is “snow of yesterday” and my stomach is becoming delicate. :slight_smile: Tomorrow I’ll check the lines in question, at this point is necessary.
  • JohnVV, that could be an explanation, but I installed stuff just from orthodox repos except by multimedia, due to my sound card. Nvidia and VM compile properly (however Nvidia breaks by the vanilla kernel!!!). Any Idea?

OK, now I know what is going on.
By the way, as beginner I misinterpreted quite often the compiler remarks. True is that the 2 macros invoked from the code don’t exist in the source.
I am attempting to compile a Liplianin three from Mercurial. Liplianin is specialized since 10 years in supporting “officially unsupported = almost all” DVB cards with Linux drivers. Later the modules come with the kernel.
There is no official information about, but the Liplianin’s code is kernel dependent. Hi made many many unlisted repositories for different kernel versions. Until now, I didn’t find a repo for 2.6.34, possibly because the major customers are Ubuntu and Archlinux. Hi seams to have a strong sense of humor so, if I explain him that I use “OpenCinderella 11.3” and I need the code for 2.6.34 hi will answer me hi will take a look in the basement.
As next try I will install the “AHead” kernel, look what happens and report here.


  • from the repository
    install the kernel with all associated packages.
  • install mercurial
  • in some directory open the terminal and type:
    hg clone hxxp://
    cd s2-liplianin
  • login as root with su and password.
  • type
    make install
  • reboot.

Thanks for your help, you guys because you putted me on the right way!
And even more thanks to the great Igor!

Here is another solution to the problem with usb_buffer_alloc while compiling s2-liplianin out of the hg repository using openSUSE kernel and it avoids changing the kernel to version 2.6.36:

  • Download the repo:
    hg clone hxxp://
    cd s2-liplianin/v4l

  • open compat.h with your favorite editor and look for following lines (line 17):

#define usb_buffer_alloc(dev, size, mem_flags, dma) …

  • change the kernel version to 2.6.34 which reflects the current openSUSE kernel:

#define usb_buffer_alloc(dev, size, mem_flags, dma) …

  • safe the file, go back to main dir and make should work without errors:
    cd …
  • login as root with su and password and type:
    make install
  • reboot.

Hi Triga, thanks for this lesson! I would never found the courage for altering the header! :slight_smile: