Rate This Document
Findability
Accuracy
Completeness
Readability

Common Problems in Software Package Rebuild

Table 1 lists common problems in software package rebuild and handling suggestions.

/opt is the tool installation directory. Replace it with the actual directory.

Table 1 Common problems in software package rebuild

Problem

Possible Causes

Handling Suggestions

The SO, static library, JAR, or binary files are missing.

SO, static library, JAR, or binary files cannot be automatically downloaded.

Manually download the SO, static library, JAR, or binary files to the /opt/DevKit/workspace/xx/porting/data directory (xx indicates the user name), and rebuild the software package.

NOTE:
  • You can view details in the software package rebuild report and perform operations as prompted.
  • If the SO, static library, or binary files are missing, obtain the corresponding files (decompress the downloaded RPM or DEB package to obtain the corresponding SO, static library, or binary files), save them to the /opt/DevKit/workspace/xx/porting/data directory (xx indicates the user name), and rebuild the software package.

There are x86-based SO, static library, or binary dependency files.

The architecture of the dependency files is incorrect.

Manually download the SO, static library, or binary files of the Arm architecture, replace the files with the same names in the /opt/DevKit/workspace/xx/porting/data directory (xx indicates the user name), and rebuild the software package.

NOTE:
  • You can view details in the software package rebuild report and perform operations as prompted.
  • Obtain the corresponding files of the Arm architecture (decompress the downloaded RPM or DEB package to obtain the corresponding SO, static library, or binary files) to replace the SO, static library, or binary files in the /opt/DevKit/workspace/xx/porting/data directory (xx indicates the user name). Then rebuild the software package.

Failed to download JAR files.

The network connection times out or the drive space is insufficient.

  • Check the network configuration, proxy configuration (see Configuring a Proxy), and the size of the /opt directory.
  • Manually download the JAR files to the /opt/DevKit/workspace/xx/porting/data directory (xx indicates the user name) and rebuild the software package.
    NOTE:

    You can view the names and download paths of the JAR files to be manually downloaded in the software package rebuild report.

Failed to analyze the SO, JAR, static library, or binary files in an RPM or DEB package.

The drive space is insufficient, the RPM/DEB package format is incorrect, or the software package does not need to be ported.

Check the size of the /opt directory, check whether the RPM/DEB package is complete and in correct format, or use the Porting Advisor to check whether the software package needs to be ported.

Failed to extract and analyze the control file or spec file.

The drive space is insufficient or the RPM or DEB package format is incorrect.

Check the size of the /opt directory or check whether the RPM/DEB package is complete and in correct format.

Failed to rebuild the software package.

Files failed to be replaced (the jar command is missing or the JAR package has embedded JAR packages), the workspace rpmbuilder is not cleared, or an error occurs during RPM/DEB package analysis.

  • If the jar command is missing, install the JDK.
    NOTE:

    Software package rebuild does not support the JAR package with embedded JAR packages.

  • (For RPM packages) Run the following commands to clear the workspace and then perform software package rebuild again:
    1
    2
    3
    cd  /opt/DevKit/workspace/devadmin/porting/refactoring
    rm -rf rpmbuilder
    mkdir -pv ./rpmbuilder/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
    
  • (For DEB packages) Run the following command to clear the workspace and then perform software package rebuild again:
    1
    rm -rf /opt/DevKit/workspace/devadmin/porting/tmp_path
    

Failed to rebuild the software package due to the lack of rpmrebuild.

rpmrebuild is not installed on the server.

  • To install rpmrebuild, download and upload the rpmrebuild component to the server, and run the following command to install it:
    1
    rpm -ivh xxx.rpm
    
  • To install rpmbuild, run the following commands to check for the rpmbuild package in the yum source and install rpmbuild:
    1
    2
    yum list | grep rpm-build
    yum install -y rpm-build
    
  • If the yum source does not contain the rpmbuild RPM package, download the corresponding component, upload it to the server, and run the following command to install it:
    1
    rpm -ivh xxx.rpm