Ethereal-users: Re: [ethereal-users] compilation prob.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Tue, 19 Sep 2000 07:14:33 -0700
On Tue, Sep 19, 2000 at 09:57:32AM -0400, Paul Mitchell wrote:
> sh-2.04$ ls -l /usr/local/include/net/if.h
> ls: /usr/local/include/net/if.h: Permission denied
> sh-2.04$ cd /usr/local/include
> sh-2.04$ ls -l | grep net
> drwxr-x---   2 root     Other         512 Sep 15 15:36 net/
> 
> BINGO!! 

Yup, that'll potentially cause problems compiling any program that

	1) includes <net/if.h>

and

	2) includes header files from "/usr/local/include" and thus is
	   compiled with "-I/usr/local/include".

In the case of Ethereal, the configure script was looking for
<net/if.h>, and its test program was probably trying to compile a
program that included <net/if.h> and compiled it with
"/usr/local/include" (when we check for header files, we check for them
in "/usr/local/include" as well as the standard include directory, as,
at least in some cases, the header file might be part of a package
installed under "/usr/local", e.g. libpcap, libz, etc.).

That compile failed, but *not* because the header file didn't exist;
instead, it failed because it was unreadable, but autoconf scripts don't
check *why* the compile of such a test program fails, they just check
whether it succeeded or failed, so it didn't report that it failed for a
reason indicating that there was something wrong with the system.  (I
assume GCC didn't just try "/usr/include/net.h" after it failed to open
"/usr/local/include/net.h".  When I tried it on my home machine, with
GCC 2.7.2.3, it warned

	bar.c:1: warning: Header file /usr/local/include/net/if.h
	    exists, but is not readable

but drove on and used "/usr/include/net/if.h" instead.)

"/usr/local/include/net" needs to have public r and x permission.