Amit,

Just running "make linux" assumes that your already have all the
correct development packages in place in your environment. The error
your make bombs out on says that the main() function in netcat.c makes
reference to an object (probably a function) called "res_init".
However it expects you to have a header file that defines what this
function looks like.  Googling indicates it is to do with the name
resolver package.

I thought I would do a "sudo apt-get source netcat" myself (on
Ubuntu).  I got  the same error. I found that /usr/include/resolv.h
defines res_init so a quick hack to add "#include <resolv.h>" to
netcat.c and "make linux" resulted in a compiled and linked "nc" which
is all good. So it seems that the supplied source package for ubuntu
is  either broken or I am not making it correctly.   I guess I should
be bothered and submit a bug report .... (or maybe you can Amit - if
you are using Ubuntu that is!)

Martin




On 4/1/07, Amit <[EMAIL PROTECTED]> wrote:

Hello group,

I will appreciate it if you could give me insight in my problem:

I did download the netcat and untar it. However, when I run "make
linux" I get the following error:

netcat.c: In function 'doexec':
netcat.c:586: warning: incompatible implicit declaration of built-in
function 'execl'
/tmp/cc1BHXB9.o: In function `gethostpoop':
netcat.c:(.text+0x1217): warning: Using 'gethostbyaddr' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
netcat.c:(.text+0x1138): warning: Using 'gethostbyname' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
/tmp/cc1BHXB9.o: In function `getportpoop':
netcat.c:(.text+0x39a): warning: Using 'getservbyname' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
netcat.c:(.text+0x2f7): warning: Using 'getservbyport' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
/tmp/cc1BHXB9.o: In function `main':
netcat.c:(.text+0x1914): undefined reference to `res_init'
collect2: ld returned 1 exit status
make[1]: *** [nc] Error 1
make[1]: Leaving directory `/home/ramsin/sec/nc'
make: *** [linux] Error 2


Your help will be appreciated.

amit

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html



--
Regards, Martin

Martin Visser
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to