PowerAda Return Codes for Commands

From OC Systems Wiki!
Jump to: navigation, search

The compiler and the other tools in this reference are useful for building shell scripts. They have a consistent set of return codes to make it easier to create shell scripts that call them and deal with any problems that occur. The following are the return codes set by the Ada tools.


Normal completion code. The command completed successfully. This code includes the case when the -h option is used to select help.


There was a command syntax error. The possible reasons include:

  • Required options are missing.
  • Required parameters for options are missing.
  • Options are not recognized.
  • Mutually exclusive options specified.
  • Unit names are not valid.

A file or directory was specified incorrectly. The possible reasons include:

  • The file or directory name does not follow system file naming conventions.
  • The file or directory does not exist.
  • The file or directory does not have the necessary permissions.

A sublibrary was specified incorrectly. The possible reasons include:

  • The sublibrary name is incorrect.
  • The sublibrary does not exist.
  • The sublibrary does not have the necessary permissions.
  • The sublibrary is not actually an Ada sublibrary, or it is a sublibrary but its format is incorrect.
  • The sublibrary is in use.

A unit was specified incorrectly. The possible reasons include:

  • The unit name is not valid.
  • The unit does not exist.
  • The unit name was not qualified with lib/ or sec/when this was required.

A file contains multiple compilation units, or a compilation unit is one of several defined in the same file.


The asrcdep command determined a potentially correct compilation order, but the order cannot be verified because pragma INLINE was used.


Circularities were detected in the dependency information for Ada compilation units. These can be caused by true Ada circularities (such as a package specification X using with Y; when package specification Y uses with X;). Circularities can also occur when a single source file contains multiple compilation units.


A source file contains an incorrect set of compilation units (such as a combination of a function specification and a procedure body with the same name).


A compilation unit was defined more than once in a single file or in a set of files.


No operation was necessary so nothing was done.


The target already exists.


One or more Ada sublibraries failed a check.


One or more Ada source files had syntax or semantic errors.


Syntax errors were found in the control file of afmt.


A sublibrary, unit, or file was not copied or moved because it already existed in the target.


alibchk or alibcompress could not operate on a sublibrary because some other program had locked the sublibrary. The sublibrary may have been used in a compilation.


The specified sublibrary is not recognized as a sublibrary. It may be damaged or have the wrong format, or you may have specified a file or directory that was not a sublibrary.


A compilation unit object was missing from the archive file of a sublibrary while invoking alibchk.


An extraneous compilation unit object was found in the archive file of a sublibrary while invoking alibchk.


The areport command found nothing to report. None of the specified files, units, or sublibraries matched the selection conditions.


Optional compilation unit bodies are missing. For example, a package specification may not require a body, so it is uncertain if a body is intended but missing or simply not intended.


There are missing or obsolete compilation units.

15, 23-24, 28-97



An alibcompress operation failed and may have left the sublibrary corrupted.


Some other unexpected error occurred.


Values greater than 128 indicate that the program terminated abnormally, probably due to a signal being delivered. For example, a value of 130 (128 + 2) indicates signal 2, SIGINT was delivered, perhaps by Ctrl-C.