4 Replies Latest reply: Dec 23, 2011 4:03 PM by flash RSS

SA with BitBake

Contributor
Currently Being Moderated

Originally published on 2011-12-15 03:15

 

How do I analyse my software when it's being built with BitBake? I'm trying to analyse a version of Linux kernel and the end result is that Coverity doesn't see any compilation commands and therefore doesn't analyse any files.

 

I understood that it should be possible to use Coverity with BitBake.

  • SA with BitBake
    flash Contributor
    Currently Being Moderated

    Originally published on 2011-12-23 16:03

    It's definitely possible; I implemented it a few years ago in 3.x/4.x, for a previous employer, and it went remarkably smoothly, especially compared to our earlier build system.  Details were confidential at the time, though the product is now open source, so I may be able to provide them.  But first I'd suggest checking your compiler configuration, which may be more relevant than the build system--also check if you're doing anything nonstandard, like distributed builds.

  • SA with BitBake
    Contributor
    Currently Being Moderated

    Originally published on 2011-12-27 01:13

    The issue seemed to mostly be caused by Bitbake clearing the environment variables. I had to add a bunch of them to the whitelist and after that it worked (except for a few packages).

  • SA with BitBake
    Asya Kamsky Coverity Ninja
    Currently Being Moderated

    Originally published on 2011-12-28 13:17

    Tell BitBake to whitelist the following environment variables:

     

    LD_PRELOAD

    COVERITY_BIN

    COVERITY_BUILD_INVOCATION_ID

    COVERITY_COMPILER_PATH_MISMATCH_FILE

    COVERITY_DEBUG

    COVERITY_EMIT

    COVERITY_IS_COMPILER

    COVERITY_IS_COMPILER_DESCENDANT

    COVERITY_TOP_PROCESS

    COVERITY_OUTPUT

    COVERITY_LD_PRELOAD

    COVERITY_LD_LIBRARY_PATH

    COVERITY_PATHLESS_CONFIGS_FILE

    COVERITY_PREV_XML_CATALOG_FILES

    COVERITY_SITE_CC

    COVERITY_TEMP

    COVERITY_TOP_CONFIG

    COVERITY_TOP_PROCESS

     

     

    There may be a few others - best way to tell may be to run your build with cov-build --debug flag and look for COVERITY_xxx environment variables in the build-log.txt file.

  • SA with BitBake
    Contributor
    Currently Being Moderated

    Originally published on 2012-01-09 00:35

    The list I got was

    'LD_PRELOAD',         'COVERITY_BIN',         'COVERITY_SITE_CC',
            'COVERITY_TEMP',
            'COVERITY_IS_COMPILER',
            'COVERITY_TOP_PROCESS',
            'COVERITY_IS_COMPILER_DESCENDANT',
            'COVERITY_OUTPUT',
            'COVERITY_BUILD_INVOCATION_ID',
            'COVERITY_COMPILER_PATH_MISMATCH_FILE',
            'COVERITY_LD_PRELOAD',
            'COVERITY_LD_PRELOAD_32',
            'COVERITY_LD_PRELOAD_64'
            'COVERITY_PATHLESS_CONFIGS_FILE',
            'COVERITY_PREV_XML_CATALOG_FILES',
            'COVERITY_START_CWD',
            'COVERITY_TOP_CONFIG',
            'LD_PRELOAD_32',
            'LD_PRELOAD_64',
            'PLATFORM',
            'COVERITY_USE_DOLLAR_PLATFORM'

     

    so it looks like I need to add a few more...

  • SA with BitBake
    Contributor
    Currently Being Moderated

    Originally published on 2012-01-09 00:38

    More specifically I was missing these:

    COVERITY_DEBUG,
    COVERITY_EMIT,
    COVERITY_LD_LIBRARY_PATH,
    COVERITY_TOP_PROCESS

More Like This

  • Retrieving data ...