[comp.windows.x] can't make libXt.a

rusty@GARNET.BERKELEY.EDU (01/05/90)

VERSION:
    R4

CLIENT MACHINE and OPERATING SYSTEM:

sparcstation 1, sunos 4.0.3c

DISPLAY TYPE:

cg6

WINDOW MANAGER:
    [e.g. twm, gwm, tekwm, olwm, mwm, ...]

AREA:

compiling library Xt

SYNOPSIS:

can't make libXt.a

DESCRIPTION:

% make World
...
making all in ./lib/Xt...
rm -f ActionHook.o shared/ActionHook.o
cc -pic -c -DSHAREDCODE -DSUNSHLIB -O   -I../../.     -DINCLUDE_ALLOCA_H   ActionHook.c
...
mv Core.o shared/Core.o
cc -c -DSUNSHLIB -O   -I../../.     -DINCLUDE_ALLOCA_H   Core.c
make: Fatal error: Don't know how to make target `stdarg.h'
Current working directory /grunt_a/x11r4/mit/lib/Xt

% grep stdarg Makefile
Create.o: ResourceI.h EventI.h VarargsI.h stdarg.h StringDefs.h Shell.h
Resources.o: ResourceI.h EventI.h VarargsI.h stdarg.h Shell.h ShellP.h
VarCreate.o: ../.././X11/Shell.h VarargsI.h stdarg.h
VarGet.o: stdarg.h
Varargs.o: stdarg.h

REPEAT BY:

Diffs between original site.def and mine:

89a90,96
> #define BinDir			/tuna_e/x11r4/bin
> #define LibDir			/tuna_e/x11r4/lib
> #define UsrLibDir		/tuna_e/x11r4/lib
> #define LintlibDir		/tuna_e/x11r4/lib/lint
> #define IncRoot			/tuna_e/x11r4/include
> #define XdmDir			/usr/adm/xdm
> #define ManDirectoryRoot	/tuna_a/x11r4/man
102c109
< #define HasGcc NO
---
> #define HasGcc YES
108c115
< #define CcCmd gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -fwritable-strings -traditional
---
> #define CcCmd /tuna_e/gnu/bin/gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -fwritable-strings -traditional
110c117
< #define CcCmd gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return 
---
> #define CcCmd /tuna_e/gnu/bin/gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return 

Diffs between original sun.cf and mine:

11c11
< #define HasSaberC	  YES		/* for machines that have it */
---
> #define HasSaberC	  NO		/* for machines that have it */
15c15
< /* #define HasGcc YES */	/* VERY USEFUL for server on Sun3 */
---
> #define HasGcc YES	/* VERY USEFUL for server on Sun3 */


SAMPLE FIX:
    [preferred, but not necessary.  Please send context diffs (diff -c -b)]

jac@muslix.llnl.gov (James Crotinger) (01/05/90)

  What is SaberC? Since this was listed as YES by default in sun.cf, 
I did not change it. However, having only worked with Suns for a few
months, I've never heard of it. Does it matter in compiling the core
distribution?

  Jim

earle@POSEUR.JPL.NASA.GOV (Greg Earle - Sun JPL on-site Software Support) (01/05/90)

Your diffs showed that you chose to use gcc.
stdarg.h comes with the gcc 1.36 distribution, and
it gets installed into the /usr/{local/}lib/gcc-include
directory when gcc is installed.

Looks like pilot error in your gcc installation.

--


-- 
	Greg Earle
	Sun Microsystems, Inc. - JPL on-site Software Support
	earle@poseur.JPL.NASA.GOV	(direct)
	earle@Sun.COM			(indirect)

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/05/90)

    make: Fatal error: Don't know how to make target `stdarg.h'

You should have gotten an earlier complaint from makedepend about not
finding stdarg.h.

Why it didn't find stdarg.h:

My guess is that your gcc include files are in a different place than
makedepend expects.  makedepend tries to find them in
	/usr/local/lib/gcc-include
If yours are in a different place, go edit line 197 of util/makedepend/main.c.
(Yes, we know this should be configurable; it got fixed too late in the cycle.)
Rebuild makedepend, try running "make depend" in the lib/Xt directory again,
and see if it stops complaining.

Why it even tried to find stdarg.h:

