安装编译网卡驱动时报错。。。。
root@localhost SPECS]# rpmbuild -bb tg3.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.29595
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ cd /usr/src/redhat/BUILD
+ rm -rf tg3-3.81c
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/tg3-3.81c.tar.bz2
+ tar -xvvf -
drwxr-xr-x 2397/305 0 2007-09-19 06:40:00 tg3-3.81c/
-rw-r--r-- 2397/305 3445 2007-09-13 06:09:59 tg3-3.81c/tg3.4
-rw-r--r-- 2397/305 371903 2007-09-19 06:38:18 tg3-3.81c/tg3.c
-rw-r--r-- 2397/305 98682 2007-09-15 07:53:08 tg3-3.81c/tg3.h
-rw-r--r-- 2397/305 155259 2007-09-15 07:44:01 tg3-3.81c/ChangeLog
-rw-r--r-- 2397/305 15153 2007-09-13 06:09:59 tg3-3.81c/LICENSE
-rw-r--r-- 2397/305 10323 2007-09-19 06:39:54 tg3-3.81c/README.TXT
-rw-r--r-- 2397/305 2714 2007-09-13 06:09:59 tg3-3.81c/Makefile
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd tg3-3.81c
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.11559
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd tg3-3.81c
+ LANG=C
+ export LANG
+ value=
+ '[' -z '' ']'
++ uname -r
+ KVER=2.4.20-8smp
+ make KVER=2.4.20-8smp
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -I/lib/modules/2.4.20-8smp/build/include -DRED_HAT_LINUX_KERNEL -DOLD_NETIF -O2 -c -o tg3.o tg3.c
In file included from tg3.c:85:
tg3.h: In function `tg3_enable_intx':
tg3.h:438: `PCI_COMMAND_INTX_DISABLE' undeclared (first use in this function)
tg3.h:438: (Each undeclared identifier is reported only once
tg3.h:438: for each function it appears in.)
tg3.c: At top level:
tg3.c:178: `PCI_DEVICE_ID_TIGON3_5705' undeclared here (not in a function)
tg3.c:178: initializer element is not constant
tg3.c:178: (near initialization for `tg3_pci_tbl[6].device')
tg3.c:178: initializer element is not constant
tg3.c:178: (near initialization for `tg3_pci_tbl[6]')
tg3.c:179: `PCI_DEVICE_ID_TIGON3_5705_2' undeclared here (not in a function)
tg3.c:179: initializer element is not constant
tg3.c:179: (near initialization for `tg3_pci_tbl[7].device')
tg3.c:179: initializer element is not constant
tg3.c:179: (near initialization for `tg3_pci_tbl[7]')
tg3.c:180: `PCI_DEVICE_ID_TIGON3_5705M' undeclared here (not in a function)
tg3.c:180: initializer element is not constant
tg3.c:180: (near initialization for `tg3_pci_tbl[8].device')
tg3.c:180: initializer element is not constant
tg3.c:180: (near initialization for `tg3_pci_tbl[8]')
tg3.c:181: `PCI_DEVICE_ID_TIGON3_5705M_2' undeclared here (not in a function)
tg3.c:181: initializer element is not constant
tg3.c:181: (near initialization for `tg3_pci_tbl[9].device')
tg3.c:181: initializer element is not constant
tg3.c:181: (near initialization for `tg3_pci_tbl[9]')
tg3.c:182: initializer element is not constant
tg3.c:182: (near initialization for `tg3_pci_tbl[10]')
tg3.c:183: initializer element is not constant
tg3.c:183: (near initialization for `tg3_pci_tbl[11]')
tg3.c:184: initializer element is not constant
tg3.c:184: (near initialization for `tg3_pci_tbl[12]')
tg3.c:185: initializer element is not constant
tg3.c:185: (near initialization for `tg3_pci_tbl[13]')
tg3.c:186: initializer element is not constant
tg3.c:186: (near initialization for `tg3_pci_tbl[14]')
tg3.c:187: `PCI_DEVICE_ID_TIGON3_5782' undeclared here (not in a function)
tg3.c:187: initializer element is not constant
tg3.c:187: (near initialization for `tg3_pci_tbl[15].device')
tg3.c:187: initializer element is not constant
tg3.c:187: (near initialization for `tg3_pci_tbl[15]')
tg3.c:188: `PCI_DEVICE_ID_TIGON3_5788' undeclared here (not in a function)
tg3.c:188: initializer element is not constant
tg3.c:188: (near initialization for `tg3_pci_tbl[16].device')
tg3.c:188: initializer element is not constant
tg3.c:188: (near initialization for `tg3_pci_tbl[16]')
tg3.c:189: initializer element is not constant
tg3.c:189: (near initialization for `tg3_pci_tbl[17]')
tg3.c:190: `PCI_DEVICE_ID_TIGON3_5901' undeclared here (not in a function)
tg3.c:190: initializer element is not constant
tg3.c:190: (near initialization for `tg3_pci_tbl[18].device')
tg3.c:190: initializer element is not constant
tg3.c:190: (near initialization for `tg3_pci_tbl[18]')
tg3.c:191: `PCI_DEVICE_ID_TIGON3_5901_2' undeclared here (not in a function)
tg3.c:191: initializer element is not constant
tg3.c:191: (near initialization for `tg3_pci_tbl[19].device')
tg3.c:191: initializer element is not constant
tg3.c:191: (near initialization for `tg3_pci_tbl[19]')
tg3.c:192: initializer element is not constant
tg3.c:192: (near initialization for `tg3_pci_tbl[20]')
tg3.c:193: initializer element is not constant
tg3.c:193: (near initialization for `tg3_pci_tbl[21]')
tg3.c:194: initializer element is not constant
tg3.c:194: (near initialization for `tg3_pci_tbl[22]')
tg3.c:195: initializer element is not constant
tg3.c:195: (near initialization for `tg3_pci_tbl[23]')
tg3.c:196: initializer element is not constant
tg3.c:196: (near initialization for `tg3_pci_tbl[24]')
tg3.c:197: initializer element is not constant
tg3.c:197: (near initialization for `tg3_pci_tbl[25]')
tg3.c:198: initializer element is not constant
tg3.c:198: (near initialization for `tg3_pci_tbl[26]')
tg3.c:199: initializer element is not constant
tg3.c:199: (near initialization for `tg3_pci_tbl[27]')
tg3.c:200: initializer element is not constant
tg3.c:200: (near initialization for `tg3_pci_tbl[28]')
tg3.c:201: initializer element is not constant
tg3.c:201: (near initialization for `tg3_pci_tbl[29]')
tg3.c:202: initializer element is not constant
tg3.c:202: (near initialization for `tg3_pci_tbl[30]')
tg3.c:203: initializer element is not constant
tg3.c:203: (near initialization for `tg3_pci_tbl[31]')
tg3.c:204: initializer element is not constant
tg3.c:204: (near initialization for `tg3_pci_tbl[32]')
tg3.c:205: initializer element is not constant
tg3.c:205: (near initialization for `tg3_pci_tbl[33]')
tg3.c:206: initializer element is not constant
tg3.c:206: (near initialization for `tg3_pci_tbl[34]')
tg3.c:207: initializer element is not constant
tg3.c:207: (near initialization for `tg3_pci_tbl[35]')
tg3.c:208: initializer element is not constant
tg3.c:208: (near initialization for `tg3_pci_tbl[36]')
tg3.c:209: initializer element is not constant
tg3.c:209: (near initialization for `tg3_pci_tbl[37]')
tg3.c:210: initializer element is not constant
tg3.c:210: (near initialization for `tg3_pci_tbl[38]')
tg3.c:211: initializer element is not constant
tg3.c:211: (near initialization for `tg3_pci_tbl[39]')
tg3.c:212: initializer element is not constant
tg3.c:212: (near initialization for `tg3_pci_tbl[40]')
tg3.c:213: initializer element is not constant
tg3.c:213: (near initialization for `tg3_pci_tbl[41]')
tg3.c:214: initializer element is not constant
tg3.c:214: (near initialization for `tg3_pci_tbl[42]')
tg3.c:215: initializer element is not constant
tg3.c:215: (near initialization for `tg3_pci_tbl[43]')
tg3.c:216: initializer element is not constant
tg3.c:216: (near initialization for `tg3_pci_tbl[44]')
tg3.c:217: initializer element is not constant
tg3.c:217: (near initialization for `tg3_pci_tbl[45]')
tg3.c:218: initializer element is not constant
tg3.c:218: (near initialization for `tg3_pci_tbl[46]')
tg3.c:219: initializer element is not constant
tg3.c:219: (near initialization for `tg3_pci_tbl[47]')
tg3.c:220: initializer element is not constant
tg3.c:220: (near initialization for `tg3_pci_tbl[48]')
tg3.c:221: initializer element is not constant
tg3.c:221: (near initialization for `tg3_pci_tbl[49]')
tg3.c:222: initializer element is not constant
tg3.c:222: (near initialization for `tg3_pci_tbl[50]')
tg3.c:223: initializer element is not constant
tg3.c:223: (near initialization for `tg3_pci_tbl[51]')
tg3.c:224: initializer element is not constant
tg3.c:224: (near initialization for `tg3_pci_tbl[52]')
tg3.c:225: `PCI_DEVICE_ID_SYSKONNECT_9DXX' undeclared here (not in a function)
tg3.c:225: initializer element is not constant
tg3.c:225: (near initialization for `tg3_pci_tbl[53].device')
tg3.c:225: initializer element is not constant
tg3.c:225: (near initialization for `tg3_pci_tbl[53]')
tg3.c:226: `PCI_DEVICE_ID_SYSKONNECT_9MXX' undeclared here (not in a function)
tg3.c:226: initializer element is not constant
tg3.c:226: (near initialization for `tg3_pci_tbl[54].device')
tg3.c:226: initializer element is not constant
tg3.c:226: (near initialization for `tg3_pci_tbl[54]')
tg3.c:227: initializer element is not constant
tg3.c:227: (near initialization for `tg3_pci_tbl[55]')
tg3.c:228: `PCI_DEVICE_ID_ALTIMA_AC1001' undeclared here (not in a function)
tg3.c:228: initializer element is not constant
tg3.c:228: (near initialization for `tg3_pci_tbl[56].device')
tg3.c:228: initializer element is not constant
tg3.c:228: (near initialization for `tg3_pci_tbl[56]')
tg3.c:229: `PCI_DEVICE_ID_ALTIMA_AC1003' undeclared here (not in a function)
tg3.c:229: initializer element is not constant
tg3.c:229: (near initialization for `tg3_pci_tbl[57].device')
tg3.c:229: initializer element is not constant
tg3.c:229: (near initialization for `tg3_pci_tbl[57]')
tg3.c:230: initializer element is not constant
tg3.c:230: (near initialization for `tg3_pci_tbl[58]')
tg3.c:231: initializer element is not constant
tg3.c:231: (near initialization for `tg3_pci_tbl[59]')
tg3.c:232: initializer element is not constant
tg3.c:232: (near initialization for `tg3_pci_tbl[60]')
tg3.c: In function `tg3_get_drvinfo':
tg3.c:8504: warning: implicit declaration of function `pci_name'
tg3.c:8504: warning: passing arg 2 of `strcpy' makes pointer from integer without a cast
tg3.c: At top level:
tg3.c:9705: variable `tg3_ethtool_ops' has initializer but incomplete type
tg3.c:9706: unknown field `get_settings' specified in initializer
tg3.c:9706: warning: excess elements in struct initializer
tg3.c:9706: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9707: unknown field `set_settings' specified in initializer
tg3.c:9707: warning: excess elements in struct initializer
tg3.c:9707: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9708: unknown field `get_drvinfo' specified in initializer
tg3.c:9708: warning: excess elements in struct initializer
tg3.c:9708: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9709: unknown field `get_regs_len' specified in initializer
tg3.c:9709: warning: excess elements in struct initializer
tg3.c:9709: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9710: unknown field `get_regs' specified in initializer
tg3.c:9710: warning: excess elements in struct initializer
tg3.c:9710: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9711: unknown field `get_wol' specified in initializer
tg3.c:9711: warning: excess elements in struct initializer
tg3.c:9711: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9712: unknown field `set_wol' specified in initializer
tg3.c:9712: warning: excess elements in struct initializer
tg3.c:9712: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9713: unknown field `get_msglevel' specified in initializer
tg3.c:9713: warning: excess elements in struct initializer
tg3.c:9713: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9714: unknown field `set_msglevel' specified in initializer
tg3.c:9714: warning: excess elements in struct initializer
tg3.c:9714: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9715: unknown field `nway_reset' specified in initializer
tg3.c:9715: warning: excess elements in struct initializer
tg3.c:9715: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9716: unknown field `get_link' specified in initializer
tg3.c:9716: `ethtool_op_get_link' undeclared here (not in a function)
tg3.c:9716: warning: excess elements in struct initializer
tg3.c:9716: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9721: unknown field `get_eeprom' specified in initializer
tg3.c:9721: warning: excess elements in struct initializer
tg3.c:9721: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9724: unknown field `set_eeprom' specified in initializer
tg3.c:9724: warning: excess elements in struct initializer
tg3.c:9724: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9726: unknown field `get_ringparam' specified in initializer
tg3.c:9726: warning: excess elements in struct initializer
tg3.c:9726: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9727: unknown field `set_ringparam' specified in initializer
tg3.c:9727: warning: excess elements in struct initializer
tg3.c:9727: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9728: unknown field `get_pauseparam' specified in initializer
tg3.c:9728: warning: excess elements in struct initializer
tg3.c:9728: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9729: unknown field `set_pauseparam' specified in initializer
tg3.c:9729: warning: excess elements in struct initializer
tg3.c:9729: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9730: unknown field `get_rx_csum' specified in initializer
tg3.c:9730: warning: excess elements in struct initializer
tg3.c:9730: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9731: unknown field `set_rx_csum' specified in initializer
tg3.c:9731: warning: excess elements in struct initializer
tg3.c:9731: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9732: unknown field `get_tx_csum' specified in initializer
tg3.c:9732: `ethtool_op_get_tx_csum' undeclared here (not in a function)
tg3.c:9732: warning: excess elements in struct initializer
tg3.c:9732: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9736: unknown field `get_sg' specified in initializer
tg3.c:9736: `ethtool_op_get_sg' undeclared here (not in a function)
tg3.c:9736: warning: excess elements in struct initializer
tg3.c:9736: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9737: unknown field `set_sg' specified in initializer
tg3.c:9737: `ethtool_op_set_sg' undeclared here (not in a function)
tg3.c:9737: warning: excess elements in struct initializer
tg3.c:9737: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9742: unknown field `self_test_count' specified in initializer
tg3.c:9742: warning: excess elements in struct initializer
tg3.c:9742: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9743: unknown field `self_test' specified in initializer
tg3.c:9743: warning: excess elements in struct initializer
tg3.c:9743: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9744: unknown field `get_strings' specified in initializer
tg3.c:9744: warning: excess elements in struct initializer
tg3.c:9744: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9745: unknown field `phys_id' specified in initializer
tg3.c:9745: warning: excess elements in struct initializer
tg3.c:9745: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9746: unknown field `get_stats_count' specified in initializer
tg3.c:9746: warning: excess elements in struct initializer
tg3.c:9746: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9747: unknown field `get_ethtool_stats' specified in initializer
tg3.c:9747: warning: excess elements in struct initializer
tg3.c:9747: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9748: unknown field `get_coalesce' specified in initializer
tg3.c:9748: warning: excess elements in struct initializer
tg3.c:9748: warning: (near initialization for `tg3_ethtool_ops')
tg3.c:9749: unknown field `set_coalesce' specified in initializer
tg3.c:9749: warning: excess elements in struct initializer
tg3.c:9749: warning: (near initialization for `tg3_ethtool_ops')
tg3.c: In function `tg3_get_invariants':
tg3.c:11441: warning: format argument is not a pointer (arg 2)
tg3.c:11441: warning: format argument is not a pointer (arg 2)
tg3.c:11568: `PCI_DEVICE_ID_TIGON3_5901' undeclared (first use in this function)tg3.c:11569: `PCI_DEVICE_ID_TIGON3_5901_2' undeclared (first use in this function)
tg3.c:11581: warning: format argument is not a pointer (arg 2)
tg3.c:11581: warning: format argument is not a pointer (arg 2)
tg3.c: In function `tg3_init_one':
tg3.c:12488: structure has no member named `ethtool_ops'
tg3.c: At top level:
tg3.c:9705: storage size of `tg3_ethtool_ops' isn't known
make: *** [tg3.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.11559 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.11559 (%build)
[ 本帖最后由 gantuj 于 2008-3-3 11:59 编辑 ]