Installing KML_VML
Procedure
- Obtain the KML_VML source RPM package.
- Install KML_VML.
rpm -ivh kml_vml-xxxx.src.rpm
- Go to the SPECS subdirectory in the installation directory of the source package.
cd ~/rpmbuild/SPECS
- Compile and generate the KML_VML binary installation package.
rpmbuild -bb kml_vml.spec
- Install the binary package.
rpm -ivh ~/rpmbuild/RPMS/aarch64/kml_vml-xxxx.aarch64.rpm
After the installation is complete, the system automatically adds the directory of the lib folder to the environment variable LD_LIBRARY_PATH, that is, /usr/local/kml/lib.
In the preceding command, xxxx indicates the version number.
Verifying the Installation
- Log out of the current terminal and log in again.
- Check whether the environment variable LD_LIBRARY_PATH contains the KML_VML installation path /usr/local/kml/lib.
env | grep LD_LIBRARY_PATH
If the variable contains the installation path, the installation is successful.
After the installation is successful, the corresponding files are generated in the installation path (/usr/local/kml by default). The include folder contains the header files, and the lib folder contains the KML_VML dynamic library files. Add -L /usr/local/kml/lib and -lm -lkvml to the GCC compilation options. Run the LDD command to check whether the library on which the program depends is correctly linked.
Parent topic: How to Use the Kunpeng Math Library