Technical article 109447

Kernel relink fails with "too many array initializers" after adding a SCSI tape unit.

OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

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       Description
0         Generic SCSI-1 / SCSI-2 tape drive
1         Generic SCSI-1 / SCSI-2 tape drive

If 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       Description
0         Generic SCSI-1 / SCSI-2 tape drive
1         Generic SCSI-1 / SCSI-2 tape drive

Enter 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."

From the Xinuos technical article database, record 109447. Reproduced with permission. The original is at www.sco.com/ta/109447, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.