This is the frequently asked questions page for the C Virtual Operating System (CVOS). For additional information regarding the CVOS, please contact the Space Telescope Science Institute (STScI) help desk at help@stsci.edu.



When compiling the CVOS, why do I get ``Warning, mkpkg line 11: macro `irafos' not found''?

You can ignore the warning regarding the ``irafos'' macro unless you are compiling the CVOS on a VMS platform. The ``irafos'' is a logical defined only for the VMS platform in the irafuser.com file. The logical or macro is referenced in the CVOS mkpkg file

$ifeq (hostid, vms)
$set XFLAGS = "-I[] -I$(irafos) -D__VMS -DD_FLOAT $(XFLAGS)"

and denotes a directory which needs to be searched during compilation for header files (e.g., vms.h) required for a successful build of the CVOS.


Can I use the c_clget[bcsilrdc] and c_clgstr functions to obtain input for a host-level task?

You can use c_clget[bcsilrdc] and c_clgstr in your host-level tasks, but there is no good reason to do this. If you use these functions to obtain the input values, you will not be taking advantage of the command line input of C programs. Moreover, you still will not have access to the IRAF parameter handling capabilities.


Why do my C tasks not abort properly when an exception is raised?

More than likely, you are using an old version of the CVOS. Version 3.3 of the CVOS has been fully tested under IRAF Version 2.11.3 and STSDAS Version 2.1.1; the exception handling works properly. Previous versions of the CVOS either did not have any exception handling capabilities, or the interface was fragile due to inconsistencies with IRAF.


How can I tell the difference between C programs built as native IRAF tasks and those built as host-level tasks?

The way to tell the difference between C programs compiled as native IRAF tasks and those which have been compiled as host-level tasks is to look at the entry level routine for the task. If the task is a C native IRAF task, the entry level routine will have the macro

IRAFTASK(taskname)
instead of
int main(int argc, char **argv).
The entry routine might look the following:

# include < stdio.h>
# include < c_iraf.h>

/* This is the entry level routine for C task BLEE */

IRAFTASK(blee) {
... C code here ...
}

However, there are C tasks in the STSDAS system which were originally designed to be compiled as either native IRAF or host-level tasks. This is not practical and is not a recommended technique for new tasks. These older tasks will have the following in the entry level routine:

# include < stdio.h>
# include < c_iraf.h>

/* This is the entry level routine for C task BLEE */

/* Set up for native or host-level task */
# if defined (NATIVE_IRAF)
IRAFTASK (blee) {
# else
int main (int argc, char **argv) {
# endif
... C code here ...
}

The corresponding mkpkg file would include the lines:

$set XFLAGS=``-DNATIVE_IRAF -Inolibc `-Istsdaslib$cvos/irafstdio' $(XFLAGS)''
$omake blee.c

Note that the definition NATIVE_IRAF is set in the mkpkg file and then used in the entry level routine in order to determine how to compile the task. There are other secondary clues which distinguish C native IRAF from C host-level tasks, but they should not be used as the primary means to classify the task.


Where are the C interface routines that correspond to IRAF CLIO functions which access ``real'' values (e.g., c_clgetr())?

These functions exist in the CVOS, but since the C datatype which corresponds to an IRAF ``real'' is called ``float,'' the routine names were recast to end in ``f'' instead of ``r''. For example, c_clgetr() is c_clgetf() in the current release of the CVOS. This is an issue only with CLIO routines in the CVOS library. In the next release, the IRAF-style function names will be made available.


When compiling my C task, I get warnings ``argument is incompatible with prototype.'' What does this mean?

The C compiler used by the IRAF system by default on some platforms does not recognize ANSI compliant C code. In order to use an alternate C compiler to compile your C tasks, you must set a system environment variable (XC-CC) for the alternate C compiler. The XC-CC environment variable is only understood by the IRAF environment starting with IRAF v2.11. It may be necessary to do the following on the command line

setenv XC-CC gcc
so that the IRAF XC compiler will use gcc instead of the platform default compiler when compiling your C tasks. Now you can run the mkpkg task from the command line and the specified compiler should be invoked. If you run mkpkg from within IRAF, you will probably have to modify your .setenv (or your system's equivalent file) to have this new environment setting. The reason this is necessary is when running mkpkg from within IRAF, a new shell is actually spawned; any environment settings specified on-the-fly will not be known in the new shell where your mkpkg is running.


I am having trouble compiling C native tasks under Solaris 8. I get a message complaining about conflicts with respect to the floatingpoint.h file. Is there a fix for this problem?

Users will not be able to compile C native IRAF tasks under Solaris 8 without obtaining the modified CVOS stdio.h file (download a tar file containing the new stdio.h). C host-level IRAF tasks are not affected. The CVOS stdio.h now contains some additional macros which allow the library to circumvent a complex chain of system-level macro definitions neither needed nor wanted by C native IRAF tasks. The new CVOS stdio.h file should be placed in the ``stsdas$lib/cvos/irafstdio directory''.


CVOS Home Page · STSDAS Home Page · STScI Home Page

Copyright Notice


Space Telescope Science Institute
3700 San Martin Drive
Baltimore, Maryland 21218, USA
Telephone: 410-338-4700
Michele De La Peña (delapena@stsci.edu)
Last Modified: June 09, 2000

Valid HTML 3.2!