Rate This Document
Findability
Accuracy
Completeness
Readability

Creating an Analysis Task

The tool analyzes the portability of software in C/C++/ASM/Fortran/Go/interpreted languages.

Prerequisites

  • You have logged in to the Kunpeng DevKit.
  • To include the porting workload in the porting report, click in the upper right corner of the page and set the Display Workload Estimation Result parameter in Scan Parameter Settings to Yes.
  • The build command in the build file in the uploaded source package is executed during the task running. Make sure that the content uploaded is the content to be analyzed and that there are no security issues to ensure normal operation of the server.
  • /opt is the default installation directory of the tool. The following uses this directory as an example. Replace it with the actual directory.
  • Scanning the source code by project can improve the accuracy of scan results.
  • On the WebUI, the source code porting function requires uploading the files or compressed package. In the IDE, the tool plugin can scan local projects. If the source code is included in a compressed package, decompress the package and select the decompressed folder.
  • The files imported to the filter list will be ignored during task execution and will not be displayed in the report. The filter list includes SO dependency libraries, JAR packages, and other dependency binary files. For details about how to filter dependencies, see Importing the Dependency Filter List.

Procedure

  1. Choose Source Code Porting from the navigation pane on the left and click to create a task.
  2. In the analysis task creation area, set task parameters.
    Figure 1 Source code porting
    Table 1 Source code porting parameters

    Parameter

    Description

    Task Name

    A task name is automatically generated by default, which can be modified as required.

    Source File Path

    Path for storing the local project or source file.

    Use either of the following methods:

    • Enter the absolute path to the source file.
    • Click Select Folder on the right and select the folder for storing the source file.

    If the path does not exist, manually create one and grant the read, write, and execute permissions to the devkit user.

    Source Code Type

    Select the type of the source code. The options are:

    • C/C++/ASM
    • Fortran
    • Go
    • Interpreted

      Python, Java, and Scala are supported.

    Target OS

    Version of the target OS. The options are:

    • BC-Linux 7.6/7.7
    • CentOS 7.4/7.5/7.6/7.7/8.0/8.1/8.2
    • CTyunOS 22.06
    • Deepin V15.2
    • Debian 10
    • EulerOS 2.8
    • iSoft 5.1
    • Kylin V10 SP1/SP2/SP3
    • KylinSecOS 3.4/3.5.2
    • LinxOS 6.0.90/6.0.100
    • NeoKylin V7U5/V7U6
    • openEuler 20.03
    • openEuler 20.03 SP1/SP2/SP3
    • openEuler 22.03
    • openEuler 22.03 SP1/SP2/SP3/SP4
    • openEuler 24.03 LTS/SP1
    • SUSE SLES 15.1
    • Ubuntu 18.04.x/20.04.x
    • UOS 20 SP1
    • uosEuler 20
    • uos20-1020e
    • uos20-1050e
    • uos20-1060e
    • More
    NOTE:

    Click More, upgrade the dependency dictionary according to the steps on the page, and view the updated OS list.

    Target OS Kernel Version

    Kernel version of the target OS.

    • BC-Linux 7.6: 4.19.25
    • BC-Linux 7.7: 4.19.25
    • CentOS 7.4: 4.11.0
    • CentOS 7.5: 4.14.0
    • CentOS 7.6: 4.14.0
    • CentOS 7.7: 4.18.0
    • CentOS 8.0: 4.18.0
    • CentOS 8.1: 4.18.0
    • CentOS 8.2: 4.18.0
    • CTyunOS 22.06: 4.19.90
    • Deepin V15.2: 4.19.34
    • Debian 10: 4.14.0
    • EulerOS 2.8: 4.19.36
    • iSoft 5.1: 4.19.90
    • Kylin V10 SP1: 4.19.90
    • Kylin V10 SP2: 4.19.90
    • Kylin V10 SP3: 4.19.90
    • KylinSecOS 3.4: 4.19.90
    • KylinSecOS 3.5.2: 5.10.0
    • LinxOS 6.0.90: 4.19.0
    • LinxOS 6.0.100: 4.19.0
    • NeoKylin V7U5: 4.14.0
    • NeoKylin V7U6: 4.14.0
    • openEuler 20.03: 4.19.90
    • openEuler 20.03 SP1: 4.19.90
    • openEuler 20.03 SP2: 4.19.90
    • openEuler 20.03 SP3: 4.19.90
    • openEuler 22.03: 5.10.0
    • openEuler 22.03 SP1: 5.10.0
    • openEuler 22.03 SP2: 5.10.0
    • openEuler 22.03 SP3: 5.10.0
    • openEuler 22.03 SP4: 5.10.0
    • openEuler 24.03 LTS: 6.6.0
    • openEuler 24.03 SP1: 6.6.0
    • SUSE SLES 15.1: 4.12.14
    • Ubuntu 18.04.x: 4.15.0
    • Ubuntu 20.04.x: 5.4.0
    • UOS 20 SP1: 4.19.0
    • UOS 20 Euler: 4.19.90
    • UOS 20-1020e: 4.19.90
    • UOS 20-1050e: 4.19.90
    • UOS 20-1060e: 4.19.90

    Compiler Version

    Version of the compiler.

    The default compiler versions of the target OSs are as follows:

    • BC-Linux 7.6: GCC 4.8.5
    • BC-Linux 7.7: GCC 4.8.5
    • CentOS 7.4: GCC 4.8.5
    • CentOS 7.5: GCC 4.8.5
    • CentOS 7.6: GCC 4.8.5
    • CentOS 7.7: GCC 4.8.5
    • CentOS 8.0: GCC 8.2.0
    • CentOS 8.1: GCC 8.3.0
    • CentOS 8.2: GCC 8.3.0
    • CTyunOS 22.06: GCC 7.3.0
    • Deepin 15.2: GCC 6.3.0
    • Debian 10: GCC 8.3.0
    • EulerOS 2.8: GCC 7.3.0
    • iSoft 5.1: GCC 7.3.0
    • Kylin V10 SP1: GCC 7.3.0
    • Kylin V10 SP2: GCC 7.3.0
    • Kylin V10 SP3: GCC 7.3.0
    • KylinSecOS 3.4: GCC 7.3.0
    • KylinSecOS 3.5.2: GCC 10.3.0
    • LinxOS 6.0.90: GCC 6.3.0
    • LinxOS 6.0.100: GCC 8.3.0
    • NeoKylin V7U5: GCC 4.8.5
    • NeoKylin V7U6: GCC 4.8.5
    • openEuler 20.03: BiSheng Compiler 2.5.0.1
    • openEuler 20.03 SP1: GCC 7.3.0
    • openEuler 20.03 SP2: GCC 7.3.0
    • openEuler 20.03 SP3: GCC 7.3.0
    • openEuler 22.03: BiSheng Compiler 2.5.0.1
    • openEuler 22.03 SP1: GCC 10.3.0
    • openEuler 22.03 SP2: GCC 10.3.0
    • openEuler 22.03 SP3: GCC 10.3.0
    • openEuler 22.03 SP4: GCC 10.3.0
    • openEuler 24.03 LTS: GCC 12.3.0
    • openEuler 24.03 SP1: GCC 12.3.0
    • SUSE SLES 15.1: GCC 7.4.0
    • Ubuntu 18.04.x: GCC 7.3.0
    • Ubuntu 20.04.x: GCC 9.3.0
    • UOS 20 SP1: GCC 8.3.0
    • UOS 20 Euler: GCC 7.3.0
    • UOS 20-1020e: GCC 7.3.0
    • UOS 20-1050e: GCC 7.3.0
    • UOS 20-1060e: GCC 7.3.0

    For C, C++, ASM, and Go source code, you can select from:

    • BiSheng Compiler 2.1.0/2.3.0/2.4.0/2.5.0/2.5.0.1/3.0.0/3.1.0/3.2.0/4.0.0/4.1.0/4.2.0
    • GCC 4.8.5/4.9.3/5.1.0/5.2.0/5.3.0/5.4.0/5.5.0/6.1.0/6.2.0/6.3.0/6.4.0/6.5.0/7.1.0/7.2.0/7.3.0/7.4.0/8.1.0/8.2.0/8.3.0/9.1.0/9.2.0/9.3.0/10.1.0/10.2.0/10.3.0/10.3.1/12.3.0
    • GCC for openEuler 2.3.7/2.3.8/3.0.1/3.0.2
    NOTE:
    • The C, C++, and ASM languages share the same compiler version with the Go language.
    • If both C/C++/ASM and Fortran source code types are selected, the same BiSheng Compiler and Flang versions are used.

    For Fortran source code, you can select from:

    • GFortran 7/8/9
    • FLANG 2.1.0/2.3.0/2.4.0/2.5.0/2.5.0.1/3.0.0/3.1.0/3.2.0/4.0.0/4.1.0/4.2.0

    Build Tool

    Build tool to be used. The options are:

    • make
    • CMake
    • automake
    • go
    • bazel
    NOTE:
    • The go option is available when only Go or both Go and Interpreted are selected for Source Code Type.
    • The bazel option is available when only C/C++/ASM or both C/C++/ASM and Interpreted are selected for Source Code Type.

      The Bazel build tool can identify only the compilation options in the BUILD and BUILD.bazel build files and the CPU options in the BUILD, BUILD.bazel, and MODULE.bazel build files.

    Compile Command

    Source code build command. The build tool Bazel does not support this parameter.

    The compile command varies according to the build tool configuration file. For details, see Identifying Compile Commands Using the Build Tool Configuration File.

    Custom x86 Macro

    Custom x86 macros.

    Use semicolons (;) to separate multiple macros.

    NOTE:

    If the glibc version is earlier than 2.28, the automatic translation of assembly files cannot be used. If you want to use this function, click View Installation Guide on the page and perform operations as prompted.

  3. Click Analyze.

    The task progress is displayed. After the analysis is complete, the Porting Report page is displayed.

    • To cancel an ongoing task, click the close button on the progress bar and click OK.
    • Multiple users can create analysis tasks concurrently. However, if the number of users exceeds 9, subsequent users may be placed in a queue.
    • If the task analysis fails or the evaluation result indicates that porting is not required, an empty report is generated.
    • The tool considers that a file does not need to be ported and thus does not scan the file by default if the path to the decompressed source code file contains only the following keywords, or the keywords prefixed with an underscore (_), followed by an underscore (_), or followed by a file name extension. You can view the files that are not scanned in the porting.log file.

      Keywords: PPC, PPC64, s390, s390x, powerpc, alpha, MIPS, itanium, WIN64, WIN32, BOOST_COMP_MSVC, arm, aarch64, sparc, sparc64

    • The analysis result may vary according to the environment, which is normal.
    • If the system displays a message indicating that the task times out, rectify the fault by following instructions in Task Timeout.