Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
+ 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 -
+ '[' 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
+ 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= PROC=x86_64 driver
make -C /lib/modules/ 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-'
make[1]: Leaving directory `/usr/src/kernels/linux-'
mkdir bldtmp
make KERNEL= compileclean lin_tape.ko
make[1]: Entering directory `/usr/src/redhat/BUILD/lin_tape-1.76.0'
export PWD
make -C /lib/modules/ 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-'
  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-'
make[1]: *** [lin_tape.ko] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/lin_tape-1.76.0'
make: *** [bldtmp/lin_tape-] 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!

share|improve this question

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.
share|improve this answer
And for the love of god, EL5.4? You've missed five updates already! – Michael Hampton Mar 5 '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: HTH – sebelk Mar 5 '13 at 15:51
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 5 '13 at 15:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.