I am trying to run one C program which makes use of several header files. In the makefile we have set the following option:
LDFLAGS += -static
We want all the libraries to be linked statically.
But we are getting the following warnings when we try to make the file
midas-1.9.5/linux/lib/mfe.o femagic.o magic_box.o camacnul.o ../../midas-1.9.5/linux/lib/libmidas.a -lpthread -static -lm -lz -lutil -lnsl -pg
../../midas-1.9.5/linux/lib/libmidas.a(midas.o)(.text+0x1072b): In function `rpc_server_callback':
src/midas.c:12173: warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../../midas-1.9.5/linux/lib/libmidas.a(midas.o)(.text+0x3d79): In function `rpc_client_connect':
src/midas.c:8575: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
We thought that its just warning message and continue to run the program but its getting crashed. But when we commented out the LDFLAGS += -static statement in the Make file and then rerun the make and run the program then its working fine without any problem.
Does anyone have suggestions regarding this.
Thanks in advance,