#83 Can't build 5.6.3 on Linux

Version 5.6
closed-wont-fix
5
2009-12-08
2009-10-27
josh
No

I'm getting the following errors when building ovaldi 5.6.3 on Linux 2.6.9:

g++ -c -Wall -O -DLINUX -DPACKAGE_RPM -I/usr/local/include -I/usr/include -I../../src/linux -I../../src -I../../src/probes/unix -I../../src/probes/linux -I../../src/probes/independent -o ./Release/obj/InterfaceProbe.obj ../../src/probes/unix/InterfaceProbe.cpp
../../src/probes/unix/InterfaceProbe.cpp: In member function `void InterfaceProbe::SetupHardwareTypes()':
../../src/probes/unix/InterfaceProbe.cpp:423: error: `ARPHRD_VOID' was not declared in this scope
../../src/probes/unix/InterfaceProbe.cpp:423: warning: unused variable 'ARPHRD_VOID'
../../src/probes/unix/InterfaceProbe.cpp: In member function `ItemEntityVector InterfaceProbe::ProcessFlags(short int)':
../../src/probes/unix/InterfaceProbe.cpp:472: error: `IFF_DYNAMIC' was not declared in this scope
../../src/probes/unix/InterfaceProbe.cpp:472: warning: unused variable 'IFF_DYNAMIC'

InterfaceProbe.cpp is referencing a constant that not defined in the standard net/if_arp.h, but in the kernel's version:

[linux]$ grep ARPHRD_VOID /usr/include/net/if_arp.h
[linux]$ grep ARPHRD_VOID /usr/include/linux/if_arp.h
#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */

This change was recently made here:

http://ovaldi.svn.sourceforge.net/viewvc/ovaldi/trunk/src/probes/unix/InterfaceProbe.cpp?view=diff&r1=406&r2=446&diff_format=h

Discussion

  • Jonathan Baker
    Jonathan Baker
    2009-10-28

    • assigned_to: nobody --> chishomi
     
  • josh
    josh
    2009-10-28

    Forgot to mention I'm building on Red Hat Enterprise Linux ES release 4 (Nahant Update 4)

     
  • Both constants exist in the standard headers in the version of redhat I'm developing under. Support for IFF_DYNAMIC could in theory simply be removed, since we don't have an enumeration for the flag values, so we're under no obligation to support any particular ones. ARPHRD_VOID is one of the enumerated values in unix-sc:EntityItemInterfaceType, so should be reported if possible. Maybe we'll have to add some preprocessor ugliness so it builds under other linux versions... :(

    $ cat /etc/redhat-release
    Red Hat Enterprise Linux Client release 5.2 (Tikanga)

    $ grep ARPHRD_VOID /usr/include/net/if_arp.h
    #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known. */

    $ grep IFF_DYNAMIC /usr/include/net/if.h
    IFF_DYNAMIC = 0x8000 /* Dialup device with changing addresses. */
    # define IFF_DYNAMIC IFF_DYNAMIC

     
  • josh
    josh
    2009-10-28

    It's working fine for me also with a more recent kernel (2.6.23.17) and distro

    $ cat /etc/redhat-release
    Fedora release 7 (Moonshine)

     
  • josh
    josh
    2009-10-29

    Ran into another compatibility issue having to do with the new Redhat/Fedora ELF symbol hash table format introduced in RHEL5 and Fedora 6 (see http://docs.fedoraproject.org/release-notes/fc6/en_US/sn-Devel.html\). The current ovaldi makefile does not specify the --hash-style=sysv flag, so if you build ovaldi on RHEL5/Fedora 6 or higher, but try to run it on RHEL4/Fedora 5 or earlier, the program will crash with a 'floating point exception'.

     
    • status: open --> closed-wont-fix
     
  • We have decided that since we don't officially support versions of RHEL earlier than 5, we won't specially modify the source code or makefile so that the interpreter builds and runs there.