Results 1 to 8 of 8

Thread: Module-compilation problems

  1. #1

    Default Module-compilation problems

    Hello all,

    I've installed openSUSE 11.1 (Kernel 2.6.27.21-0.1-pae). The bonding-module has the version 3.3.0. In the new 2.6.29-kernel, I found a newer version of the bonding-module.

    So, I have downloaded the kernel-source (2.6.29) and tried to compile only the bonding-module/driver.

    I have created the following Makefile:

    Code:
    opensuse:/tmp/linux-2.6.29/drivers/net/bonding # cat Makefile
    #
    # Makefile for the Ethernet Bonding driver
    #
    obj-m := bonding.o
    bonding-objs := bond_main.o bond_3ad.o bond_alb.o bond_sysfs.o
    
    all:
            make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
    
    clean:
            make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
    When I start a "make", I always receive errors:
    Code:
    opensuse:/tmp/linux-2.6.29/drivers/net/bonding # make
    make -C /lib/modules/2.6.27.21-0.1-pae/build M=/tmp/linux-2.6.29/drivers/net/bonding modules
    make[1]: Entering directory `/usr/src/linux-2.6.27.21-0.1-obj/i386/pae'
    make -C /usr/src/linux-2.6.27.21-0.1 O=/usr/src/linux-2.6.27.21-0.1-obj/i386/pae/. modules
      CC [M]  /tmp/linux-2.6.29/drivers/net/bonding/bond_main.o
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_vlan_rx_registerā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:456: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:459: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:460: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_vlan_rx_add_vidā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:478: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:481: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:482: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_vlan_rx_kill_vidā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:508: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:511: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:516: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_add_vlans_on_slaveā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:532: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:540: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:541: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:544: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:548: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_del_vlans_from_slaveā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:556: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:566: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:574: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:580: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:581: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_check_dev_linkā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:690: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:698: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_compute_featuresā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1350: error: āNETIF_F_ONE_FOR_ALLā undeclared (first use in this function)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1350: error: (Each undeclared identifier is reported only once
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1350: error: for each function it appears in.)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1353: error: implicit declaration of function ānetdev_increment_featuresā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1362: error: implicit declaration of function ānetdev_fix_featuresā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_enslaveā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1388: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1397: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:1479: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_get_statsā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:3906: error: implicit declaration of function ādev_get_statsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:3906: warning: initialization makes pointer from integer without a cast
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_neigh_setupā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4129: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4130: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4131: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_change_mtuā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4165: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_set_mac_addressā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4252: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4255: error: dereferencing pointer to incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: At top level:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4585: error: variable ābond_netdev_opsā has initializer but incomplete type
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4586: error: unknown field āndo_openā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4586: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4586: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4587: error: unknown field āndo_stopā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4587: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4587: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4588: error: unknown field āndo_start_xmitā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4588: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4588: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4589: error: unknown field āndo_get_statsā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4589: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4589: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4590: error: unknown field āndo_do_ioctlā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4590: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4590: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4591: error: unknown field āndo_set_multicast_listā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4591: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4591: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4592: error: unknown field āndo_change_mtuā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4592: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4592: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4593: error: unknown field āndo_set_mac_addressā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4593: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4593: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4594: error: unknown field āndo_neigh_setupā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4594: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4594: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4595: error: unknown field āndo_vlan_rx_registerā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4595: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4595: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4596: error: unknown field āndo_vlan_rx_add_vidā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4596: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4596: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4597: error: unknown field āndo_vlan_rx_kill_vidā specified in initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4597: warning: excess elements in struct initializer
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4597: warning: (near initialization for ābond_netdev_opsā)
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c: In function ābond_initā:
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4632: error: āstruct net_deviceā has no member named ānetdev_opsā
    /tmp/linux-2.6.29/drivers/net/bonding/bond_main.c:4643: error: āIFF_MASTER_ARPMONā undeclared (first use in this function)
    make[4]: *** [/tmp/linux-2.6.29/drivers/net/bonding/bond_main.o] Error 1
    make[3]: *** [_module_/tmp/linux-2.6.29/drivers/net/bonding] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.6.27.21-0.1-obj/i386/pae'
    make: *** [all] Error 2
    What's the reason, that I always receive this errors? Is it not possible, to compile only one module/driver?

    Thanks a lot.
    Tom

  2. #2
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: Module-compilation problems

    netdevice.h file has changed in the newer kernel. So, you can not compile the new kernel module with old kernel headers.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  3. #3

    Default Re: Module-compilation problems

    Is there a way to include this kernel-header file, so that I can compile the new bonding-driver?

    Thanks a lot.
    Tom

  4. #4

    Default Re: Module-compilation problems

    Just tried it (had to patch the original driver heavily, disabling some new functionality just to get it compatible with 2.6.27) and it compiled, but it was not loadable due to undefined module symbols.

    And BTW:

    If you post your problem in several fora at the same time, then at least post cross references.

    Kernel-Module kompilieren (bonding) schlaegt immer fehl - linuxforen.de -- User helfen Usern

    LINUX openSUSE - Kernel-Module kompilieren schlaegt immer fehl

    Those are the two I found with google in 2 minues (while searching for a possible solution), so I suspect there might even be more, this is not very polite to let different fora work on your problem at the same time without informing each other and by that letting them do double/triple the work for you.

  5. #5
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: Module-compilation problems

    First of all, you have to check the dependency of netdevice.h on other modules and the kernel itself. If you don't find any, then you can get the new kernel header files and compile. If you see dependency on kernel itself, you can not proceed. If you find any dependency on other modules, then you need to compile those modules too.
    Again, if you do it, make sure that you don't do automatic updates because that may overwrite some of your compiled modules.
    So, the conclusion is that you should do it only if you really need to do it.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  6. #6

    Default Re: Module-compilation problems

    Thanks a lot for your answers. I will do a cross reference to this post in the other both foras (there are not more posts in other foras.).

    As it seems, it's not really simple, to compile a newer version of the bonding-driver in my running kernel. Probably, I will wait to the official 2.6.29-distribution-kernel.
    Thanks.
    Tom

  7. #7
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    1,770

    Default Re: Module-compilation problems

    You can wait for openSUSE 11.2 or try the milestone version.
    openSUSE 12.3 (x86_64) with Kernel 3.7.10-1.16-desktop and KDE 4.11.2 on MacBook Pro
    Latest MS Windows version used: Win95

  8. #8

    Default Re: Module-compilation problems

    Thanks for your answers.
    You can have a look to another post in another fora:
    Kernel-Module kompilieren (bonding) schlägt immer fehl - linuxforen.de -- User helfen Usern

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •