SUMMARY: Compiling under 2.5.1 / 2.6

From: Stephan Grund (
Date: Mon Aug 10 1998 - 09:46:18 CDT

Hello List!

Wow, that's fast. Tomorrow morning, I've wrote my question, only 2 hours
later came the frist responses.

Thanks to all:
Thomas Anders; Stephen Wolthusen; Casper Dik; Michael F Gordon;
Kevin Sheehan; Sebastian Benoit; Detlev Habicht

The main reaction was: the gcc for 2.5.1 doesn't compile for 2.6
I think, that I have allready recompiled the gcc for 2.6, but thinking
and knowing ...

The second hint was: get a newer version of gcc (>= 2.8)

In particular:

Casper Dik wrote:
Prior to gcc 2.8, it's not possible to share gcc include directories
between Solaris OS versions.

The Solaris FAQ says:

*6.9) Why do I get __builtin_va_alist or __builtin_va_arg_incr

    You're using gcc without properly installing the gcc fixed
    include files. Or you ran fixincludes after installing gcc
    w/o moving the gcc supplied varargs.h and stdarg.h files
    out of the way and moving them back again later. This often
    happens when people install gcc from a binary distribution.
    If there's a tmp directory in gcc's include directory, fixincludes
    didn't complete. You should have run "just-fixinc" instead.

    Another possible cause is that you're using ``gcc -I/usr/include.''

    Reinstall gcc or upgrade to gcc 2.8.0 or later, which doesn't
    require a reinstallation after every OS upgrade.

+6.10) When compiling, I get "No DATAMODEL_NATIVE specified"?

    There are two typical causes for this; one is compiling with
    a bad install of gcc (See 6.9). The other possible cause
    is installing BIND 4.x or 8.x header files, e.g., by running
    "make install". You can check this with "pkgchk SUNWhea"; if
    this returns any errors, you need to recover the damaged include
    file from the original installation media.

    --- end of excerpt from the FAQ

Questions marked with a * or + have been changed or added since
the FAQ was last posted

The most recently posted version of the FAQ is available from

Stephen Wolthusen wrote:
It's in the FAQ. What you have is a gcc version with fixincludes for 2.3
which incidentially happen to work until 2.5.1. For 2.6 and up you need
different fixincludes, necessitating a recompile of gcc for 2.6. Either
do this yourself or a precompiled package from (e.g.) The packages there are available as pkgs for
/opt or /usr/local installation. If you don't like this you will have to
recompile manually.

Thomas Anders wrote (translated from german):
RTFM -- gcc must be compiled for every OS-version. You would not take
much pleasure in 2.7.0 for Solaris 2.3 under 2.6

Detlev Habicht wrote:
I think, you have to compile the gcc for 2.6. There are many things
different in 2.6. I have included my param.h for 2.6 and gcc So
you check it.

Sebastian Benoit wrote:
You have to reinstall gcc for Solaris 2.6 since gcc (prior to version
2.8.x) moved the sun-include files into the gcc-directory for its own

Michael F Gordon wrote:
You're using gcc compiled on 2.5.1 on a 2.6 machine, which won't work.
The problem is the fixed include files in /usr/local/lib/gcc-lib/
sparc-sun-solaris2.5.1/2.7.0/include - you need to regenerate this
directory on a 2.6 machine. Something like

  make stmp-fixinc
in the gcc source directory should do it without rebuilding the entire
compiler. You can then copy the include directory into the appropriate
directory. The compiled binaries from 2.5.1 work quite happily on 2.6

Yes, I have forgoten to 'make stmp-fixinc'.

Original Question:


The following problem has occurred every time, I try to compile a

When compiling GNU-SW with gcc under Solaris 2.5.1, everything is OK.
The same source-code under 2.6 brings error massages:

warning: `NBBY' redefined
/usr/include/sys/select.h:45: warning: this is the location of the
previous definition
In file included from /usr/include/sys/stream.h:26,
                 from /usr/include/netinet/in.h:38,
                 from gdkwindow.c:23:
/usr/include/sys/model.h:32: #error "No DATAMODEL_NATIVE specified"



---------------------------------------------------------------------- Fraunhofer-Institut fuer Software- und Systemtechnik (ISST) ---------------------------------------------------------------------- Stephan Grund | Telefon : 030/24306-376 System Support | Telefax : 030/24306-599 Mollstrasse 1 | E-Mail : D-10178 Berlin | DFN-Mail : G=Stephan;S=Grund;O=ISST;P=FHG;A=D400;C=de

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:45 CDT