Troubleshooting
Problem
Invoking the z/OS XL C/C++ compiler by specifying the compiler options after all input file operands results in error "FSUM3067 archive library not found" or error "FSUM3008 incorrect suffix is used."
Symptom
Various errors might be seen stating that a file cannot be found or that an incorrect suffix is used. The errors do not occur if the compile parameter order is changed such that all compiler options precede all input file operands.
Examples of error messages that might be seen are:
> cc test.o -L. -lmylib -o output
FSUM3067 The archive library mylib (libmylib.a) cannot be found.
>
> cc test.o -o output -L. -lmylib
FSUM3008 Specify a file with the correct suffix (.c, .i, .s, .o, .x, .p, .I, or .a), or a corresponding data set name, instead of -o./output.
>
The files noted in the FSUM3067 error message are present, and the target file in FSUM3008 is invalid.
Cause
This issue is caused by an environment variable called prefix_CCMODE:
prefix_CCMODE
Controls how the c89/cc/c++ command does parsing. The default behavior of the c89/cc/c++ command is to expect all options to precede all operands. Setting this variable allows compatibility with historical implementations (other cc commands). When set to 1, the c89/cc/c++ command operates as follows:
Options and operands can be interspersed.
The double dash (––) is ignored.
Setting this variable to 0 results in the default behavior. The default value is 0
, where prefix can be _CC, _CXX, or _C89, depending on the compiler invocation being used.
Resolving The Problem
If you are building source code with makefiles that do not follow the historical "options precedingoperands" convention, the prefix_CCMODE environment variables should be set:
export _CC_CCMODE=1
export _CXX_CCMODE=1
export _C89_CCMODE=1
These are particularity useful when porting applications to z/OS and the z/OS XL C/C++ compiler.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21666413