compiling and YP

Amy Swanson swanson at UXE.CSO.UIUC.EDU
Sat Oct 21 02:37:09 AEST 1989



	I am attempting to compile "notes" on our SGIs (both 4D/20s and
4D/240s) but have run into a snag.  Since we run Yellow Pages on all our
systems, I need to compile with the sun and bsd include files as well as
link with the sun and bsd libraries.  The include files are no big deal;  I
can alter the Makefile to use these.  It's the linking that's creating BIG
problems with me.  

	According to SGI docs, (from intro(3)) using a command like this:

	   cc -I/usr/include/sun -I/usr/include/bsd prog.c -lsun -lbsd

will tell the system to use the YP routines such as "getpwent" which under-
stands the "+" in the password entries.  But, how do I get the "-l" options
attached to the cc lines?  The Makefile that comes with notes uses the
internal rules for compiling the source code, creating the object files, and
then links the objects with flags provided in the Makefile.  So, as I under-
stand it, I would need to alter the internal rules for Make to get the code
compiled for use with YP.  

	Now, to complicate matters, I have actually manually compiled all the
source with the above syntax, and it still sees me as "Anonymous" unless I
place myself in /etc/passwd as a local entry (w/o the +).  That leaves the
"install" command as the culprit...

	Someone else is attempting to create an "installit" program to allow
users to install their own software in designated directories;  this program
uses "install" and is bombing out on the YP entries.  The only way we can see
to fix this is to get the source to "install" and recompile it using the
Yellow Pages stuff (sun and bsd include files and libraries).  So, two 
questions:

	1)  Does anyone have/know of a work-around for this?	

	2)  Why wasn't the source code on the SGIs complied to use the sun and 
	    bsd libraries automatically?  If you don't run YP, then the
	    default is to use the normal stuff anyway, so everyone would have
	    been happy!


*sigh*

Amy Swanson
SGI/Alliant Systems Administrator
NCSA - National Center for Supercomputing Applications
University of Illinois at Champaign-Urbana

email: amys at ncsa.uiuc.edu



More information about the Comp.sys.sgi mailing list