Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiler Error - What Is Missing?

Status
Not open for further replies.

shuttle

Programmer
Mar 18, 2001
6
0
0
GB
I am trying to compile a program on SCO-UNIX 3.2v4.2. I have installed the development system but nothing else. The makefile looks like this:

Code:
LIBES = ulib.o ipclib.o parserlib.o idsclib.o
OBJS = srv.o init_proc.o sym_proc.o msg_proc.o file_proc.o host_proc.o 	mcn_proc.o req_proc.o get_proc.o data_proc.o err_proc.o 	to_ids.o from_ids.o ids_proc.o

INC = ./
C_INC = $(INC)defines.h $(INC)db_struct.h $(INC)globals.h 	$(INC)mcn_struct.h $(INC)ipc_def.h $(INC)net_struct.h 

srv : srv.c $(OBJS) $(LIBES) $(C_INC)
	cc -Zi -I ./ -o srv srv.c $(OBJS) $(LIBES) -lnsl_s -lsocket
	chmod 0750 srv


When I try to compile srv I get the following message:

# make srv
cc -Zi -I ./ -o srv srv.c srv.o init_proc.o sym_proc.o msg_proc.o file_proc.o host_proc.o mcn_proc.o req_proc.o get_proc.o data_proc.o err_proc.o to_ids.o from_ids.o ids_proc.o ulib.o ipclib.o parserlib.o idsclib.o -lnsl_s -lsocket
srv.c
defines.h(264) : warning C4005: 'DEBUG' : macro redefinition
defines.h(270) : warning C4005: 'DEBUG1' : macro redefinition
defines.h(276) : warning C4005: 'DEBUG2' : macro redefinition
defines.h(282) : warning C4005: 'DEBUG3' : macro redefinition
ld libnsl_s.a: can't find library libsocket.a
*** Error code 1

I think I am missing some libraries - nsl_s and socket. Can anyone advise me what I should do next?

Thanks.
 
Oh boy, 3.2v4.2 :)

I don't think you'd have libsocket etc. unless you have the networking version of 3.2v4.2, which is not a given- a lot of those were sold as what's now called Host versions- no networking capability other than ppp or slip. Strictly serial connections IOW and therefore missing just about everything to do with networking.

It's been a long, long time since I've done anything with 3.2v4.2, but I also recall that the develpoment system would have to be SCO's- although you could install gcc, you wouldn't have any of the libraries at all- but that's probably not what we're seeing here.


Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Well, the version of SCO-UNIX calls itself SCO Open Server. It certainly has network capability. The delevopment system is indeed SCO's.

Do the libraries normally come with the dev system or with packages like the TCP/IP Runtime System?

Alan.
 
Somebody with a better mory than I is going to have to confirm that, but I *think* the tcp/ip llibraries came separate from thedevelopment system.

But honestly my memory of this is so foggy- you need someone with a working 3.2v4.2 system who can tell you what libraries should be there.


Ah.. just found this


Quote:
In that version of the OS, the TCP/IP and NFS development systems were not included in the DS, but were bundled as separate packages. You have to either get the "TCP/IP Development Kit" and the "NFS Develoment" kit or consider the upgrade paths mentioned above. These will give you, for example, libsocket.
robertlipe@usa.net

There were always bundled DS's (ODT DS) corresponding to the same-time-release Unix, TCP, NFS, etc. DS's. Unfortunately, packaging was such that if you had standalone Unix + TCP, you needed standalone Unix DS, TCP DS. Couldn't use Unix + ODT DS, nor ODT + Unix DS (though the latter might actually have worked, I forget). So if you're trying to buy a DS now, you need to be aware of the many opportunities to buy the wrong thing.

From Bela Lubkin, minor editing by robertl Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Hi. The reason I have been plodding on with 3.2v4.2 is because this is a one-off job and I was hoping not to have to go to the expense of buying the OSR5 development software (not that I know how much it is - but I got the 3.2v4.2 dev kit for nothing when out IT dept was throwing it in the bin). Anyway, I have managed to find one of Caldera's software partners who have compiled the code for me on their OSR5 system (I paid them for an hour and a half's work) so hopefully that is the end of that.

Many thanks for all your help.

Cheers,

Alan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top