0

I'm trying to build IBM lin_tape module for a Ultrium LTO-5 tape device, but it's failing

The OS is a Centos 5.4 x.86_64

When I run:

rpmbuild --rebuild lin_tape-1.76.0-1.src.rpm

It outputs as follows:

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)

End of Output

any idea?

Thanks in advance!

sebelk
  • 682
  • 4
  • 13
  • 32

1 Answers1

1

You've replaced the standard EL5 kernel with a newer custom kernel, in which the programming interfaces (ABI/API) are different.

To quote from the install.README you should have received along with the source RPM:

IBM does not guarantee correct operation of the lin_tape driver on any other kernel or operating system.

Unfortunately you didn't mention why this system has a custom kernel, so the advice will be limited. Some options available to you include:

  1. Evaluate why this server has a custom kernel and consider whether it can be replaced with the supported kernel.
  2. Install the tape drive and driver on another server which runs the supported kernel.
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • And for the love of god, EL5.4? You've missed five updates already! – Michael Hampton Mar 05 '13 at 15:12
  • Thanks, We had a custom kernel because we needed io statistc per pid, but I've found that it was backported later: http://dag.wieers.com/blog/red-hat-backported-io-accounting-to-rhel5 HTH – sebelk Mar 05 '13 at 15:51
  • 1
    If that's all you needed, then you should be fine to switch back to the system kernel, as soon as you get that box up to date. :) – Michael Hampton Mar 05 '13 at 15:52