<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first use in this function)]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[Linux技术]]></category>
<pubDate>Thu, 07 Nov 2013 14:19:38 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	今天帮一个朋友的一台机器编译lamp环境，编译MYSQL的时候报如下错误：<br/><div class="code"><br/>&#91; 63%&#93; Built target qa_auth_interface<br/>Scanning dependencies of target qa_auth_server<br/>&#91; 64%&#93; Building C object plugin/auth/CMakeFiles/qa_auth_server.dir/qa_auth_server.c.o<br/>Linking C shared module qa_auth_server.so<br/>&#91; 64%&#93; Built target qa_auth_server<br/>Scanning dependencies of target vio<br/>&#91; 64%&#93; Building C object vio/CMakeFiles/vio.dir/vio.c.o<br/>&#91; 64%&#93; Building C object vio/CMakeFiles/vio.dir/viosocket.c.o<br/>&#91; 64%&#93; Building C object vio/CMakeFiles/vio.dir/viossl.c.o<br/>/home/centos/mysql-5.5.34/vio/viossl.c: In function ‘ssl_do’:<br/>/home/centos/mysql-5.5.34/vio/viossl.c:175: error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first use in this function)<br/>/home/centos/mysql-5.5.34/vio/viossl.c:175: error: (Each undeclared identifier is reported only once<br/>/home/centos/mysql-5.5.34/vio/viossl.c:175: error: for each function it appears in.)<br/>make&#91;2&#93;: *** &#91;vio/CMakeFiles/vio.dir/viossl.c.o&#93; Error 1<br/>make&#91;1&#93;: *** &#91;vio/CMakeFiles/vio.dir/all&#93; Error 2<br/>make: *** &#91;all&#93; Error 2<br/></div><br/>google搜索了一下，有许多朋友遇到过了，有些朋友建议使用低版本的MYSQL进行编译，或者使用centos6.X的操作系统，centos6的操作系统编译MYSQL的时候确实没有遇到过这个个错误。<br/><br/>解决办法：<br/>这其实是MYSQL的一个bug，官方已经发布了补丁，补丁打好之后再编译就可以过去了，具体页面请查看：http://bugs.mysql.com/bug.php?id=68999<br/><br/>[18 Apr 15:06] Remi Collet <br/>Description:<br/>Can't build with openssl 0.9.8e from RHEL / CentOS / Oracle Linux 5<br/><br/>How to repeat:<br/>cmake -DWITH_SSL=system ...<br/><br/>/builddir/build/BUILD/mysql-5.5.31/vio/viossl.c:175: error: 'SSL_OP_NO_COMPRESSION' undeclared (first use in this function)<br/><br/>Suggested fix:<br/>See trivial attached patch[18 Apr 15:07] Remi Collet <br/>mysql-openssl.patchAttachment: <a href="http://bugs.mysql.com/file.php?id=19941" target="_blank">mysql-openssl.patch</a> (text/x-patch), 405 bytes.<br/>PS：patch -p1 < mysql-openssl.patch<br/>[26 Apr 10:49] Umesh Umesh <br/>http://bugs.mysql.com/bug.php?id=69080 marked as duplicate of this one.<br/>[24 May 10:58] Umesh Umesh <br/>Hello Remi,<br/><br/>Thank you for the report.<br/>Verified as described.<br/><br/>// How to repeat<br/><br/>[root@cluster1 mysqlcom-5.5.31]# openssl version<br/>OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008<br/>[root@cluster1 mysqlcom-5.5.31]# cat /etc/redhat-release<br/>Red Hat Enterprise Linux Server release 5.8 (Tikanga)<br/>[root@cluster1 mysqlcom-5.5.31]# uname -a<br/>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<br/><br/>[root@cluster1 mysqlcom-5.5.31]# cmake -DCMAKE_INSTALL_PREFIX=/root/server/mysqlcom-5.5.31&nbsp;&nbsp;-DWITH_SSL=system<br/><br/>[root@cluster1 mysqlcom-5.5.31]# make<br/><br/>..<br/>...<br/><br/>Scanning dependencies of target vio<br/>[ 63%] Building C object vio/CMakeFiles/vio.dir/vio.c.o<br/>[ 63%] Building C object vio/CMakeFiles/vio.dir/viosocket.c.o<br/>[ 63%] Building C object vio/CMakeFiles/vio.dir/viossl.c.o<br/>/root/setup/mysqlcom-5.5.31/vio/viossl.c: In function âssl_doâ:<br/>/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: âSSL_OP_NO_COMPRESSIONâ undeclared (first use in this function)<br/>/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: (Each undeclared identifier is reported only once<br/>/root/setup/mysqlcom-5.5.31/vio/viossl.c:175: error: for each function it appears in.)<br/>make[2]: *** [vio/CMakeFiles/vio.dir/viossl.c.o] Error 1<br/>make[1]: *** [vio/CMakeFiles/vio.dir/all] Error 2<br/>make: *** [all] Error 2[24 May 11:50] Erlend Dahl <br/>Bug #69080 mysql-5.5.31 not compatible with openssl-1.0.0 and lower<br/><br/>was marked as a duplicate.[8 Jun 0:07] Noel Butler <br/>5.5.32 also suffers same fate, i'm amazed oracle had ignored this and the simple included patch that fixes this.<br/>[13 Jun 10:40] Georgi Kodinov <br/>This openssl version is rather old. openssl recommends that you should consider upgrading to a later one. <br/>Is there any obstacle with you upgrading to a recent version ?<br/>Alternatively you can just download the binaries from http://dev.mysql.com/downloads.<br/>[13 Jun 10:44] Remi Collet <br/>> Is there any obstacle with you upgrading to a recent version ?<br/>Enterprise Linux distribution provides backport for security fix.<br/><br/>I don't think upgrade to a more recent version is even thinkable on RHEL, Oracle Linux or other clones.<br/>[13 Jun 10:57] Georgi Kodinov <br/>It's a bit unfortunate that there's no compile time way to check for the presence of that fix.<br/>Thanks for the explanations. It's a valid bug and needs to be fixed.<br/>[28 Jun 14:39] Georgi Kodinov <br/>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). <br/>Any chance that you would consider adding a define specific to your backport of the fix in this version that we can use ? <br/>E.g. adding something like this : <br/>#define OPENSSL_RHEL_COMPRESSION_FIX 1<br/>to openssl.h would work great.<br/>[29 Jun 14:04] Remi Collet <br/>@Georgi Kodinov sorry, I really don't understand the need.<br/><br/>Feel free to open a request for change on RHEL, but...<br/><br/>Why do you think you need this and don't simply #ifdef SSL_OP_NO_COMPRESSION<br/>[29 Jun 15:33] Hartmut Holzgraefe <br/>I don't understand why this can't be fixed by a simple #ifdef (as in the originally attached patch) either ...<br/>[1 Jul 11:51] Georgi Kodinov <br/>Remi,<br/><br/>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. <br/>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 <br/>Moving to "need feedback" based on the above question<br/>[30 Sep 1:00] Bugs System <br/>No feedback was provided for this bug for over a month, so it is<br/>being suspended automatically. If you are able to provide the<br/>information that was originally requested, please do so and change<br/>the status of the bug back to "Open".<br/>Tags - <a href="http://www.zhanghaijun.com/tags/mysql/" rel="tag">mysql</a> , <a href="http://www.zhanghaijun.com/tags/bug/" rel="tag">bug</a> , <a href="http://www.zhanghaijun.com/tags/ssl_op_no_compression/" rel="tag">ssl op no compression</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] error: ‘SSL_OP_NO_COMPRESSION’ undeclared (first use in this function)]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>