Problems (sec_error_pkcs11_general_error) encountered by installing CentOS-5.2 with source code on the SystemTap-1.1 AND THE SOLUTION

Source: Internet
Author: User
Tags systemtap

CentOS-5.2 on the use of source code installation SystemTap-1.1 Problems and Solutions

For details about how to use source code to compile and install systemtap, see the post:

[Systemtap
] Installing and using systemtap in Linux
Install systemtap with source code

The post is in the CentOS-5.4 to compile and install systemtap, has not been found before, the original version of systemtap (1.1) requires the support of the relevant package,

For example, when I compile and install systemtap IN THE CentOS-5.2, the following error occurs, after reading the information, this error is because the NSS package is relatively old,

Analyze the following errors and provide solutions.

[Root @ hdfs03 systemtap-1.1] # Make
/Bin/sh./git_version.sh-K-S.-O git_version.h
Git_version.sh: Not a git Repo, keeping existing git_version.h
Make all-recursive
Make [1]: Entering directory '/local/zkl/systemtap/systemtap-1.1'
Making all in Doc
Make [2]: Entering directory '/local/zkl/systemtap/systemtap-1.1/DOC'
Making all in systemtap_tapset_reference
Make [3]: Entering directory '/local/zkl/systemtap/systemtap-1.1/doc/systemtap_tapset_reference'
Make [3]: Nothing to be done for 'all '.
Make [3]: Leaving directory '/local/zkl/systemtap/systemtap-1.1/doc/systemtap_tapset_reference'
Making all in Beginners
Make [3]: Entering directory '/local/zkl/systemtap/systemtap-1.1/doc/beginners'
Make [3]: Nothing to be done for 'all '.
Make [3]: Leaving directory '/local/zkl/systemtap/systemtap-1.1/doc/beginners'
Make [3]: Entering directory '/local/zkl/systemtap/systemtap-1.1/DOC'
Make [3]: Nothing to be done for 'all-am '.
Make [3]: Leaving directory '/local/zkl/systemtap/systemtap-1.1/DOC'
Make [2]: Leaving directory '/local/zkl/systemtap/systemtap-1.1/DOC'
Making all in Grapher
Make [2]: Entering directory '/local/zkl/systemtap/systemtap-1.1/Grapher'
Make [2]: Nothing to be done for 'all '.
Make [2]: Leaving directory '/local/zkl/systemtap/systemtap-1.1/Grapher'
Make [2]: Entering directory '/local/zkl/systemtap/systemtap-1.1'
CC staprun-nsscommon.o
In file encoded ded from nsscommon. C: 59:
Stapsslerr. H: In function 'nsserror ':
Stapsslerr. h: 312: Error: 'sec _ error_pkcs11_general_error 'undeclared (first use in this function)
Stapsslerr. h: 312: Error: (each undeclared identifier is reported only once
Stapsslerr. h: 312: Error: for each function it appears in .)
Stapsslerr. h: 313: Error: 'sec _ error_pkcs11_function_failed 'undeclared (first use in this function)
Stapsslerr. h: 314: Error: 'sec _ error_pkcs11_device_error 'undeclared (first use in this function)
Make [2]: *** [staprun-nsscommon.o] Error 1

Make [2]: Leaving directory '/local/zkl/systemtap/systemtap-1.1'
Make [1]: *** [All-recursive] Error 1
Make [1]: Leaving directory '/local/zkl/systemtap/systemtap-1.1'
Make: *** [all] Error 2

The compilation error occurs in row 59th of the nsserror function in the nsscommon. c file. The row is "# include" stapsslerr. H ".

Step 3 error: stapsslerr. h file 312 ~ Row 3. The error is that the three macros sec_error_pkcs11_general_error,

Sec_error_pkcs11_function_failed and sec_error_pkcs11_device_error. Continue to read the nsscommon. c file and find that

Header file:
23 # include <NSS. h>
24 # include <NSPR. h>
25 # include <prerror. h>
26 # include <secerr. h>
27 # include <sslerr. h>
These header files are related to NSS and NSPR, and are initially identified as three macro sec_error_pkcs11_general_error,

