Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

OVALDI 5.10.1 SelinuxBooleanProbe build issue

Help
Panos
2012-02-10
2013-06-12
  • Panos
    Panos
    2012-02-10

    Hello,

    I am trying to install ovaldi-5.10.1 on a Ubuntu 11-32bit. I have installed all dependencies. I am still seeing

    -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt -lldap -lblkid -lapt-pkg -o Release/ovaldi
    ../../src/probes/linux/SelinuxBooleanProbe.o: In function `SelinuxBooleanProbe::SelinuxBooleanProbe()':
    SelinuxBooleanProbe.cpp:(.text+0x6d): undefined reference to `security_load_booleans'
    ../../src/probes/linux/SelinuxBooleanProbe.o: In function `(anonymous namespace)::GetBooleansByName(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, ObjectEntity*, std::vector<Item*, std::allocator<Item*> >*)':
    SelinuxBooleanProbe.cpp:(.text+0x4e4): undefined reference to `security_get_boolean_active'
    SelinuxBooleanProbe.cpp:(.text+0x4f2): undefined reference to `security_get_boolean_pending'
    ../../src/probes/linux/SelinuxBooleanProbe.o: In function `SelinuxBooleanProbe::CollectItems(Object*)':
    SelinuxBooleanProbe.cpp:(.text+0x11c6): undefined reference to `security_get_boolean_names'
    ../../src/probes/linux/SelinuxSecurityContextProbe.o: In function `(anonymous namespace)::ContextGuard::~ContextGuard()':
    SelinuxSecurityContextProbe.cpp:(.text+0x13): undefined reference to `context_free'
    ../../src/probes/linux/SelinuxSecurityContextProbe.o: In function `(anonymous namespace)::SecurityContextGuard::~SecurityContextGuard()':
    SelinuxSecurityContextProbe.cpp:(.text+0x29): undefined reference to `freecon'
    ../../src/probes/linux/SelinuxSecurityContextProbe.o: In function `(anonymous namespace)::CompleteItem(std::vector<ItemEntity*, std::allocator<ItemEntity*> >*, context_s_t*, context_s_t*)':
    SelinuxSecurityContextProbe.cpp:(.text+0xdad): undefined reference to `context_user_get'
    SelinuxSecurityContextProbe.cpp:(.text+0xee9): undefined reference to `context_role_get'
    SelinuxSecurityContextProbe.cpp:(.text+0x1025): undefined reference to `context_type_get'
    SelinuxSecurityContextProbe.cpp:(.text+0x1142): undefined reference to `context_range_get'
    SelinuxSecurityContextProbe.cpp:(.text+0x1bf5): undefined reference to `context_range_get'
    ../../src/probes/linux/SelinuxSecurityContextProbe.o: In function `(anonymous namespace)::CompleteFileItem(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    SelinuxSecurityContextProbe.cpp:(.text+0x3599): undefined reference to `getfilecon'
    SelinuxSecurityContextProbe.cpp:(.text+0x3698): undefined reference to `getfilecon_raw'
    SelinuxSecurityContextProbe.cpp:(.text+0x37b5): undefined reference to `context_new'
    SelinuxSecurityContextProbe.cpp:(.text+0x395b): undefined reference to `context_new'
    SelinuxSecurityContextProbe.cpp:(.text+0x3b15): undefined reference to `context_free'
    SelinuxSecurityContextProbe.cpp:(.text+0x3b28): undefined reference to `context_free'
    SelinuxSecurityContextProbe.cpp:(.text+0x3b3b): undefined reference to `freecon'
    SelinuxSecurityContextProbe.cpp:(.text+0x3b4e): undefined reference to `freecon'
    ../../src/probes/linux/SelinuxSecurityContextProbe.o: In function `(anonymous namespace)::CompletePidItem(std::vector<ItemEntity*, std::allocator<ItemEntity*> >*, int)':
    SelinuxSecurityContextProbe.cpp:(.text+0x41e6): undefined reference to `getpidcon'
    SelinuxSecurityContextProbe.cpp:(.text+0x429e): undefined reference to `getpidcon_raw'
    SelinuxSecurityContextProbe.cpp:(.text+0x4356): undefined reference to `context_new'
    SelinuxSecurityContextProbe.cpp:(.text+0x44f0): undefined reference to `context_new'
    SelinuxSecurityContextProbe.cpp:(.text+0x4693): undefined reference to `context_free'
    SelinuxSecurityContextProbe.cpp:(.text+0x46a3): undefined reference to `context_free'
    SelinuxSecurityContextProbe.cpp:(.text+0x46b3): undefined reference to `freecon'
    SelinuxSecurityContextProbe.cpp:(.text+0x46c7): undefined reference to `freecon'
    collect2: ld returned 1 exit status

    But my ../../src/probes/linux/SelinuxBooleanProbe.cpp has the #include <memory> in it.
    Any ideas on how to fix it?

    Thank you,
    PK

     
  • Panos
    Panos
    2012-02-10

    I was able to fix it after rsandeep's answer in another post.

    Just for completeness, in order to fix it I added -lselinux in the LIBS in my make file. So it became something like

    [...]
    else ifneq (${PACKAGE_DPKG}, )
        LIBS += -lapt-pkg -lselinux
    [...]
    

    Note that I had commented out the PACKAGE_RPM definition because it was causing other errors. So, I added -lselinux in the LIBS definition under the PACKAGE_DPKG else ifneq.

    PK