我正在尝试为 Ultrium LTO-5 磁带设备构建 IBM lin_tape 模块,但失败了
操作系统是 Centos 5.4 x.86_64
当我跑步时:
rpmbuild --重建 lin_tape-1.76.0-1.src.rpm
输出如下:
Installing lin_tape-1.76.0-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.42840
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf lin_tape-1.76.0
+ /bin/gzip -dc /usr/src/redhat/SOURCES/lin_tape-1.76.0.tgz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd lin_tape-1.76.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 .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.42840
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lin_tape-1.76.0
+ LANG=C
+ export LANG
+ unset DISPLAY
++ echo x86_64-redhat-linux-gnu
++ cut -f 1 -d -
+ p=x86_64
+ '[' x86_64 == i386 ']'
+ '[' x86_64 == i586 ']'
+ '[' x86_64 == i686 ']'
+ '[' x86_64 == ppc64 ']'
+ '[' x86_64 == powerpc ']'
+ '[' x86_64 == powerpc64 ']'
+ '[' x86_64 == s390 ']'
+ '[' x86_64 == s390x ']'
+ '[' x86_64 == ia64 ']'
+ '[' x86_64 == x86_64 ']'
+ proc=AMD
+ cp -af lin_tape_359X_AMD.ReadMe lin_tape_359X.ReadMe
+ cp -af lin_tape_Ultrium_AMD.ReadMe lin_tape_Ultrium.ReadMe
+ make KERNEL=2.6.30.5-UP PROC=x86_64 driver
make -C /lib/modules/2.6.30.5-UP/build SUBDIRS=/usr/src/redhat/BUILD/lin_tape-1.76.0 PWD=/usr/src/redhat/BUILD/lin_tape-1.76.0 clean
make[1]: Entering directory `/usr/src/kernels/linux-2.6.30.5'
make[1]: Leaving directory `/usr/src/kernels/linux-2.6.30.5'
mkdir bldtmp
make KERNEL=2.6.30.5-UP compileclean lin_tape.ko
make[1]: Entering directory `/usr/src/redhat/BUILD/lin_tape-1.76.0'
export PWD
make -C /lib/modules/2.6.30.5-UP/build SUBDIRS=/usr/src/redhat/BUILD/lin_tape-1.76.0 PWD=/usr/src/redhat/BUILD/lin_tape-1.76.0 modules
make[2]: Entering directory `/usr/src/kernels/linux-2.6.30.5'
CC [M] /usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_scsi_config.o
/usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_scsi_config.c: In function 'lin_tape_bind_device':
/usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_scsi_config.c:1833: warning: ignoring return value of 'device_bind_driver', declared with attribute warn_unused_result
CC [M] /usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_scsi_tape.o
CC [M] /usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_scsi_trace.o
CC [M] /usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_ioctl_tape.o
/usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_ioctl_tape.c: In function 'lin_tape_blk_rq':
/usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_ioctl_tape.c:5822: error: 'struct request' has no member named 'resid_len'
make[3]: *** [/usr/src/redhat/BUILD/lin_tape-1.76.0/lin_tape_ioctl_tape.o] Error 1
make[2]: *** [_module_/usr/src/redhat/BUILD/lin_tape-1.76.0] Error 2
make[2]: Leaving directory `/usr/src/kernels/linux-2.6.30.5'
make[1]: *** [lin_tape.ko] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/lin_tape-1.76.0'
make: *** [bldtmp/lin_tape-2.6.30.5-UP.ko] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.42840 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.42840 (%build)
输出结束
任何想法?
提前致谢!
答案1
您已将标准 EL5 内核替换为较新的自定义内核,其中的编程接口(ABI/API)有所不同。
引用install.README
您应该与源 RPM 一起收到的内容:
IBM 不保证 lin_tape 驱动程序在任何其他内核或操作系统上都能正确运行。
不幸的是你没有提到为什么此系统具有自定义内核,因此建议将受到限制。您可以使用的一些选项包括:
- 评估此服务器具有自定义内核的原因并考虑是否可以用支持的内核替换它。
- 在另一台运行支持内核的服务器上安装磁带驱动器和驱动程序。