Kunpeng Porting Advisor User Guide 2.3.0
FAQs
Issue 01
Date 2021-12-31
HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2022. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd.
Trademarks and Permissions
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied.
Huawei Technologies Co., Ltd.
Address: Huawei Industrial Base Bantian, Longgang Shenzhen 518129
People's Republic of China Website: https://www.huawei.com Email: [email protected]
Contents
1 Failed to Log In to the Tool Using a Browser... 1
2 WARNING or FAIL Returned in the Software Package Integrity Verification...3
3 Common Software Package Rebuild Failures... 5
4 Common Issues of Dependency Dictionary Management...8
5 Common Issues in Software Porting Template Management...10
6 Failed to Install the Kunpeng Porting Advisor on Debian 10 (x86)...12
7 Common Upgrade Failures...14
8 File Scanning Permissions... 15
9 Failed to Install the Tool Because the OpenSSL Library Is Not Found... 16
10 Software Used with the Kunpeng Porting Advisor... 18
11 Different Scan Results on the Tool WebUI and CLI on EulerOS... 19
12 Failed to Install the Tool Due to an Nginx Compilation Error... 21
13 Failed to Install the Tool on a Container...22
14 "Set nginx systemctl failed" Displayed in Tool Installation... 23
15 Tool Installation Fails and the Message "symbol EVP_md2 version OPENSSL_1_1_0 not defined" Is Displayed... 24
16 Porting of Programs in go Language... 26
17 SO Library Dependency Dictionary Issues...27
18 Failed to Access the Tool Using a Public IP Address/Port...28
19 Reinstallation Failure... 29
20 Server Running Improperly Because Drive Space Was Consumed by the Memory Consistency Check... 30
21 Logic Judgment of Analysis Results...31
22 Handling Exceptions During Multi-task Concurrent Execution... 33
Kunpeng Porting Advisor User Guide
FAQs Contents
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. ii
23 The Tool Fails to Be Installed and a Message Is Displayed Indicating That the setfcal Command Is Missing...34 24 Yum Commands Cannot Be Executed During Dedicated Software Porting...35 25 Task Timed Out... 37 26 Failed to Compile Source Code After a Quick Fix Upon a Memory Consistency Check... 38
Kunpeng Porting Advisor User Guide
FAQs Contents
1 Failed to Log In to the Tool Using a Browser
Symptom
After https://Server IP address:Port No. (for example, https://10.254.206.190:8084) is entered in the address box of a browser, another web page is open or no
response is returned.
Possible Causes
Port 8084 is occupied by another tool and cannot be allocated.
NO TE
For Deepin 15.2 x86, the commands related to the Nginx and Gunicorn services are listed below. However, the crond service keeps starting the Nginx and gunicorn processes to enable unexpected restart of the processes. As a result, the Nginx and gunicorn services will not be stopped on these OSs. Theoretically, the ports will not be occupied.
service nginx_port stop/start/restart/status service gunicorn_port stop/start/restart/status
Procedure
Change the HTTPS port number and log in again.
NO TE
The default HTTPS port is 8084.
Step 1 Use an SSH remote login tool to log in to the OS CLI.
Step 2 Stop services. For details, see Starting, Stopping, or Restarting Services.
Step 3 Check for port conflict.
1. Run the following command to access the tools directory (/opt/portadv is the tool installation directory. Replace it with the actual directory.):
cd /opt/portadv/tools/
2. Run the following script to detect port conflicts and change the port number.
sh change_ip_port.sh
Kunpeng Porting Advisor User Guide
FAQs 1 Failed to Log In to the Tool Using a Browser
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 1
NO TE
– After the automatic modification is complete, the following port information is displayed. xxxx is the new port number, and xx.xx.xx.xx is the IP address of the running environment.
Set the HTTPS port xxxxx
Web console is now running, go to: https://xx.xx.xx.xx:8084/porting/#/login
– After the script is successfully run, the nginx_port and gunicorn_port services are automatically started.
Step 4 Check whether you can log in to the Kunpeng Porting Advisor WebUI.
----End
Kunpeng Porting Advisor User Guide
FAQs 1 Failed to Log In to the Tool Using a Browser
2 WARNING or FAIL Returned in the Software Package Integrity Verification
If WARNING or FAIL is returned in the integrity verification of a software package, the verification fails. Rectify the fault by referring to the handling suggestions described in Table 2-1.
Table 2-1 Verification result examples
Scenario Example Output Information Verif icati onRes ult
Handling Suggestions
Thesignature verificatio n issuccessful.
gpg: Signature made Thu Jan 9 15:29:06 2014 CST using RSA key ID 27A74824 gpg: Good signature from "OpenPGP signature key for Huawei software (created on 30th Dec,2013) <[email protected]>"
PASS NA
Thesignature verificatio n fails.
gpg: Signature made Thu Jan 9 15:29:06 2014 CST using RSA key ID 27A74824 gpg: BAD signature from "OpenPGP
signature key for Huawei software (created on 30th Dec,2013) <[email protected]>"
FAIL Download the target file again.
Failed to find the public key.
gpg: Signature made Thu Jan 9 15:20:01 2014 CST using RSA key ID 27A74824 gpg: Can't check signature: public key not found
FAIL Download the public key again.
For details, seeVerifying the Digital Signature.
Kunpeng Porting Advisor User Guide
FAQs 2 WARNING or FAIL Returned in the Software
Package Integrity Verification
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 3
Scenario Example Output Information Verif icati onRes ult
Handling Suggestions
Thesignature verificatio n issuccessful, but the public key is not fully trusted.
gpg: Signature made Thu Jan 9 15:29:06 2014 CST using RSA key ID 27A74824 gpg: Good signature from "OpenPGP signature key for Huawei software (created on 30th Dec,2013) <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: B100 0AC3 8C41 525A 19BD C087 99AD 81DF 27A7 4824
WARNIN G
After confirming the key ID (27A74824), set the trust level of Huawei public key to 5. For
details, see Verifying the Digital Signature.
Failed to find the source file.
gpg: no signed data
gpg: can't hash datafile: No data
FAIL Download the target file again.
Thesignature hasexpired.
gpg: Signature made 04/24/13 10:50:29 CST using RSA key ID 133B64E5
gpg: Expired signature from " OpenPGP signature test key <[email protected]>"
gpg: Signature expired 04/25/13 10:50:29 CST
FAIL Download a target file with the signature updated.
Thesignature verificatio n issuccessful, but the public key has been revoked.
gpg: Signature made 06/13/13 11:14:49 CST using RSA key ID 133B64E5
gpg: Good signature from " OpenPGP signature test key <[email protected]>"
gpg: WARNING: This key has been revoked by its owner!
gpg: This could mean that the signature is forged.
gpg: reason for revocation: Key is no longer used
gpg: revocation comment:
WARNIN G
Download the latest public key and an updated target file.
Failed to find the correspon dingsignature file in the source file.
None WAR
NING
Download thesignature file correspondin g to the target file.
Kunpeng Porting Advisor User Guide
FAQs 2 WARNING or FAIL Returned in the Software
Package Integrity Verification
3 Common Software Package Rebuild Failures
Table 3-1 provides the common software package rebuild failures and handling suggestions.
NO TE
/opt/portadv is the tool installation directory. Replace it with the actual directory.
Table 3-1 Common software package rebuild failures
Issue 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/
portadv/xx/data directory (xx indicates the user name), and perform software package rebuilding again.
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/portadv/xx/data directory (xx indicates the user name), and perform software package rebuilding again.
Kunpeng Porting Advisor User Guide
FAQs 3 Common Software Package Rebuild Failures
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 5
Issue Possible Causes Handling Suggestions Failed to
download the JAR file.
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/portadv/xx/data directory (xx indicates the user name) and perform software package rebuilding again.
NOTEYou 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 whether the size of the /opt directory is sufficient.
● Check whether the RPM/DEB package is complete and in correct format.
● Use the Kunpeng 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 whether the size of the /opt directory is sufficient.
● 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 when the RPM/DEB package is analyzed.
● If the JAR command is missing, install the JDK.
NOTEThe software package rebuilding does not support JAR packages with embedded JAR files.
● (For RPM packages) Run the following commands to clear the workspace and then perform software package
rebuilding again:
cd /opt/portadv/
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 rebuilding again:
rm -rf /opt/portadv/tmp_path
Kunpeng Porting Advisor User Guide
FAQs 3 Common Software Package Rebuild Failures
Issue Possible Causes Handling Suggestions 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:
rpm -ivh xxx.rpm
● To install rpmbuild, run the following commands to check for the rpmbuild package in the Yum source and install rpmbuild:
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:
rpm -ivh xxx.rpm
Kunpeng Porting Advisor User Guide
FAQs 3 Common Software Package Rebuild Failures
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 7
4 Common Issues of Dependency Dictionary Management
Table 4-1 provides the common dependency dictionary management issues and handling suggestions.
NO TE
/opt/portadv is the tool installation directory. Replace it with the actual directory.
Table 4-1 Common issues of dependency dictionary management Issue Possible Causes Handling Suggestions Failed to
compress, decompress, or copy the dependent dictionary.
The drive space is
insufficient. Check the size of the /opt directory.
The dependency dictionary or dependency dictionary update package does not exist or is invalid.
The dependency dictionary or dependency dictionary update package does not exist or is
abnormal.
Check whether the dependency dictionary file exists in the
corresponding directory, and whether the file format and size are correct.
Ensure that the correct update package has been downloaded.
Save directory: /opt/portadv/config/
dependency_dictionary
Upgrade directory: /opt/portadv/
portadmin/
dependency_dictionary_package Kunpeng Porting Advisor User Guide
FAQs 4 Common Issues of Dependency Dictionary
Management
Issue Possible Causes Handling Suggestions The dependency
dictionary package is uploaded repeatedly.
The dependency dictionary update package has been manually uploaded to the server.
Delete the dependency dictionary package from /opt/portadv/
portadmin/
dependency_dictionary_package.
Failed to upload the dependency dictionary package.
The current dependency dictionary is of the latest version.
No update is required.
Kunpeng Porting Advisor User Guide
FAQs 4 Common Issues of Dependency Dictionary
Management
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 9
5 Common Issues in Software Porting Template Management
Table 5-1 provides the common issues in software porting template management and handling suggestions.
Table 5-1 Common software porting template management issues Issue Possible Causes Handling Suggestions Failed to package
or copy the software porting template.
The drive space
is insufficient. Check the size of the /opt directory.
No valid porting template file exists in the software porting template
directory.
The software porting template file does not exist.
Check whether the software porting template file exists in the corresponding directory.
Software porting template
directory: /opt/portadv/resource/
migration The software
porting template update file does not exist or is incorrect.
The software porting template update file does not exist or is incorrect.
Check whether the software porting template update file exists in the corresponding directory, and whether the file format and size are correct.
Ensure that the correct update package has been downloaded.
Upgrade directory: /opt/portadv/
portadmin/migration_package The software
porting template resource package is repeatedly uploaded.
The software porting template resource package has been
manually uploaded to the server.
Delete the software porting template resource package from /opt/portadv/
portadmin/migration_package Kunpeng Porting Advisor User Guide
FAQs 5 Common Issues in Software Porting Template
Management
Issue Possible Causes Handling Suggestions The software
porting template resource package fails to be
uploaded.
The existing software porting template is of the latest version.
No update is required.
Kunpeng Porting Advisor User Guide
FAQs 5 Common Issues in Software Porting Template
Management
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 11
6 Failed to Install the Kunpeng Porting Advisor on Debian 10 (x86)
Symptom
Installation of the Kunpeng Porting Advisor fails and the error information shown in Figure 6-1 is displayed.
Figure 6-1 Error information
Possible Cause
libssl1.0.0 is not installed in the OS.
Procedure
Step 1 Download the libssl installation package libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb.
Kunpeng Porting Advisor User Guide
FAQs 6 Failed to Install the Kunpeng Porting Advisor on
Debian 10 (x86)
Step 2 Upload the DEB package to a directory on the server and switch to the directory.
Step 3 Run the following command to install libssl:
dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb NO TE
If you need to install the dependencies first, run the following command to install dependencies:
apt install
Step 4 After the installation is complete, run the following command to check whether the installation is successful:
dpkg -l | grep libssl
If the following information is displayed, libssl is successfully installed:
ii libssl1.0.0:amd64 1.0.2n-1ubuntu5.7 amd64
----End
Kunpeng Porting Advisor User Guide
FAQs 6 Failed to Install the Kunpeng Porting Advisor on
Debian 10 (x86)
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 13
7 Common Upgrade Failures
Table 7-1 Common upgrade failures
Issue Possible Causes Handling Suggestions Failed to install
the new version. ● The drive space is insufficient.
● There is no available port.
● Check the size of the /opt or the root directory.
● Check whether there are available ports.
Backup failed. The drive space is
insufficient. Check the size of the /opt or the root directory.
Failed to stop the
systemctl service. The service file is
lost. ● Check the gunicorn service configuration file in the /etc/
systemd/system directory.
● Check the Nginx service configuration file in the /usr/lib/systemd/system directory (on a Debian OS, the Nginx service configuration file is in
the /etc/systemd/system directory).
Kunpeng Porting Advisor User Guide
FAQs 7 Common Upgrade Failures
8 File Scanning Permissions
Before scanning a directory on the web side using the Kunpeng Porting Advisor, make sure that the OS user porting has the read and execute permissions on the directory and the read permission on the files to be scanned.
NO TE
The default security policy of EulerOS or openEuler will cause a failure in scanning files.
● Upload using the tool: The default permission value is 600 for uploading the content to scan. If you need to scan directories, set the permission value to 700.
● Manual upload: The minimum permission value is 700 for uploading the content to scan. If you need to scan directories, set the permission value to 700.
Kunpeng Porting Advisor User Guide
FAQs 8 File Scanning Permissions
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 15
9 Failed to Install the Tool Because the OpenSSL Library Is Not Found
Symptom
The tool installation fails and the displayed information indicates that the OpenSSL library is not found. Part of the information is as follows:
OpenSSL 1.1.1-dev xx XXX xxxx openssl already installed!
openssl-devel already installed!
checking for OS
+ Linux 4.14.0-115.el7a.0.1.aarch64 aarch64 checking for C compiler ... found
+ using GNU C compiler + gcc version: 7.3.0 (GCC)
...checking for OpenSSL library ... not found
..../auto/configure: error: SSL modules require the OpenSSL library.
...with nginx by using --with-openssl=<path> option.
make: *** No rule to make target 'build', needed by 'default'. Stop.
make: *** No rule to make target 'install'. Stop.
make: *** [install] Error
cp: cannot create directory '/opt/portadv/tools/nginx-install/html/': No such file or directory ...hmod: cannot access '/opt/portadv/tools/nginx-install/html/': No such file or directory Installation failed!
Possible Causes
OpenSSL has been upgraded, but the OpenSSL dependency components have not been upgraded.
NO TE
OpenSSL components include openssl, openssl-libs, and openssl-devel.
Procedure
Restore the OpenSSL components to OpenSSL 1.0.2 delivered with the system or upgrade the OpenSSL components to OpenSSL 1.1.1 installed in the system, and then reinstall the tool.
Kunpeng Porting Advisor User Guide
FAQs 9 Failed to Install the Tool Because the OpenSSL
Library Is Not Found
To restore the OpenSSL components, perform the following steps (CentOS 7.7 ARM is used as an example):
Step 1 Download the CentOS image file CentOS-7-aarch64-Everything-1908.iso from the official CentOS website.
Step 2 Use an SSH remote login tool to upload the CentOS image to the /root directory.
Step 3 Use the SSH remote login tool to log in to the CentOS CLI.
Step 4 Run the following command to mount the CentOS ISO image to a local directory:
mount /root/CentOS-7-aarch64-Everything-1908.iso /media -o loop
NO TICE
If the OS is restarted, you need to mount the image file again.
Step 5 Run the following command to go to the directory mounted:
cd /media
Step 6 Run the following command to locate the OpenSSL components:
find . -name "openssl*"
Step 7 Run the following commands to install the OpenSSL components:
rpm -ivh /media/Packages/openssl-devel-1.0.2k-19.el7.aarch64.rpm --nodeps --force rpm -ivh /media/Packages/openssl-libs-1.0.2k-19.el7.aarch64.rpm --nodeps --force rpm -ivh /media/Packages/openssl-1.0.2k-19.el7.aarch64.rpm --nodeps --force
----End
For details about how to upgrade all OpenSSL components, see Upgrading
OpenSSL. Download the OpenSSL RPM package of the correct version. During the upgrade, you need to mount the OS ISO image file and install the dependency components.
Kunpeng Porting Advisor User Guide
FAQs 9 Failed to Install the Tool Because the OpenSSL
Library Is Not Found
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 17
10 Software Used with the Kunpeng Porting Advisor
Table 10-1 lists the software to be used with the Kunpeng Porting Advisor.
Table 10-1 Software used with the Kunpeng Porting Advisor Software Description
Nginx An open-source third-party component, which needs to be installed for the tool in WebUI mode.
Nginx processes HTTPS requests from the frontend, provides static pages for the frontend or transfers the user-input data to the backend, and returns the scanning result to the user.
Django An open-source third-party component, which needs to be installed for the tool in WebUI mode.
Django is a RESTful framework that converts HTTP requests into RESTful APIs and drives backend functional modules. It also supports user authentication and management.
Python An open-source third-party component, which needs to be installed for the tool in WebUI and CLI modes.
Python provides the runtime environment.
Cmake An open-source third-party component, which needs to be installed for the tool in WebUI and CLI modes.
CMake is the build tool.
Kunpeng Porting Advisor User Guide
FAQs 10 Software Used with the Kunpeng Porting Advisor
11 Different Scan Results on the Tool WebUI and CLI on EulerOS
Symptom
When the same file is scanned respectively on the Huawei Kunpeng Porting Advisor WebUI and CLI on EulerOS, the scan results are different, as shown in Figure 11-1 and Figure 11-2.
Figure 11-1 Scan result on the WebUI Kunpeng Porting Advisor User Guide
FAQs 11 Different Scan Results on the Tool WebUI and CLI
on EulerOS
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 19
Figure 11-2 Scan result on CLI
Possible Causes
The default user is root for the CLI and porting for the WebUI. The two users have different permissions to the file.
Procedure
After installing the tool in WebUI mode, perform the following steps:
Step 1 Use an SSH remote login tool to log in to the Linux CLI as the root user.
Step 2 Run the following command to modify the permission on the readelf executable file:
chmod 755 /usr/bin/readelf
----End
Kunpeng Porting Advisor User Guide
FAQs 11 Different Scan Results on the Tool WebUI and CLI
on EulerOS
12 Failed to Install the Tool Due to an Nginx Compilation Error
Symptom
Tool installation fails due to an Nginx compilation error.
Possible Causes
The libwd.so file provided by the acceleration library causes the Nginx compilation error during the tool installation process.
Procedure
Run the following command to check whether libwd.so 1.2.10 exists in the system. If yes, upgrade the file to the latest version.
find / -name libwd*
Kunpeng Porting Advisor User Guide
FAQs 12 Failed to Install the Tool Due to an Nginx
Compilation Error
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 21
13 Failed to Install the Tool on a Container
Symptom
Tool installation fails in Docker.
Possible Causes
The sys folder does not exist in the /usr/include directory of Docker.
Procedure
Check whether the sys folder exists in the /usr/include directory of Docker. If the sys folder does not exist, copy the sys folder from the OS of Docker to the /usr/
include directory of Docker, and then uninstall and reinstall the tool.
Kunpeng Porting Advisor User Guide
FAQs 13 Failed to Install the Tool on a Container
14 "Set nginx systemctl failed"
Displayed in Tool Installation
Symptom
The tool installation fails and "Set nginx systemctl failed" is displayed, as shown in Figure 14-1.
Figure 14-1 Software installation failed
Possible Causes
OpenSSL has been upgraded, but some files are missing.
Procedure
● Method 1: Run the following command to update the Id.so.cache file, and then uninstall and reinstall the tool:
ldconfig
● Method 2: Run the following commands to create soft links from the libssl.so.
1.1 and libcrvpto.so.1.1 files in the /usr/local/lib directory to the /usr/lib64/
directory, and then uninstall and reinstall the tool:
ln -s /usr/local/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1 ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
Kunpeng Porting Advisor User Guide
FAQs 14 "Set nginx systemctl failed" Displayed in Tool
Installation
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 23
15 Tool Installation Fails and the Message "symbol EVP_md2 version OPENSSL_1_1_0 not defined" Is Displayed
Symptom
The software package fails to be installed and the message "symbol EVP_md2 version OPENSSL_1_1_0 not defined" is displayed, as shown in Figure 15-1.
Figure 15-1 Software installation failure
Possible Causes
Incompatible versions of library files on which OpenSSL depends are installed.
Procedure
Step 1 Run the type openssl command to check the path of the OpenSSL execution file.
Kunpeng Porting Advisor User Guide FAQs
15 Tool Installation Fails and the Message "symbol EVP_md2 version OPENSSL_1_1_0 not defined" Is Displayed
Step 2 Run the ls -l /usr/bin/openssl command to view the result.
NO TE
/usr/bin/openssl is the path returned in Step 1, which is the default path. If you use a custom path, the output in Step 1 is the actual path. Use the actual path in commands executed in Step 2, Step 3, and Step 5.
Step 3 Run the ldd /usr/bin/openssl command. (If the OpenSSL is a soft link, the original file is required.)
Step 4 Check the file pointed by libcrypto.so.1.1. OpenSSL points to libcrypto.so.1.1 in the /usr/lib64 directory by default, which is different from this example.
Step 5 Run the export LD_LIBRARY_PATH=/usr/lib64 command to uninstall the tool and install it again.
----End
Kunpeng Porting Advisor User Guide FAQs
15 Tool Installation Fails and the Message "symbol EVP_md2 version OPENSSL_1_1_0 not defined" Is Displayed
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 25
16 Porting of Programs in go Language
If the application is programmed in pure go language, only the system SO library will be invoked. In this case, you only need to scan and analyze the SO libraries and replace the dependencies, just like you port the applications in Java or Python.
If nested C code exists (theoretically, go supports embedded C code in syntax, although there is no implementation in projects), you can scan the source code containing the C code using the Kunpeng Porting Advisor to identify the
modifications on the C code.
Kunpeng Porting Advisor User Guide
FAQs 16 Porting of Programs in go Language
17 SO Library Dependency Dictionary Issues
Currently, the SO library dependency dictionary is customized based on the Linux distribution. Each distribution has its own SO library dependency dictionary, and the SO library dependency dictionary cannot be shared by different OS
distributions. In each Linux distribution, the SO libraries in the dependency dictionary have been fully verified. If the dependency dictionaries of different OS distributions are merged, the compatibility and stability of the SO libraries with each OS are not verified. As a result, the official technical support from the OS vendor will be unavailable. Therefore, a unified SO library dependency dictionary is not recommended. Conversely, the SO libraries in the dependency dictionary of an OS distribution have the compatibility and stability verified and can be used without any risk.
Kunpeng Porting Advisor User Guide
FAQs 17 SO Library Dependency Dictionary Issues
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 27
18 Failed to Access the Tool Using a Public IP Address/Port
Symptom
After the tool is installed on an elastic cloud server (ECS), the VM cannot be connected after a public IP address is entered in the address box of the browser, and the tool cannot be accessed through the port.
Possible Causes
● The network between the source and the destination ends is not connected.
● Port 8084 is not enabled in the destination security group.
● Port 8084 is disabled in the destination network ACL.
Procedure
● Log in to the source server and ping the destination IP address. If the destination IP address cannot be pinged, check the DNS, firewall, security group, and local network between the source and destination servers. For details, see Why Cannot an EIP Be Pinged?
● Log in to the management console. In the target ECS list, click the name of the target ECS. On the page displayed, click Security Group and check
whether port 8084 is enabled in the security group and whether the source IP address is specified. If port 8084 is not enabled in the inbound rule, add a rule for port 8084. If the rule for port 8084 exists but the source IP address is not 0.0.0.0/0 or the IP address of the source server, change the source IP address to 0.0.0.0/0. For details, see https://support.huaweicloud.com/sms_faq/
sms_faq_0011.html.
● Log in to the management console and check whether the ECS subnet is associated with the network ACL. If the ECS subnet is associated with the network ACL and port 8084 is in the inbound rules of the network ACL, change the policy to Allow. For details, see Modifying a Network ACL Rule.
Kunpeng Porting Advisor User Guide
FAQs 18 Failed to Access the Tool Using a Public IP
Address/Port
19 Reinstallation Failure
Table 19-1 Reinstallation failures
Possible Causes Handling Suggestions The uninstall command is
not executed. Uninstall the tool (see Uninstalling the Kunpeng Porting Advisor) and then install it.
The tool is uninstalled by deleting the installation directory instead of running the uninstall command.
Run the following commands and reinstall the tool:
cd /etc/systemd/system/
rm -rf gunicorn_port.service
Kunpeng Porting Advisor User Guide
FAQs 19 Reinstallation Failure
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 29
20 Server Running Improperly Because Drive Space Was Consumed by the Memory Consistency Check
Symptom
The server is running improperly when a memory consistency check is performed.
Possible Causes
The drive space of the user is used up.
Procedure
Delete the alias+pid.txt and module_ll+pid files from the /opt/portadv/tools/
weakconsistency/staticcodeanalyzer/bin directory. (For example, in alias1000.txt and module_ll1000, 1000 is the pid.)
NO TE
/opt/portadv is the tool installation directory. Replace it with the actual directory.
Kunpeng Porting Advisor User Guide
FAQs 20 Server Running Improperly Because Drive Space
Was Consumed by the Memory Consistency Check
21 Logic Judgment of Analysis Results
Software Porting Assessment
● The analysis is successful, but the analysis path or analysis package does not contain the content to be ported. The pop-up window in the lower right corner automatically disappears several seconds later.
● The analysis is successful and a report is generated. You can click View Report in the lower right corner to view the report. The pop-up window in the lower right corner automatically disappears after several seconds. You can view the report from the historical reports.
● If the analysis fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
Source Code Porting
● The porting is successful, but the analysis path or analysis package does not contain the content to be ported. The pop-up window in the lower right corner automatically disappears several seconds later.
● The porting is successful and a report is generated. You can click View Report in the lower right corner to view the report. The pop-up window in the lower right corner automatically disappears after several seconds. You can view the report from the historical reports.
● If the porting fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
Software Package Rebuilding
● The software package supports the Kunpeng platform and does not need to be rebuilt. The pop-up window in the lower right corner will not disappear until you close it.
● Software package rebuilding is successful and you can click Download Rebuilt Package in the lower right corner to download the rebuilt software package. The pop-up window in the lower right corner will not disappear until you close it. You can also view the report from the historical reports.
● If the rebuilding fails due to the lack of components such as rpmrebuild, you need to manually close the pop-up window in the lower right corner.
● If the rebuilding fails because the dependency file is missing, the pop-up window in the lower right corner will not disappear until you close it. You can also view the report from the historical reports.
Kunpeng Porting Advisor User Guide
FAQs 21 Logic Judgment of Analysis Results
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 31
Dedicated Software Porting
● If the porting is successful, you can click Download Porting Result in the lower right corner to download the porting file. The pop-up window in the lower right corner will not disappear until you close it.
● If the porting fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
64-bit Running Environment Check
● If the check is successful, a report is generated. You can click View Report in the lower right corner to view the report. The pop-up window in the lower right corner will not disappear until you close it. The current execution result will be lost after closing the pop-up window.
● If the check fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
Structure Byte Alignment Check
● If the check is successful, a report is generated. You can click View Report in the lower right corner to view the report. The pop-up window in the lower right corner will not disappear until you close it. The current execution result will be lost after closing the pop-up window.
● If the check fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
Memory Consistency Static Check
● Source code analysis:
– If the compile command fails to be parsed, the pop-up window in the lower right corner will not disappear until you close it. You can upload the compile command file for further check.
– After the compile command is parsed successfully, the BC file is
generated. You can download the compile command file or upload the compile command file for further check.
– If the BC file fails to be generated, the pop-up window in the lower right corner will not disappear until you close it.
– The memory consistency analysis is successful. You can click View Report in the lower right corner to view the report. The pop-up window in the lower right corner automatically disappears after several seconds. You can view the report from the historical reports.
– If the memory consistency analysis fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
● BC File:
– The memory consistency analysis is successful. You can click View Report in the lower right corner to view the report. The pop-up window in the lower right corner automatically disappears after several seconds. You can view the report from the historical reports.
– If the memory consistency analysis fails, you need to perform operations as prompted. The pop-up window in the lower right corner will not disappear until you close it.
Kunpeng Porting Advisor User Guide
FAQs 21 Logic Judgment of Analysis Results
22 Handling Exceptions During Multi- task Concurrent Execution
Symptom
When creating a source code porting or enhancement task, you are prompted with either of the following messages:
● Maximum concurrent processing is not supported. It may take long to execute multiple tasks. Refer to the tool user guide to enable maximum concurrent processing.
● Tasks cannot be analyzed. Refer to the tool user guide to fix the problem.
Possible Causes
● The system user has been tampered with.
● The database has been tampered with.
Procedure
● Method 1: If the Kunpeng Porting Advisor has a later version, update the tool.
● Method 2: Uninstall the Kunpeng Porting Advisor and install it again.
Kunpeng Porting Advisor User Guide
FAQs 22 Handling Exceptions During Multi-task
Concurrent Execution
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 33
23 The Tool Fails to Be Installed and a Message Is Displayed Indicating That the setfcal Command Is Missing
Symptom
The tool fails to be installed and a message is displayed, indicating that the setfcal command is missing. See Figure 23-1.
Figure 23-1 Tool installation failure
Possible Causes
The ACL library does not exist in the user system.
Procedure
The ACL library must be installed in the user system. You can run the following commands to install the ACL library through the source. The commands to be executed vary with operating systems.
RHEL: yum -y install acl SUSE: zypper install acl Debian: apt-get install acl
NO TE
Before using this method, ensure that the user system has been connected to the network or Configuring the OS Yum, APT, or Zypper Source has been configured.
Kunpeng Porting Advisor User Guide FAQs
23 The Tool Fails to Be Installed and a Message Is Displayed Indicating That the setfcal Command Is Missing
24 Yum Commands Cannot Be Executed During Dedicated Software Porting
Symptom
When you run yum installation commands in a dedicated software porting task, an error message is displayed, as shown in the following figure.
Possible Causes
Before startup, a yum process checks whether other yum processes are running in the system. If yes, the yum process waits until other yum processes are stopped. To prevent system resources from being exhausted, the tool checks whether other yum processes exist in the system before running a yum command. If yes, an error message will be displayed and the yum command will be stopped.
Procedure
If it takes a long time to run a yum command, this is probably because that the yum source configuration is incorrect or the network cannot be connected. You can perform the following steps to configure the local image source. The following uses CentOS 7.6 as an example.
1. Mount the image DVD-ROM:
mount /root/CentOS-7-x86_64-Everything-1810.iso /media -o loop 2. Back up the original Yum source. In the mv command, replace path with the
actual backup directory.
cd /etc/yum.repos.d/ //Go to the Yum source configuration directory.
mv ./* path //Back up the original Yum source configuration.
3. Edit the media.repo file.
vi /etc/yum.repos.d/media.repo Kunpeng Porting Advisor User Guide
FAQs 24 Yum Commands Cannot Be Executed During
Dedicated Software Porting
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 35
4. Press i to enter the edit mode and add the following information to the media.repo file:
[InstallMedia]
name=CentOS7.6 metadata_expire=-1 gpgcheck=0 cost=500
baseurl=file:///media enabled=1
5. Press Esc, type :wq, and press Enter to save the settings and exit.
6. Update the local cache information of the Yum source.
yum clean all yum makecache Kunpeng Porting Advisor User Guide
FAQs 24 Yum Commands Cannot Be Executed During
Dedicated Software Porting
25 Task Timed Out
Symptom
During source code porting, 64-bit mode check, structure byte alignment check, or memory consistency check, a message is displayed indicating that the task is waiting. After 30 minutes, another message is displayed indicating that the task timed out and prompts you to try again later or contact the administrator to check whether other users occupy resources for a long time.
Possible Causes
Users occupy resources for a long time. As a result, all resources are occupied, and other user tasks wait for resources until timeout.
Procedure
Contact the administrator to check whether other users occupy resources for a long time.
Kunpeng Porting Advisor User Guide
FAQs 25 Task Timed Out
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 37
26 Failed to Compile Source Code After a Quick Fix Upon a Memory Consistency Check
Symptom
Failed to compile source code after a quick fix is applied upon a memory consistency check.
Possible Causes
● {} is not added to a single line of code in the conditional statement.
Figure 26-1 shows the original code.
Figure 26-1 Original code
Figure 26-2 shows the modified code after a quick fix.
Kunpeng Porting Advisor User Guide
FAQs 26 Failed to Compile Source Code After a Quick Fix
Upon a Memory Consistency Check
Figure 26-2 Code after a quick fix
NO TE
In the current scenario, after a quick fix is used for modification, a compilation error may occur due to the lack of {}. The current tool cannot resolve this problem.
● The condition statement contains multiple conditions.
Procedure
Modify source code based on the coding specifications and service logic.
Kunpeng Porting Advisor User Guide
FAQs 26 Failed to Compile Source Code After a Quick Fix
Upon a Memory Consistency Check
Issue 01 (2021-12-31) Copyright © Huawei Technologies Co., Ltd. 39