Main Content

Requirements for Project Creation from Build Systems

For automatic project creation from build systems, your build commands or makefiles must meet certain requirements.

Compiler Requirements

Build Command Requirements

  • Your build command must run to completion without any user interaction.

  • In Linux®, only UNIX® shell (sh) commands must be used. If your build uses advanced commands such as commands supported only by bash, tcsh or zsh, Polyspace cannot trace your build.

    In Windows®, only DOS commands must be used. If your build uses advanced commands such as commands supported only by PowerShell or Cygwin, Polyspace cannot trace your build. To see if Polyspace supports your build command, run the command from cmd.exe in Windows. For more information, see Check If Polyspace Supports Build Scripts.

  • Your build command must not contain lines where several sources are compiled in a single line using wildcard characters, for instance:

    cl.exe *.c

  • If you use statically linked libraries, Polyspace cannot trace your build. In Linux, you can install the full Linux Standard Base (LSB) package to allow dynamic linking. For example, on Debian® systems, install LSB with the command apt-get install lsb.

  • Your build command must not use aliases.

    The alias command is used in Linux to create an alternate name for commands. If your build command uses those alternate names, Polyspace cannot recognize them.

  • Your build process must not use the LD_PRELOAD mechanism.

  • Your build command must be executable completely on the current machine and must not require privileges of another user.

    If your build uses sudo to change user privileges or ssh to remotely log in to another machine, Polyspace cannot trace your build.

  • If your build command uses redirection with the > or | character, the redirection occurs after Polyspace traces the command. Therefore, Polyspace does not handle the redirection.

    For example, if your command occurs as

    command1 | command2
    And you enter
    polyspace-configure command1 | command2
    When tracing the build, Polyspace traces the first command only.

  • If the System Integrity Protection (SIP) feature is active on the operating system macOS El Capitan (10.11) or a later macOS version, you can use polyspace-configure to generate a project or build options file only if your build system supports the generation of a compilation database file that you pass to polyspace-configure. See Create Polyspace Options File from JSON Compilation Database. If your build system does not support the generation of compilation database file and the SIP feature is enabled, Polyspace cannot trace your build command. Alternatively, before tracing your build command, disable the SIP feature. You can reenable this feature after tracing the build command.

    Similar considerations apply to other security applications such as security-related products from CylanceProtect, Avecto and Tanium.

  • If your computer hibernates during the build process, Polyspace might not be able to trace your build.

  • When creating projects from build commands in the Polyspace User Interface, you might encounter errors such as libcurl.so.4: version 'CURL_OPENSSL_3' not found. In such cases, create the Polyspace project by using the command polyspace-configure in the system command line interface, using the build command as the argument. See polyspace-configure.

Note

Your environment variables are preserved when Polyspace traces your build command.

See Also

Related Topics