[go: up one dir, main page]

Menu

#51 Cannot compile with gcc-4.0 ( debian testing 2.6.12-1-686)

open
nobody
None
5
2014-08-06
2005-09-22
No

compile halts with:

alon@yoq:/tmp/atmelwlandriver$ make usb
Building usbvnetr
Bootstraping target usbvnetr
Debug
make[1]: Entering directory
`/tmp/atmelwlandriver/objs/usbvnetr/debug'
make[2]: Entering directory `/usr/src/linux-source-2.6.12'
LD
/tmp/atmelwlandriver/objs/usbvnetr/debug/built-in.o
CC [M]
/tmp/atmelwlandriver/objs/usbvnetr/debug/callbacks.o
CC [M]
/tmp/atmelwlandriver/objs/usbvnetr/debug/command.o
CC [M] /tmp/atmelwlandriver/objs/usbvnetr/debug/common.o
CC [M] /tmp/atmelwlandriver/objs/usbvnetr/debug/rx.o
/tmp/atmelwlandriver/objs/usbvnetr/debug/rx.c: In
function 'MgmtFrameProcessing':
/tmp/atmelwlandriver/objs/usbvnetr/debug/rx.c:753:
error: invalid lvalue in assignment
make[3]: ***
[/tmp/atmelwlandriver/objs/usbvnetr/debug/rx.o] Error 1
make[2]: ***
[_module_/tmp/atmelwlandriver/objs/usbvnetr/debug] Error 2
make[2]: Leaving directory `/usr/src/linux-source-2.6.12'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/tmp/atmelwlandriver/objs/usbvnetr/debug'
make: *** [usbvnetr] Error 2

Kernel 2.6.12-1-686 is compiled with gcc-4.0.

The module does compile with gcc-3.3 but that is
unusable with this kernel..

Alon

Discussion

  • Benjamin Tse

    Benjamin Tse - 2005-10-04

    Logged In: YES
    user_id=2114

    The following patch works for me (tested with usb drivers only).

    --- atmelwlandriver/src/Pcmcia_Pci/fastvnet_cs.c 2005-10-02
    11:34:05.000000000 +1000
    +++ baseline/atmelwlandriver/src/Pcmcia_Pci/fastvnet_cs.c
    2005-07-22 17:37:22.000000000 +1000
    @@ -1958,7 +1958,7 @@
    u64* pTime = (u64*) tCurrentTime;
    struct timeval timev;
    do_gettimeofday(&timev);
    - (*pTime) = timev.tv_sec * 10000000;
    + (u64) (*pTime) = timev.tv_sec * 10000000;
    };

    int atmel_assoc_info_event (struct net_device *dev,
    PVNet_ADAPTER Adapter)
    diff -u -r atmelwlandriver/src/usb/rx.c
    baseline/atmelwlandriver/src/usb/rx.c
    --- atmelwlandriver/src/usb/rx.c 2005-10-02
    11:03:51.000000000 +1000
    +++ baseline/atmelwlandriver/src/usb/rx.c 2005-07-22
    17:37:22.000000000 +1000
    @@ -746,7 +746,7 @@
    Adapter->RxInBuff.WirelessPacket +
    MGMT_FRAME_BODY_OFFSET;

    - Adapter->ErrorCode =
    + (UCHAR) Adapter->ErrorCode =
    (UCHAR) *
    (PUSHORT) &
    AssociationRspnsFrame
    diff -u -r atmelwlandriver/src/usb/vnetusba.c
    baseline/atmelwlandriver/src/usb/vnetusba.c
    --- atmelwlandriver/src/usb/vnetusba.c 2005-10-02
    11:04:30.000000000 +1000
    +++ baseline/atmelwlandriver/src/usb/vnetusba.c 2005-07-22
    17:37:22.000000000 +1000
    @@ -843,7 +843,7 @@
    u64* pTime = (u64*) tCurrentTime;
    struct timeval timev;
    do_gettimeofday(&timev);
    - (*pTime) = timev.tv_sec * 10000000;
    + (u64) (*pTime) = timev.tv_sec * 10000000;
    };

    int atmel_assoc_info_event (PVNet_ADAPTER Adapter)

     
  • Nobody/Anonymous

    Logged In: NO

    Same here by me.

    Using an 2.6.15-1-686 kernel with adeos patch.
    The driver is not compilable wether witch dive = usb nor
    with make world.

    1. USB:
    /rx.c:753: error: invalid lvalue in assignment

    points to that line:

    (UCHAR) Adapter->ErrorCode =
    (UCHAR) *
    (PUSHORT) &
    AssociationRspnsFrame [STATUS_IN_ASSOCIATION_RESP_OFFSET];

    As you see the patch that is as a comment in that works here
    not!

    2. MAKE WORLD:

    it ends up with no compilation after a lot of warnings:
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:
    In function 'cs_error':
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:938:
    warning: implicit declaration of function 'pcmcia_report_error'
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:1109:6:
    warning: "KERNEL_VERSION_CODE" is not defined
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:
    In function 'VNetGetSystemTime':
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:1961:
    error: invalid lvalue in assignment
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:
    In function 'vnet_ioctl':
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2722:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2725:
    warning: ignoring return value of 'copy_from_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2731:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2735:
    warning: ignoring return value of 'copy_from_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2753:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2773:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2866:
    warning: ignoring return value of 'copy_from_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2875:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2881:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    /usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.c:2887:
    warning: ignoring return value of 'copy_to_user', declared
    with attribute warn_unused_result
    make[3]: ***
    [/usr/src/atmelwlandriver/objs/pcmf504A_2958/debug/fastvnet_cs.o]
    Error 1

    Hope this is clear enough.

     

Log in to post a comment.