 |
 |
Installing libpcap problem
|
 |
|
 |
|
Junior Member
Join Date: Nov 2002
Location: Sweden
Status:
Offline
|
|
Hi, I get this error message when I try to install libcap through fink on 10.4
nametoaddr.c:394: error: conflicting types for `ether_hostton'
/usr/include/net/ethernet.h:113: error: previous declaration of `ether_hostton'
make: *** [nametoaddr.o] Error 1
### execution of make failed, exit code 2
Failed: compiling libpcap-0.8.1-1 failed
any ideas?
Thanks
|
PowerMac G5 Dual 2.0GHz, 1.5GB RAM & MacBook 1.83, 1.25GB RAM
OS X 10.5.2
www.blurimage.com
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2001
Location: Internet
Status:
Offline
|
|
Originally Posted by callefoss
Hi, I get this error message when I try to install libcap through fink on 10.4
nametoaddr.c:394: error: conflicting types for `ether_hostton'
/usr/include/net/ethernet.h:113: error: previous declaration of `ether_hostton'
make: *** [nametoaddr.o] Error 1
### execution of make failed, exit code 2
Failed: compiling libpcap-0.8.1-1 failed
any ideas?
Thanks
Were you trying to install OpenCV or something?
|

MacBook Air 11" 1.6Ghz 4GB 128GB Backlit Keyboard, 4S, iPad 2
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jun 2005
Status:
Offline
|
|
Hi there,
You need to modify the libpcap source file (ie. nametoaddr.c) so it matches the /usr/include/net/ethernet.h in Mac OSX.
Basically change /libpcap-0.8.3/nametoaddr.c (in the source file)
from:
extern int ether_hostton(char *, struct ether_addr *);
to:
extern int ether_hostton(const char *, struct ether_addr *);
This will fix the difference between the libpcap source and the Mac OSX definitions. After you have done that it should compile nicely.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Nov 2002
Location: Sweden
Status:
Offline
|
|
Thanks!
Actually what I did which worked (I skipped fink by the way) was to remove the file /usr/include/net/ethernet.h (it is backed up) and then libpcap compiled fine. WHat exactly is that file doing? Do I really need it?
|
PowerMac G5 Dual 2.0GHz, 1.5GB RAM & MacBook 1.83, 1.25GB RAM
OS X 10.5.2
www.blurimage.com
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
It includes a bunch of constants related to ethernet, like packet structure, how long MAC-addresses are etc. You can read it yourself by opening it in Textedit or whatever. If it isn't included at build time, make probably assumes some defaults. If those are correct, it works.
Restore that file. Once libpcap is compiled, it doesn't care what happens with its include headers - those are only read at compile time - and other apps might need that file to compile correctly.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jun 2005
Status:
Offline
|
|
hi I also have some problems to install the libcap on Tiger, but don't have a clue wher the problem comes from, I tried to change the "nametoaddr.c" but the the problem seems to be the same.
here is what I've done (as I'm not a UNIX expert at all):
1. untar the libcap 0.8.1 on my desktop
2. cd path to libcap folder
3. ./configure
4. make--> and I have the following message at the end:
Code:
./nametoaddr.c:398: error: parse error before '*' token
./nametoaddr.c: In function 'ether_hostton':
./nametoaddr.c:400: error: number of arguments doesn't match prototype
/usr/include/net/ethernet.h:113: error: prototype declaration
./nametoaddr.c:405: error: 'name' undeclared (first use in this function)
./nametoaddr.c:405: error: (Each undeclared identifier is reported only once
./nametoaddr.c:405: error: for each function it appears in.)
./nametoaddr.c:410: warning: return makes integer from pointer without a cast
make: *** [nametoaddr.o] Error 1
5. make install and then I have the following message:
Code:
[ -d /usr/local/lib ] || \
(mkdir -p /usr/local/lib; chmod 755 /usr/local/lib)
/usr/bin/install -c -m 644 libpcap.a /usr/local/lib/libpcap.a
install: libpcap.a: No such file or directory
make: *** [install] Error 71
thanks in advance if you have an idea...
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|