Menu

Building ovaldi 5.10.1 on Ubuntu 12.04

Help
2014-03-27
2014-03-28
  • Oriol Soriano

    Oriol Soriano - 2014-03-27

    Hi,
    Im trying to build ovaldi 5.10.1 (build 6) on Ubuntu 12.04 32 bits.

    First of all, I'd like to thank the authors of the project; having an oval interpreter at my disposal is a huge leap forward in the project im currently working on now. Great job!
    Then, thanks to the authors of the build notes; they got me through some errors i was stuck at (http://sourceforge.net/apps/mediawiki/ovaldi/index.php?title=Build_notes).
    And finally, thanks to the other users that, just like me now, have been encountering errors while building ovaldi and decided to share their experience with the community (yes, Im also collecting the errors I've been going though).

    Now, Im currently stuck at this error:
    g++ -Wall -DLINUX -I/usr/local/include -I/usr/include -I../../src/linux -I../../src -I../../src/probes/unix -I../../src/probes/linux -I../../src/probes/independent -I../../src/unix -DPACKAGE_DPKG -O -c -o ../../src/probes/linux/DPKGInfoProbe.o ../../src/probes/linux/DPKGInfoProbe.cpp
    ../../src/probes/linux/DPKGInfoProbe.cpp: In member function âvirtual ItemVector DPKGInfoProbe::CollectItems(Object)â:
    ../../src/probes/linux/DPKGInfoProbe.cpp:96:50: error: base operand of â->â has non-pointer type âVariableValueVector {aka std::vector<VariableValue>}â
    ../../src/probes/linux/DPKGInfoProbe.cpp:96:103: error: base operand of â->â has non-pointer type âVariableValueVector {aka std::vector<VariableValue>}â
    ../../src/probes/linux/DPKGInfoProbe.cpp:100:61: error: base operand of â->â has non-pointer type âVariableValueâ
    ../../src/probes/linux/DPKGInfoProbe.cpp: In member function âStringVector DPKGInfoProbe::GetDPKGNames(ObjectEntity)â:
    ../../src/probes/linux/DPKGInfoProbe.cpp:175:49: error: base operand of â->â has non-pointer type âVariableValueVector {aka std::vector<VariableValue>}â
    ../../src/probes/linux/DPKGInfoProbe.cpp:175:102: error: base operand of â->â has non-pointer type âVariableValueVector {aka std::vector<VariableValue>}â
    ../../src/probes/linux/DPKGInfoProbe.cpp:177:36: error: base operand of â->â has non-pointer type âVariableValueâ
    ../../src/probes/linux/DPKGInfoProbe.cpp:178:36: error: base operand of â->â has non-pointer type âVariableValueâ
    ../../src/probes/linux/DPKGInfoProbe.cpp:183:57: warning: the address of âallNamesâ will always evaluate as âtrueâ [-Waddress]
    ../../src/probes/linux/DPKGInfoProbe.cpp: In member function âStringVector DPKGInfoProbe::GetMatchingDPKGNames(std::string, bool)â:
    ../../src/probes/linux/DPKGInfoProbe.cpp:229:61: warning: deprecated conversion from string constant to âchar
    â [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp:230:68: warning: deprecated conversion from string constant to âcharâ [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp: In member function âbool DPKGInfoProbe::DPKGExists(std::string)â:
    ../../src/probes/linux/DPKGInfoProbe.cpp:269:74: warning: deprecated conversion from string constant to âchar
    â [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp:270:75: warning: deprecated conversion from string constant to âcharâ [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp: In member function âvoid DPKGInfoProbe::GetDPKGInfo(std::string, ItemVector
    )â:
    ../../src/probes/linux/DPKGInfoProbe.cpp:325:69: warning: deprecated conversion from string constant to âcharâ [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp:326:70: warning: deprecated conversion from string constant to âchar
    â [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp:349:63: warning: deprecated conversion from string constant to âcharâ [-Wwrite-strings]
    ../../src/probes/linux/DPKGInfoProbe.cpp:358:80: warning: deprecated conversion from string constant to âchar
    â [-Wwrite-strings]
    make: *** [../../src/probes/linux/DPKGInfoProbe.o] Error 1

    Any help/suggestion/ideas would be more than appreciated.

    Thanks,
    Oriol.

     

    Last edit: Oriol Soriano 2014-03-27
  • Oriol Soriano

    Oriol Soriano - 2014-03-28

    Apparently, there's an errror in this line (/src/probes/linux/DPKGInfoProbe.cpp:96):
    for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues().end(); iterator++) {

    Definitely c++ is not the language i feel most comfy with, so excuse me if i say something senseless; but:
    Shouldn't this: name->GetVarRef()->GetValues()->begin();
    be accessed like that? name->GetVarRef()->GetValues().begin();

    Again, any insight'd be appreciated; thanks!
    Oriol.

     

    Last edit: Oriol Soriano 2014-03-28
  • Michael Chisholm

    Yes, obviously :) So here's the story. The dpkg probe code is unmaintained, and we don't even have a debian system to test on, or even try to build it. Not long ago, I made changes in ovaldi to clean up memory leaks related to variable values, and it involved some internal API changes. Evidently it broke the dpkg probe, which I hadn't realized. But I can't fix it. Your only options at this point are to disable the probe or fix it yourself. To disable it, you'll need to edit the makefile and remove the dpkg check (e.g. comment out the PACKAGE_DPKG = $(shell ....) line). That should get you around that error.

    Andy

     

Log in to post a comment.