Solved

about NetCat

Posted on 2007-04-01
7
341 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
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…

828 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