SUMMARY --- C Problem

From: Kevin W. Thomas (
Date: Fri Oct 26 1990 - 12:51:21 CDT

Recently, I asked the following:

>I just upgraded a 3/280 to a SparcServer 380, and have immediately run into
>a fairly serious problem. C programs compiled on the 4/380 fail when run
>on a SparcStation 1+. Sample output is below:
>nsslsun% cd /export/common
>nsslsun% head -1 /etc/motd
>SunOS Release 4.1 (nsslsun) #3: Thu Oct 18 23:50:03 CDT 1990
>nsslsun% cat test.c
> printf("hello, world\n");
> exit(0);
>nsslsun% cc test.c
>nsslsun% a.out
>hello, world
>nsslsun% rlogin tinman
>tinman% head -1 /etc/motd
>SunOS Release 4.0.3c (tinman) #3: Fri Oct 12 15:43:17 CDT 1990
>tinman% cd /export/common
>tinman% a.out
> warning: /usr/lib/ has older revision than expected 5
> call to undefined procedure start_float from 0x4070
>Both workstations have fortran 1.3.1 on them. Fortran programs get the
>warning message, but at least they seem to run.
>Anyone have any ideas?
> Kevin W. Thomas

I received many answers. The concensus is that I either need to upgrade
"tinman" to 4.1, or compile programs on "tinman". I've decided to compile
things on "tinman" now, and upgrade later.

I've included one response below, which seems to summarize what I learned.

>executables are upward compatible only, not downward compatible.
>your 4/380 is running 4.1; your ss-1 is running 4.0.3C. if you
>upgrade the ss-1 to 4.1, then your problem will go away.
>start_float() is part of the 4.1 c initialization; it's not in
>4.0.3. since executables are dynamically linked with,
>the linker just expects to find start_float() at run time in
>you can *try* to get around this by linking things statically
>(use the -Bstatic flag) but there is still no guarantee it will
>run correctly. linking statically, you will bind in the 4.1 startup
>sequence, but there are still system calls that work differently
>and may produce surprising results.
>in general: only move executables to higher-numbered OS releases.
>--hal stern
> sun microsystems
> northeast area consulting group

I find it someone disturbing that Hal says that there is no guarantee
with static links. For non-kernel related programs, I would hope static
links would work, but I'm not going to test his answer.

Thanks go to the following people for their replies:

"Dr Gareth J. Barker" <>
Kerien Fitzpatrick <>
Michael S. Maiten <> (Doug A. Chan) (Casper H.S. Dik) (Claude Scarpelli)
dagobah!mis@uunet.UU.NET (Mark Seiden) (Daniel Strick) (Frank P. Bresz)
halstern@Sun.COM (Hal Stern - Consultant) (Phil Hammar) (John Brownie) (mark kraitchman) (Mark Wiederspahn) (Mitch Baltuch) (Scott Paisley) (Per Hedeland) (Peter J. Welcher)
proton! (Michael Baumann) (Sandeep Varma)
vanandel@stout.atd.ucar.EDU (Joe Van Andel) (Ron Vasey) (Benny Yih)

        Kevin W. Thomas

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:05:59 CDT