Home Database Mysql Tutorial error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first u

error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first u

Jun 07, 2016 pm 04:39 PM
error ssl

今天帮一个朋友的一台机器编译lamp环境,编译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

今天帮一个朋友的一台机器编译lamp环境,编译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 C shared module qa_auth_server.so
[ 64%] Built target qa_auth_server
Scanning dependencies of target vio
[ 64%] Building C object vio/CMakeFiles/vio.dir/vio.c.o
[ 64%] Building C object vio/CMakeFiles/vio.dir/viosocket.c.o
[ 64%] Building C object vio/CMakeFiles/vio.dir/viossl.c.o
/home/centos/mysql-5.5.34/vio/viossl.c: In function ‘ssl_do’:
/home/centos/mysql-5.5.34/vio/viossl.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/viossl.c:175: error: for each function it appears in.)
make[2]: *** [vio/CMakeFiles/vio.dir/viossl.c.o] Error 1
make[1]: *** [vio/CMakeFiles/vio.dir/all] Error 2
make: *** [all] Error 2


google搜索了一下,有许多朋友遇到过了,有些朋友建议使用低版本的MYSQL进行编译,或者使用centos6.X的操作系统,centos6的操作系统编译MYSQL的时候确实没有遇到过这个个错误。

解决办法:
这其实是MYSQL的一个bug,官方已经发布了补丁,补丁打好之后再编译就可以过去了,具体页面请查看:http://bugs.mysql.com/bug.php?id=68999

[18 Apr 15:06] 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/viossl.c:175: error: 'SSL_OP_NO_COMPRESSION' undeclared (first use in this function)

Suggested fix:
See trivial attached patch[18 Apr 15:07] Remi Collet
mysql-openssl.patchAttachment: mysql-openssl.patch (text/x-patch), 405 bytes.
PS:patch -p1 [26 Apr 10:49] Umesh Umesh
http://bugs.mysql.com/bug.php?id=69080 marked as duplicate of this one.
[24 May 10:58] Umesh 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 -a
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
[ 63%] Building C object vio/CMakeFiles/vio.dir/vio.c.o
[ 63%] Building C object vio/CMakeFiles/vio.dir/viosocket.c.o
[ 63%] Building C object vio/CMakeFiles/vio.dir/viossl.c.o
/root/setup/mysqlcom-5.5.31/vio/viossl.c: In function assl_doa:
/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: aSSL_OP_NO_COMPRESSIONa undeclared (first use in this function)
/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: (Each undeclared identifier is reported only once
/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: for each function it appears in.)
make[2]: *** [vio/CMakeFiles/vio.dir/viossl.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 included patch that fixes this.
[13 Jun 10:40] Georgi Kodinov
This openssl version is rather old. openssl recommends that you should 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 Collet
> 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 would really love if you can provide a way for us to recognize at compile time that this particular 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 would 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 would 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, but...

Why do you think you need this and don't simply #ifdef SSL_OP_NO_COMPRESSION
[29 Jun 15: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 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 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
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
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to PHP Fatal error: Call to undefined method PDO::prepare() in Solution to PHP Fatal error: Call to undefined method PDO::prepare() in Jun 22, 2023 pm 06:40 PM

PHP is a popular web development language that has been used for a long time. The PDO (PHP Data Object) class integrated in PHP is a common way for us to interact with the database during the development of web applications. However, a problem that some PHP developers often encounter is that when using the PDO class to interact with the database, they receive an error like this: PHPFatalerror:CalltoundefinedmethodPDO::prep

What should I do if 'Uncaught (in promise) Error: Request failed with status code 500' occurs when using axios in a Vue application? What should I do if 'Uncaught (in promise) Error: Request failed with status code 500' occurs when using axios in a Vue application? Jun 24, 2023 pm 05:33 PM

It is very common to use axios in Vue applications. axios is a Promise-based HTTP client that can be used in browsers and Node.js. During the development process, the error message "Uncaught(inpromise)Error: Requestfailedwithstatuscode500" sometimes appears. For developers, this error message may be difficult to understand and solve. This article will explore this

Solve the problem of 'error: incomplete type is not allowed' in C++ code Solve the problem of 'error: incomplete type is not allowed' in C++ code Aug 26, 2023 pm 08:54 PM

Solve the "error:incompletetypeisnotallowed" problem in C++ code. During the C++ programming process, you sometimes encounter some compilation errors. One of the common errors is "error:incompletetypeisnotallowed". This error is usually caused by operating on an incomplete type. This article will explain the cause of this error and provide several solutions. firstly, I

Solve the 'error: expected initializer before 'datatype'' problem in C++ code Solve the 'error: expected initializer before 'datatype'' problem in C++ code Aug 25, 2023 pm 01:24 PM

Solve the "error:expectedinitializerbefore'datatype'" problem in C++ code. In C++ programming, sometimes we encounter some compilation errors when writing code. One of the common errors is "error:expectedinitializerbefore'datatype'". This error usually occurs in a variable declaration or function definition and may cause the program to fail to compile correctly or

After Java8 (291), TLS1.1 is disabled and JDBC cannot connect to SqlServer2008 using SSL. How to solve the problem? After Java8 (291), TLS1.1 is disabled and JDBC cannot connect to SqlServer2008 using SSL. How to solve the problem? May 16, 2023 pm 11:55 PM

After Java8-291, TLS1.1 is disabled, so that JDBC cannot connect to SqlServer2008 using SSL. What should I do? The following is the solution to modify the java.security file 1. Find the java.security file of jre. If it is jre, go to {JAVA_HOME}/jre/ In lib/security, for example????C:\ProgramFiles\Java\jre1.8.0_301\lib\security. If it is the Eclipse green installation-free portable version, search for java.security in the installation folder, such as????xxx\plugins \org

How to implement SSL passthrough in HAProxy How to implement SSL passthrough in HAProxy Mar 20, 2024 am 09:30 AM

Keeping web servers load balanced is one of the key measures to prevent downtime. Using a load balancer is a reliable approach, with HAProxy being a highly regarded choice. Using HAProxy, you can accurately configure the load balancing method and support SSL passthrough to ensure the security of communication between the client and the server. It starts by exploring the importance of implementing SSL passthrough in HAProxy, followed by a detailed discussion of the steps required to implement this feature and an example for better understanding. What is SSL passthrough? Why is it important? As a load balancer, HAProxy accepts and distributes the load flowing to your web servers across configured servers. Load distribution is targeted to client devices and

How to solve PHP Warning: fopen(): failed to open stream: No such file or directory How to solve PHP Warning: fopen(): failed to open stream: No such file or directory Aug 19, 2023 am 10:44 AM

How to solve PHPWarning:fopen():failedtoopenstream:Nosuchfileordirectory In the process of using PHP development, we often encounter some file operation problems, one of which is "PHPWarning:fopen():failedtoopenstream:Nosuchfileordirectory"

Solution to PHP Fatal error: Call to undefined function mysqli_connect() Solution to PHP Fatal error: Call to undefined function mysqli_connect() Jun 23, 2023 am 09:40 AM

When writing web applications using PHP, a MySQL database is often used to store data. PHP provides a way to interact with the MySQL database called MySQLi. However, sometimes when using MySQLi, you will encounter an error message, as shown below: PHPFatalerror:Calltoundefinedfunctionmysqli_connect() This error message means that PHP cannot find my

See all articles