Comeau C/C++TM 4.3.3-4.3.10.1BETA Front-End
Additional information for LINUX/Intel customers

When using Comeau C++ under LINUX, you may come across the issues discussed below.
  1. Versions of gcc, in particular 3.x, now provide the definitions of some macros found in <limits.h> and <float.h> as special builtin identitiers. Therefore, as those macros are no longer in those headers, you may get undefined identifier messages for things such as __SCHAR_MAX__ with the error pointing to CHAR_MAX, for instance:
    "blah.c", line 123: error: identifier "__SCHAR_MAX__" is undefined
        { return CHAR_MAX; }
                 ^
    
    You will need to define these macros yourself. We should be able to provide you help with getting those definitions defined.
  2. Although earlier versions of Comeau C++ were able to use some earlier versions of g++'s C++ Standard Library, that has not been so for a long time. Even g++ 3.x's libstdc++ is not known to work with Comeau C++. Therefore, when como433.setup asks you for the directory of your C++ SL, do not provide it with g++'s. You'll be wanting to provide it with a C++ SL that is known to work with Comeau C++, such as libcomo or Dinkumware's SL.
  3. You may find you want to use the new --long_long command line option. Note this option can be enabled even in strict mode.
  4. When you first install Comeau C++ on LINUX, don't inform como433.setup about libcomo, instead tell it you don't have a standard library. Go build libcomo and only then go back and re-run como433.setup telling it about libcomo. As of Comeau C+/C++ 4.3.3 you do not need to install in relaxed mode in order to build libcomo, as --no_A and --no_a options are now supported, and are the default when building libcomo.
  5. In C99 mode, for some combinations of LINUX and gcc you may get an error:
    "/usr/include/_G_config.h", line 50: error: type containing an unknown-size
              array is not allowed
          struct __gconv_info __cd;
                              ^
    
    For instance, a vanilla RedHat 7.3 installed straight out of the box will run into this problem.

    To rectify that, you will need to mkdir a sys directory "under" the include directory of your Comeau C++ installation. So let's say Comeau C++ is installed at /como433, then you would mkdir /como433/include/sys. Then you would create a file named /como433/include/sys/cdefs.h (your path name may be different depending upon where you installed Comeau C++), as follows:

    #ifndef	_COMO_SYS_CDEFS_H
    #define	_COMO_SYS_CDEFS_H	1
    
    /*
       Change this path if your C compiler include files
       are not in the normal place
     */
    #include "/usr/include/sys/cdefs.h"
    
    #undef __flexarr
    #define __flexarr [1]
    
    #endif
    
  6. If, in C++ mode, you get linker errors such as:
    c2.o: In function `main':
    c2.o(.text+0x14): undefined reference to `cout'
    c2.o(.text+0x19): undefined reference to `ostream::operator<<(char const *)'
    c2.o(.text+0x32): undefined reference to `cout'
    c2.o(.text+0x37): undefined reference to `ostream::operator<<(char const *)'
    c2.o(.text+0x42): undefined reference to `ostream::operator<<(int)'
    c2.o(.text+0x55): undefined reference to `endl(ostream &)'
    c2.o(.text+0x6e): undefined reference to `cout'
    c2.o(.text+0x73): undefined reference to `ostream::operator<<(char const *)'
    c2.o(.text+0x7e): undefined reference to `ostream::operator<<(int)'
    c2.o(.text+0x91): undefined reference to `endl(ostream &)'
    collect2: ld returned 1 exit status
    
    then it is possible that you have not built libcomo properly and/or have not told Comeau C++ to use libcomo after you built it (the source file may have compiled because it picked up the g++ iostreams headers). To resolve this, ensure you've built libcomo properly and also that you've run como433.setup properly, telling it where your libcomo is.

  7. Along the same lines as the previous bullet, getting an error such as:
    "/usr/include/g++-3/stl_vector.h", line 110: error: identifier "_M_start" is
              undefined
          _M_start = _M_allocate(__n);
          ^
    
    should be clear indication that you are picking up the wrong standard library (note the /usr/include/g++-3 in the error message). As above, to resolve this, ensure you've built libcomo properly and also that you've run como433.setup properly.

  8. When using the Dinkumware libraries with Comeau C++, you may find you want to use the new --long_long command line option. Note this option can be enabled even in strict mode.

    As well, you may need to specify /usr/lib/libpthread.so with -lpthread if you built it that way. See their instructions for more details. See their sample run scripts for more details.

  9. On some LINUX/gcc combo's, you may get an error that NULL is incorrectly defined, in particular, that some pointer can't be assigned to or initialized properly. If so, you may want to add
    -D__null=0L -D__GNUG__
    
    to the EDG_DEFAULT_DEFINES environment variable found in /WhereYouInstalledComeauC++/bin/como You can try just the __null define on the command line by itself first, since in some cases that may be enough, before adding it to EDG_DEFAULT_DEFINES. Or, although this is a stronger suggestion, go into the actual stddef.h and add an #ifdef for __COMO__ setting the #define for NULL to 0.

  10. In order to use some POSIX or SVID extension routines/struct's, it may be necessary to define _POSIX_SOURCE or _SVID_SOURCE

  11. As of version 4.3.3, many GNU extensions are supported via como's --gcc mode and --g++ mode

  12. Some customers using the 4.3.10.1 beta have received Floating point exception errors from some of the binaries in the package. For instance, /WhereYouInstalledComeauC++/bin/cpfe43101beta.CC might issue this error as well as returned an exit status of 136. Or something similar. If you encounter this, you'll need to contact us about getting a replacement set of binaries that we have available.
Have you found a glitch in Comeau C/C++? No matter how small, please contact us.

Comeau Computing
http://www.comeaucomputing.com


(c) © 1992-2013 Comeau Computing. All Rights Reserved.