Support for using multiple compilers is imperfect. (You're using cc for
the libraries, to make them shareable, and gcc for the rest.)  makedepend
inherits its attributes from whatever compiler is used to build it; in
this case, gcc.  Those attributes are then applied when building all
dependencies, even for directories that will be using a different compiler.
gcc defines __STDC__, which means dependencies (e.g. the varargs stuff in
Xt) will get done differently than for cc.  Normally this shouldn't be a
problem, since typically only system include files are involved, and they
rarely change.

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/05/90)

    What is SaberC?

"Saber-C is an interpreter-based programming environment for the C language".
It's simply mahvelous for debugging; our toolkit people use it all the time.

    Does it matter in compiling the core distribution?

No, it simply adds some stuff to the Makefiles that Saber can use for loading.

rusty@GARNET.BERKELEY.EDU (01/06/90)

   Date: Fri, 5 Jan 90 04:35:56 PST
   From: earle@poseur.jpl.nasa.gov (Greg Earle - Sun JPL on-site Software Support)
   To: rusty@garnet.berkeley.edu
   Subject: Re: can't make libXt.a
   Newsgroups: comp.windows.x
   Organization: Sun Microsystems - JPL on-site Software Support
   Cc: xpert@athena.MIT.EDU

   Your diffs showed that you chose to use gcc.  stdarg.h comes with
   the gcc 1.36 distribution, and it gets installed into the
   /usr/{local/}lib/gcc-include directory when gcc is installed.

   Looks like pilot error in your gcc installation.

WRONG.

rusty@GARNET.BERKELEY.EDU (01/06/90)

Thanks.  Your explanation and fix is more reasonable than the stupid
one from Greg Earle.  What I am trying now in site.def is

#if HasGcc
#define DependCmd $(DEPENDSRC)/makedepend -I/tuna_e/gnu/lib/gcc-include
#endif

The reason I am so hard on Greg Earle is because (now watch my lips):

	Software vendors should not assume that non-standard (e.g.,
	public domain) software is installed in any "standard" place.

Likewise, they should not require add-on software to be installed in a
particular place.  X11r4 suffers from this; for example this comment
at the top of site.def

   We strongly recommend that you don't change the installation directories
   and just use symbolic links if you want things to be installed on a
   different partition.  For example,

       # cd directory_containing_X_distribution
       # make World
       # mkdir /otherdisk/X
       # foreach i (bin lib include)
       >     mkdir /otherdisk/X/$i
       >     ln -s /otherdisk/X/$i /usr/$i/X11
       > end
       # make install

should not be there.  Not everyone wants to or even has the ability to
make symbolic links into /usr.  (For example, they may be nfs mounting
X from somewhere on their diskless workstation and the sysadmin for
their fileserver won't make the symbolic links for them.)  The X
distribution should (but doesn't) work without these symbolic links.
(In case you're wondering why just run something like "find
x11r4_src_dir/mit \( -name Imakefile -o -name '*.c' -o -name '*.h'\)
-a grep /usr {} \; -a -print".)

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/06/90)

    X11r4 suffers from this; for example this comment
    at the top of site.def ... should not be there.

I disagree that it should be removed.  It is a recommendation, not a
requirement.  One of the reasons it's recommended is because that's the way
it's been thoroughly tested.  The X distribution now has thousands of possible
different configurations, and we can't possibly test them all.  I will agree
that it shouldn't be a requirement.  If we have been imperfect in our support
of your configuration desires, perhaps you will forgive us.

david@ics.ics.COM (David B. Lewis) (01/06/90)

>What is SaberC? Since this was listed as YES by default in sun.cf, 
>I did not change it. However, having only worked with Suns for a few
>months, I've never heard of it. Does it matter in compiling the core
>distribution?


Saber-C is one of the most useful tools we've ever used. It's a source-level
debugger.  It's particularly helpful in finding bugs in huge distributions
such as XView or OSF/Motif, and it's saved our collective derriers on more
than one occasion. 

Saber is at 617-876-7636.

Disclaimer: I'm just a very satisfied customer.

David B. Lewis  david@ics.com  david%ics.UUCP@bu.edu  ...!uunet!ics.com!david

"Smuggling -- it's not just a job, it's an adventure!"