Why does rpm building of kmod-hp-be2net-4.2.389.0-2.x86_64 fail with error "make: *** [_module_/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default] Error 2" ?
Issue
- While building the package
kmod-hp-be2net-4.2.389.0-2.x86_64withspecfile, the package build fails with an error message. The completerpmbuildoutput is as follows.
[root@example SPECS]# rpmbuild -bb hp-benet.kmp.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.31134
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf hp-be2net-4.2.389.0
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/hp-be2net-4.2.389.0.tar.gz
+ tar -xvvf -
drwxr-xr-x root/root 0 2012-10-17 15:49:18 hp-be2net-4.2.389.0/
-rw-r--r-- root/root 73148 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_cmds.c
-rw-r--r-- root/root 964 2012-10-17 15:49:18 hp-be2net-4.2.389.0/version.h
-rw-r--r-- root/root 117812 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_main.c
-rw-r--r-- root/root 3690 2012-10-17 15:49:18 hp-be2net-4.2.389.0/inet_lro.h
-rw-r--r-- root/root 49786 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_cmds.h
-rw-r--r-- root/root 18206 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be.h
-rw-r--r-- root/root 16731 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_hw.h
-rw-r--r-- root/root 4248 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_compat.c
-rw-r--r-- root/root 3028 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_misc.c
-rw-r--r-- root/root 31524 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_ethtool.c
-rw-r--r-- root/root 16939 2012-10-17 15:49:18 hp-be2net-4.2.389.0/be_compat.h
-rw-r--r-- root/root 3844 2012-10-17 15:49:18 hp-be2net-4.2.389.0/Makefile
-rw-r--r-- root/root 15144 2012-10-17 15:49:18 hp-be2net-4.2.389.0/COPYING
-rw-r--r-- root/root 13349 2012-10-17 15:49:18 hp-be2net-4.2.389.0/inet_lro.c
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hp-be2net-4.2.389.0
++ /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,u+w,g-w,o-w .
+ set -- COPYING Makefile be.h be_cmds.c be_cmds.h be_compat.c be_compat.h be_ethtool.c be_hw.h be_main.c be_misc.c inet_lro.c inet_lro.h version.h
+ mkdir source
+ mv COPYING Makefile be.h be_cmds.c be_cmds.h be_compat.c be_compat.h be_ethtool.c be_hw.h be_main.c be_misc.c inet_lro.c inet_lro.h version.h source/
+ mkdir obj
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.31134
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd hp-be2net-4.2.389.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ export 'EXTRA_CFLAGS=-DVERSION=\"4.2.389.0\"'
+ EXTRA_CFLAGS='-DVERSION=\"4.2.389.0\"'
+ for flavor in default
+ rm -rf obj/default
+ cp -r source obj/default
+ export SRC=/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default
+ SRC=/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default
++ '[' default = default ']'
+ make -C /usr/src/kernels/2.6.18-371.el5-x86_64 modules M=/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default CONFIG_BE2NET=m
make: Entering directory `/usr/src/kernels/2.6.18-371.el5-x86_64'
grep: /include/linux/etherdevice.h: No such file or directory
grep: /include/linux/etherdevice.h: No such file or directory
grep: /include/linux/netdevice.h: No such file or directory
grep: /include/linux/pci.h: No such file or directory
grep: /include/linux/skbuff.h: No such file or directory
grep: /include/linux/skbuff.h: No such file or directory
grep: /include/linux/skbuff.h: No such file or directory
grep: /include/linux/skbuff.h: No such file or directory
grep: /include/linux/skbuff.h: No such file or directory
grep: /include/linux/netdevice.h: No such file or directory
grep: /include/linux/skbuff.h: No such file or directory
grep: /include/linux/netdevice.h: No such file or directory
grep: /include/linux/pci.h: No such file or directory
grep: /include/linux/if_vlan.h: No such file or directory
grep: /include/linux/if_vlan.h: No such file or directory
grep: /include/linux/netdevice.h: No such file or directory
grep: /include/linux/netdevice.h: No such file or directory
grep: /include/linux/ethtool.h: No such file or directory
grep: /include/linux/ethtool.h: No such file or directory
grep: /include/linux/ethtool.h: No such file or directory
grep: /include/linux/ethtool.h: No such file or directory
grep: /include/linux/ethtool.h: No such file or directory
CC [M] /usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_main.o
In file included from /usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be.h:39,
from /usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_main.c:24:
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:265: error: redefinition of 'netdev_alloc_skb'
include/linux/skbuff.h:1379: error: previous definition of 'netdev_alloc_skb' was here
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:329: error: redefinition of 'netdev_alloc_skb_ip_align'
include/linux/skbuff.h:1385: error: previous definition of 'netdev_alloc_skb_ip_align' was here
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:506: error: redefinition of 'struct vlan_group'
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:519: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vlan_gro_frags_compat'
In file included from /usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be.h:39,
from /usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_main.c:24:
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:528:1: warning: "vlan_gro_frags" redefined
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:106:1: warning: this is the location of the previous definition
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:552: error: redefinition of 'skb_frag_size_set'
include/linux/skbuff.h:145: error: previous definition of 'skb_frag_size_set' was here
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:557: error: redefinition of 'skb_frag_size_add'
include/linux/skbuff.h:150: error: previous definition of 'skb_frag_size_add' was here
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_compat.h:562: error: redefinition of 'skb_frag_size'
include/linux/skbuff.h:140: error: previous definition of 'skb_frag_size' was here
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_main.c: In function 'be_probe':
/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_main.c:4299: warning: assignment from incompatible pointer type
make[1]: *** [/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default/be_main.o] Error 1
make: *** [_module_/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default] Error 2
make: Leaving directory `/usr/src/kernels/2.6.18-371.el5-x86_64'
error: Bad exit status from /var/tmp/rpm-tmp.31134 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.31134 (%build)
- And the file
/var/tmp/rpm-tmp.31134contains following.
#!/bin/sh
RPM_SOURCE_DIR="/usr/src/redhat/SOURCES"
RPM_BUILD_DIR="/usr/src/redhat/BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic"
RPM_ARCH="x86_64"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="hp-be2net"
RPM_PACKAGE_VERSION="4.2.389.0"
RPM_PACKAGE_RELEASE="2"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/var/tmp/hp-be2net-4.2.389.0"
export RPM_BUILD_ROOT
PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/share/pkgconfig"
export PKG_CONFIG_PATH
set -x
umask 022
cd /usr/src/redhat/BUILD
cd 'hp-be2net-4.2.389.0'
LANG=C
export LANG
unset DISPLAY
export EXTRA_CFLAGS='-DVERSION=\"4.2.389.0\"'
for flavor in default; do
rm -rf obj/$flavor
cp -r source obj/$flavor
export SRC=$PWD/obj/$flavor
make -C /usr/src/kernels/2.6.18-371.el5-$([ $flavor = default ] || echo $flavor-)x86_64 modules M=$PWD/obj/$flavor CONFIG_BE2NET=m
done
exit 0
- Why does rpm building of kmod-hp-be2net-4.2.389.0-2.x86_64 fail with error "make: *** [module/usr/src/redhat/BUILD/hp-be2net-4.2.389.0/obj/default] Error 2" ?
Environment
- Red Hat Enterprise Linux 5.10
rpm-build
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
