hello list, and Luca

i'm running fedora core 2 with kernel 2.6.8.1 compiled by myself, in a build
environment adapted for 2.6 only... and i get errors when compiling ntop.
see below how to reproduce them and how to patch them.

by default, fedora core 2, even if it comes with a 2.6 kernel, comes with
the 2.4 generation's include files.

this can be tested by looking into /usr/include/linux/version.h, which
contains:

#define UTS_RELEASE "2.4.20"
#define LINUX_VERSION_CODE 132116
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

while the 2.6.8.1 kernel has this version.h :
#define UTS_RELEASE "2.6.8.1"
#define LINUX_VERSION_CODE 132616
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))


this might lead to a number of incompatibilities for programs written for
the 2.4 kernel series includes which run under the 2.6 kernel, and i made
some alterations to the include files in /usr/include, all of them are links
to
the include files that come with the kernel. i've compiled apache 2.0.50,
squid 2.5stable6, and some other programs, and all are running without any
issues so far.

all issues with the compile process are with header files being moved
around.

i had to make a modification to the includes file list, the linux 2.6 kernel
doesnt include the file net/ethernet.h which i had to copy from the old
includes into the new one, to be able to compile programs.

these are the modified includes in /usr/include. I linked directly to the
include files in the kernel source tree:

acpi -> /usr/src/linux/include/acpi/
asm -> /usr/src/linux/include/asm-i386/
asm-generic -> /usr/src/linux/include/asm-generic/
linux -> /usr/src/linux/include/linux/
math-emu -> /usr/src/linux/include/math-emu/
media -> /usr/src/linux/include/media/
mtd -> /usr/src/linux/include/mtd/
net -> /usr/src/linux/include/net/
pcmcia -> /usr/src/linux/include/pcmcia/
rxrpc -> /usr/src/linux/include/rxrpc/
scsi -> /usr/src/linux/include/scsi/
sound -> /usr/src/linux/include/sound/
video -> /usr/src/linux/include/video/



i downloaded a fresh cvs source tree today, and the modifications for the
2.6 new includes which allow me to compile ntop on my machine are:

1)
in configure.in, and in a few other places (ntop.h)
net/if.h
should be for 2.6 (or should be added with a build environment test)
linux/if.h

2)
config.log:/usr/include/netinet/if_ether.h:62:24: net/if_arp.h: No such file
or directory
config.log:/usr/include/netinet/if_ether.h:62:24: net/if_arp.h: No such file
or directory

this is because if_arp.h is no longer in the net/ but in the linux/ section
too


3) in config.h
HAVE_NETINET_IF_ETHER_H
gets undefined by ./configure because the current header file
netinet/if_ether.h has a wrong include, net/if_arp.h instead of
linux/if_arp.h
 I edited that include file to correct it. (i'd better submit it to the
kernel discussion list too, as a FIXME )



after these tweaks ntop compiles cleanly and runs without issues, so far.

Luca, can you please add a test to the configure script to test which
headers is ntop being built with and adjust the build process accordingly ?

these header files might not be the only ones moved between 2.4 and 2.6, but
are the ones that gave me the most headaches.

Thankyou,
Adrian R.


_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to