Problem
A SCSI tape has been added to an SCO OpenServer 5.0.4 system. When
the /etc/conf/cf.d/link_unix command is run to relink the kernel,
it fails with these error messages:... ... Do you wish to create a new kernel now? (y/n) y
The UNIX Operating System will now be rebuilt.
This will take a few minutes. Please wait.Root for this system build is /"/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/space.h", line 70: too many array(2) initializers "/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/space.h", line 70: too many array(2) initializers "/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/space.h", line 70: too many array initializers; missing } ? "/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/space.h", line 70: illegal lhs of assignment operator "/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/space.h", line 70: unacceptable operand of & "/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/space.h", line 70: cannot recover from earlier errors: goodbye! ERROR: '/var/opt/K/SCO/link/1.1.0Eb/etc/conf/pack.d/Stp/ space.c' will not compile properly
i386ld space.o fatal: Can't open file /var/opt/K/SCO/link/ 1.1.0Eb/etc/conf/pack.d/Stp/space.o for input ERROR: Can not link-edit unix
If "mkdev tape" is run, it reports two tape units present, but there was only one unit configured on the system. For example:
...
...The current tape configuration is:Unit Description0 Generic SCSI-1 / SCSI-2 tape drive
1 Generic SCSI-1 / SCSI-2 tape driveIf you try to remove the last unit listed, the following message appears:
... Enter the unit number you wish to remove or enter q to return to main menu: 1 Invalid choice, please enter a number between 0 and 0
The current configuration is:
Unit Description0 Generic SCSI-1 / SCSI-2 tape drive
1 Generic SCSI-1 / SCSI-2 tape driveEnter the unit number you wish to remove ... ...
The "sdevice", "mdevice" and "mscsi" files in the "/etc/conf/cf.d" directory only show one Stp unit listed.
This problem has been observed where a tape unit has been configured and removed several times over a period of time. The same errors have also been observed on a system that initially showed the error messages listed in the technical article referenced below in the "SEE ALSO" section.
Cause
The "/etc/conf/pack.d/Stp/space.h" file contains two entries for
"gen_Stp_route":... Stp_tape_config_t Stp_tape_cfg[STP_NDRIVES] = { /* BEGIN SCO_STP ENHANCEMENTS */ { 0, 0, -1, -1, gen_Stp_route }, { 0, 0, -1, -1, gen_Stp_route }, /* END SCO_STP ENHANCEMENTS */ ... ...
Solution
Edit the "space.h" file and remove the duplicate entry so it looks like:
...
Stp_tape_config_t Stp_tape_cfg[STP_NDRIVES] = {
/* BEGIN SCO_STP ENHANCEMENTS */
{ 0, 0, -1, -1, gen_Stp_route },
/* END SCO_STP ENHANCEMENTS */
...The kernel should now relink without error using the "./link_unix" command in the "/etc/conf/cf.d" directory.
See also
ta105776, "Kernel relink fails after all SCSI tapes are removed from the link kit."