Solved

about NetCat

Posted on 2007-04-01
7
336 Views
Last Modified: 2008-02-01
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.

ak
0
Comment
Question by:akohan
  • 3
  • 3
7 Comments
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 18833334
Where did you read to enter "make linux"?
Just build & install the standard way (I just did, with no problems):

(in your case only) Delete the old source tree
untar the source
cd netcat-0.7.1
./configure (options of your choice: I entered ./configure --prefix=/usr --disable-nls --with-gnu-ld)
make
make install

In other words, follow the instructions in the file INSTALL.

I had no errors or warnings from make. You are talking about netcat-0.7.1 aren't you? You should not be root except probably for "make install".
0
 

Author Comment

by:akohan
ID: 18833373

Hi Duncan_roe:

Thanks but I have the documentation and it says I have to go with type of os name (linux, unix, windows and ...) I have. Also, in README file!

and it work. I did mdify the source file by adding/including "resolve.h" the problem got solved. I don't know maybe it is the version that is changed because I'm using NetCat110.gtz and now I have compiled it and works fine.

This is what I have in the README file:

# makefile for netcat, based off same ol' "generic makefile".
# Usually do "make systype" -- if your systype isn't defined, try "generic"
# or something else that most closely matches, see where it goes wrong, fix
# it, and MAIL THE DIFFS back to Hobbit.



Regards,
ak
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18835108
sounds like you have not installed the proper include files and libraries to compile netcat
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 34

Expert Comment

by:Duncan Roe
ID: 18835140
It seems to me you have some "unofficial" version of netcat - Google shows me 2 references to netcat110 - one in Japan and the other no country code but in a language other than English.
Glad to hear you fixed it anyway.
0
 

Author Comment

by:akohan
ID: 18839879

Thanks to all for your answer. However, I will appreciate Duncan_roe if he could give me the link which is formal.

thanks,
ak
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 50 total points
ID: 18842044
0
 

Author Comment

by:akohan
ID: 18845073


Thank you.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question