Bug #85377 MySQL Router 2.1.2 Release Candidate errors when compiling with openssl
Submitted: 8 Mar 2017 15:16 Modified: 8 Mar 2017 16:13
Reporter: Jason Miele Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Router Severity:S2 (Serious)
Version:2.1.2 rc OS:CentOS (7)
Assigned to: CPU Architecture:Any
Tags: mysql-router, openssl

[8 Mar 2017 15:16] Jason Miele
This is the same bug as Bug #85068 but has not been fixed from the labs version to the new Release Candidate.  

"MySQL Router 2.1.2-RC" throws an error when trying to make with openssl (vs yaSSL).  

/home/centos/mysql-router-2.1.2-rc/src/router/src/common/my_aes_openssl.cc: In function ‘my_bool myaes::my_aes_needs_iv(myaes::my_aes_opmode)’:
/home/centos/mysql-router-2.1.2-rc/src/router/src/common/my_aes_openssl.cc:225:45: error: new declaration ‘my_bool myaes::my_aes_needs_iv(myaes::my_aes_opmode)’
 my_bool my_aes_needs_iv(my_aes_opmode opmode)
In file included from /home/centos/mysql-router-2.1.2-rc/src/router/src/common/my_aes_openssl.cc:22:0:
/home/centos/mysql-router-2.1.2-rc/src/router/include/mysqlrouter/my_aes.h:135:6: error: ambiguates old declaration ‘bool myaes::my_aes_needs_iv(myaes::my_aes_opmode)’

How to repeat:
cmake MySQL-Router with 

/home/centos/cmake-3.8.0/bin/cmake . -DWITH_PROTOBUF=/home/centos/protobuf-3.0.0 -DWITH_MYSQL=/home/centos/mysql-5.7.17/ -DProtobuf_SRC_ROOT_FOLDER=/home/centos/protobuf-3.0.0/src -DProtobuf_PROTOC_EXECUTABLE=/home/centos/protobuf-3.0.0/src/protoc -DWITH_SSL=system -DCMAKE_CXX_FLAGS="-I\"/home/centos/mysql-5.7.17/include\""

the -DCMAKE_CXX_FLAGS moves the error a little farther along from the original error:
/home/centos/mysql-router-2.1.2-rc/src/router/src/common/my_aes_openssl.cc:20:23: fatal error: my_global.h: No such file or directory
 #include <my_global.h>
compilation terminated.
make[2]: *** [harness/harness/CMakeFiles/harness-library.dir/__/__/src/router/src/common/my_aes_openssl.cc.o] Error 1

Suggested fix:
Make OpenSSL the default SSL library
[8 Mar 2017 16:13] Miguel Solorzano
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.
[23 Mar 2017 0:21] Philip Olson
Fixed as of the upcoming MySQL Router 2.1.3 release, and here's the changelog entry:

  Router would compile against yaSSL but not OpenSSL.

Thank you for the bug report.