Sec_error_pkcs11_function_failed, sec_error_pkcs11_device_error should be defined in these header files, so write two shell scripts

This document determines which header file appears:
Test. sh:
Locate NSS. h
Locate NSPR. h
Locate sslerr. h
Locate secerr. h
Locate prerror. h
Test2.sh:
./Test. Sh | xargs grep sec_error_pkcs11_general_error
./Test. Sh | xargs grep sec_error_pkcs11_function_failed
./Test. Sh | xargs grep sec_error_pkcs11_device_error
Run the test2.sh script, view the results, and find that the three macros are not found, so on a normal node (this node is also a CentOS-5.2,

Systemtap is installed normally. It may have been installed by the person who previously used the node, but it is unclear why the installation was successful.) execute these two scripts and you will find this result.

:
[Root @ glnode05 local] #./test2.sh
/Usr/include/nss3/secerr. h: sec_error_pkcs11_general_error = (sec_error_base + 167 ),
/Usr/include/nss3/secerr. h: sec_error_pkcs11_function_failed = (sec_error_base + 168 ),
/Usr/include/nss3/secerr. h: sec_error_pkcs11_device_error = (sec_error_base + 169 ),

These three macros are defined in the header file secerr. h, but these three macros are not defined in the header file secerr. H on the current node.

Because the version is different, check the NSS version on the normal node:

[Root @ glnode05 local] # rpm-Q NSS
Nss-3.12.3.99.3-1.el5.centos.2
[Root @ glnode05 local] # rpm-Q nss-devel
Nss-devel-3.12.3.99.3-1.el5.centos.2

Back to view the NSS version on the current node:

[Root @ hdfs03 systemtap-1.1] # rpm-Q NSS
Nss-3.11.99.5-2.el5.centos
[Root @ hdfs03 systemtap-1.1] # rpm-Q nss-devel
Nss-devel-3.11.99.5-2.el5.centos

Found that the NSS version is indeed different, continue analysis, found that the current node on the NSS is the default CentOS-5.2 installed version nss-3.11.99.5-

2. el5.centos, while the nss-3.12.3.99.3-1.el5.centos.2 on the normal node is the NSS version in the CentOS-5.4. Therefore, the solution should

Yes: uninstall the NSS and nss-devel packages on the current node, download and install the NSS and nss-devel packages for the CentOS-5.4, do the following:

Unmount the NSS and nss-devel packages on the current node

[Root @ hdfs03 systemtap] # rpm-e NSS
Error: "NSS" specifies multiple packages
This error occurs because multiple NSS packages, one i386 and one x86-64, can be detached using -- allmatches.
[Root @ hdfs03 NSS] # rpm-e -- allmatches nss-3.11.99.5-2.el5.centos
Error: Failed dependencies:
A dependency error is prompted. You can use the -- nodeps option to ignore the dependency.
[Root @ hdfs03 NSS] # rpm-e -- allmatches -- nodeps nss-3.11.99.5-2.el5.centos
In this way, you can uninstall the NSS package.
[Root @ hdfs03 NSS] # rpm-e nss-devel -- nodeps

Uninstall and install the NSS and nss-devel packages for the CentOS-5.4

[Root @ hdfs03 systemtap] # rpm-IVH nss-3.12.3.99.3-1.el5.centos.2.x86_64.rpm
[Root @ hdfs03 systemtap] # rpm-IVH nss-devel-3.12.3.99.3-1.el5.centos.2.x86_64.rpm

After installation, run the shell script on the current node to check the header file secerr. h,
[Root @ hdfs03 local] #./test2.sh
/Usr/include/nss3/secerr. h: sec_error_pkcs11_general_error = (sec_error_base + 167 ),
/Usr/include/nss3/secerr. h: sec_error_pkcs11_function_failed = (sec_error_base + 168 ),
/Usr/include/nss3/secerr. h: sec_error_pkcs11_device_error = (sec_error_base + 169 ),

The three macros are detected normally. Continue to compile and install systemtap. The installation is successful.

Inspired references:

Http://groups.google.com/group/mozilla.dev.tech.crypto/browse_thread/thread/e50c490239e867a0

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.