Error: 'ssl _ OP_NO_COMPRESSION 'undeclared (firstu

Source: Internet
Author: User
Tags mysql code openssl version
Compile the lamp environment on a friend's machine today and report the following error when compiling MYSQL: 63% Builttargetqa_auth_interfaceScanningdependenciesoftargetqa_auth_server64 % Dependencies

Today, I helped a friend's machine compile the lamp environment and reported the following error when compiling MYSQL: 63% Built target qa_auth_interface Scanning dependencies of target qa_auth_server 64% Building C object plugin/auth/CMakeFiles/qa_auth_server.dir/qa_auth_server.c.o Linking

Today, I helped a friend's machine compile the lamp environment and reported the following error when compiling MYSQL:


[2, 63%] Built target qa_auth_interface
Scanning dependencies of target qa_auth_server
[64%] Building C object plugin/auth/CMakeFiles/qa_auth_server.dir/qa_auth_server.c.o
Linking C shared module qa_auth_server.so
[1, 64%] Built target qa_auth _
Scanning dependencies of target vio
[2, 64%] Building C object vio/CMakeFiles/vio. dir/vio. c. o
[64%] Building C object vio/CMakeFiles/vio. dir/visocket. c. o
[64%] Building C object vio/CMakeFiles/vio. dir/vissl. c. o
/Home/centos/mysql-5.5.34/vio/vissl. c: In function 'ssl _ do ':
/Home/centos/mysql-5.5.34/vio/vissl. c: 175: error: 'ssl _ OP_NO_COMPRESSION 'undeclared (first use in this function)
/Home/centos/mysql-5.5.34/vio/viossl. c: 175: error: (Each undeclared identifier is reported only once
/Home/centos/mysql-5.5.34/vio/vissl. c: 175: error: for each function it appears in .)
Make [2]: *** [vio/CMakeFiles/vio. dir/vissl. c. o] Error 1
Make [1]: *** [vio/CMakeFiles/vio. dir/all] Error 2
Make: *** [all] Error 2


After a google search, many of my friends have encountered this problem. Some of my friends suggest using a lower version of MYSQL for compilation or the centos6.X operating system, the centos6 operating system did not encounter this error when compiling MYSQL.

Solution:
This is actually a bug of MYSQL, the official has released a patch, after the patch is prepared and then compiled can pass, the specific page please view: http://bugs.mysql.com/bug.php? Id = 68999

[18 Apr] Remi Collet
Description:
Can't build with openssl 0.9.8e from RHEL/CentOS/Oracle Linux 5

How to repeat:
Cmake-DWITH_SSL = system...

/Builddir/build/BUILD/mysql-5.5.31/vio/vissl. c: 175: error: 'ssl _ OP_NO_COMPRESSION 'undeclared (first use in this function)

Suggested fix:
See trivial attached patch [18 Apr :07] Remi Collet
Mysql-openssl.patchAttachment: mysql-openssl.patch (text/x-patch), 405 bytes.
PS: patch-p1 <mysql-openssl.patch
[26 Apr 10: 49] Umesh
Http://bugs.mysql.com/bug.php? Id = 69080 marked as duplicate of this one.
[24 May 10: 58] Umesh
Hello Remi,

Thank you for the report.
Verified as described.

// How to repeat

[Root @ cluster1 mysqlcom-5.5.31] # openssl version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
[Root @ cluster1 mysqlcom-5.5.31] # cat/etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[Root @ cluster1 mysqlcom-5.5.31] # uname-
Linux cluster1 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

[Root @ cluster1 mysqlcom-5.5.31] # cmake-DCMAKE_INSTALL_PREFIX =/root/server/mysqlcom-5.5.31-DWITH_SSL = system

[Root @ cluster1 mysqlcom-5.5.31] # make

..
...

Scanning dependencies of target vio
[2, 63%] Building C object vio/CMakeFiles/vio. dir/vio. c. o
[63%] Building C object vio/CMakeFiles/vio. dir/visocket. c. o
[63%] Building C object vio/CMakeFiles/vio. dir/vissl. c. o
/Root/setup/mysqlcom-5.5.31/vio/vissl. c: In function assl_doa:
/Root/setup/mysqlcom-5.5.31/vio/vissl. c: 175: error: aSSL_OP_NO_COMPRESSIONa undeclared (first use in this function)
/Root/setup/mysqlcom-5.5.31/vio/vissl. c: 175: error: (Each undeclared identifier is reported only once
/Root/setup/mysqlcom-5.5.31/vio/vissl. c: 175: error: for each function it appears in .)
Make [2]: *** [vio/CMakeFiles/vio. dir/vissl. c. o] Error 1
Make [1]: *** [vio/CMakeFiles/vio. dir/all] Error 2
Make: *** [all] Error 2 [24 May 11: 50] Erlend Dahl
Bug #69080 mysql-5.5.31 not compatible with openssl-1.0.0 and lower

Was marked as a duplicate. [8 Jun 0: 07] Noel Butler
5.5.32 also suffers same fate, I'm amazed oracle had ignored this and the simple sorted ded patch that fixes this.
[13 Jun 10: 40] Georgi Kodinov
This openssl version is rather old. openssl recommends that you shoshould consider upgrading to a later one.
Is there any obstacle with you upgrading to a recent version?
Alternatively you can just download the binaries from http://dev.mysql.com/downloads.
[13 Jun 10: 44] Remi col
> Is there any obstacle with you upgrading to a recent version?
Enterprise Linux distribution provides backport for security fix.

I don't think upgrade to a more recent version is even thinkable on RHEL, Oracle Linux or other clones.
[13 Jun 10: 57] Georgi Kodinov
It's a bit unfortunate that there's no compile time way to check for the presence of that fix.
Thanks for the explanations. It's a valid bug and needs to be fixed.
[28 Jun 14: 39] Georgi Kodinov
I wocould really love if you can provide a way for us to recognize at compile time that this particle openssl version has been patched to include the fix (so I can safely # ifdef the fix that we did on our side ).
Any chance that you wowould consider adding a define specific to your backport of the fix in this version that we can use?
E. g. adding something like this:
# Define OPENSSL_RHEL_COMPRESSION_FIX 1
To openssl. h wocould work great.
[29 Jun 14: 04] Remi Collet
@ Georgi Kodinov sorry, I really don't understand the need.

Feel free to open a request for change on RHEL,...

Why do you think you need this and don't simply # ifdef SSL_OP_NO_COMPRESSION
[29 Jun :33] Hartmut Holzgraefe
I don't understand why this can't be fixed by a simple # ifdef (as in the originally attached patch) either...
[1 Jul 11: 51] Georgi Kodinov
Remi,

IMHO we need to be able to distinguish between an un-patched openssl 0.9.8e (that doesn't contain the fixes that you 've ve backported to it) and your patched variant of the same library.
Otherwise there will not be enough information to determine whether to do the fix for this ssl bug in the mysql code or not. [29 Aug 14:21] Georgi Kodinov
Moving to "need feedback" based on the above question
[30 Sep :00] Bugs System
No feedback was provided for this bug for over a month, so it is
Being susponded automatically. If you are able to provide
Information that was originally requested, please do so and change
The status of the bug back to "Open ".
Tags-mysql, bug, ssl op no compression

Original article address: error: 'ssl _ OP_NO_COMPRESSION 'undeclared (first u, thanks to the original author for sharing.

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.