Opened 9 years ago

Closed 4 years ago

Last modified 4 years ago

#50699 closed defect (fixed)

Cannot build mysql56 - missing definition SHA256_DIGEST_LEN

Reported by: mouse07410 (Mouse) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: mysql56

Description (last modified by neverpanic (Clemens Lang))

Port mysql56 @5.6.29_3, Mac OS X Yosemite 10.10.5, Xcode-7.2.1. Current Macports.

Here's what's happening:

:info:build [ 20%] Building CXX object mysys_ssl/CMakeFiles/mysys_ssl.dir/my_default.cc.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/build/mysys_ssl && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++   -DHAVE_CONFIG_H -DHAVE_OPENSSL -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/extra/yassl/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl -I/opt/local/include  -pipe -Os -stdlib=libc++  -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -DNDEBUG -DDBUG_OFF -arch x86_64 -mmacosx-version-min=10.10   -o CMakeFiles/mysys_ssl.dir/my_default.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/my_default.cc
:info:build [ 20%] Linking C executable base64_test
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/build/mysys && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/base64_test.dir/link.txt --verbose=ON
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:260:19: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char A[DIGEST_LEN];
:info:build                   ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
:info:build #define DIGEST_LEN      SHA256_DIGEST_LENGTH
:info:build                         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:261:19: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char B[DIGEST_LEN];
:info:build                   ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
:info:build #define DIGEST_LEN      SHA256_DIGEST_LENGTH
:info:build                         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:262:20: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char DP[DIGEST_LEN];
:info:build                    ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
:info:build #define DIGEST_LEN      SHA256_DIGEST_LENGTH
:info:build                         ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -pipe -Os  -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -arch x86_64 -mmacosx-version-min=10.10 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/base64_test.dir/base64.c.o  -o base64_test  -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/extra/yassl/lib  libmysys.a ../dbug/libdbug.a libmysys.a ../dbug/libdbug.a ../strings/libstrings.a /opt/local/lib/libz.dylib -Wl,-rpath,/opt/local/lib 
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:263:20: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char DS[DIGEST_LEN];
:info:build                    ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
:info:build #define DIGEST_LEN      SHA256_DIGEST_LENGTH
:info:build                         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:264:3: error: unknown type name 'SHA256_CTX'
:info:build   DIGEST_CTX ctxA, ctxB, ctxC, ctxDP, ctxDS;
:info:build   ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:50:20: note: expanded from macro 'DIGEST_CTX'
:info:build #define DIGEST_CTX      SHA256_CTX
:info:build                         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:303:15: error: use of undeclared identifier 'ctxB'
:info:build   DIGESTInit(&ctxB);
:info:build               ^
:info:build 
......

Attachments (1)

mysql56.log (551.4 KB) - added by mouse07410 (Mouse) 9 years ago.
result of "sudo port upgrare mysql56" as of 2016-02-23

Download all attachments as: .zip

Change History (16)

comment:1 Changed 9 years ago by mouse07410 (Mouse)

Apologies - silly system does not allow editing what's entered, and I automatically used Github style of code entering (yeah, every site needs its own special format :).

comment:2 Changed 9 years ago by neverpanic (Clemens Lang)

Description: modified (diff)
Owner: changed from macports-tickets@… to pixilla@…

comment:3 Changed 9 years ago by mouse07410 (Mouse)

Could it be that mysql56 does not include <openssl/sha.h>?

comment:4 Changed 9 years ago by pixilla (Bradley Giesbrecht)

When building mysql with the bundled yassl the build system finds MacPorts openssl headers before the bundled yassl headers causing build errors. In r145938 I add the yassl include path before prefix which fixed building with yassl but evidently broke building with openssl. I am testing a refactored patch that is applied conditionally which should resolve this issue, with a commit soon to follow.

I'm still looking for a way to patch the mysql cmake build system to fix this apparent bug and any help is welcome!

Last edited 9 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

comment:5 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Does r145955 resolve this issue?

comment:6 in reply to:  5 ; Changed 9 years ago by pixilla (Bradley Giesbrecht)

Replying to pixilla@…:

Does r145955 resolve this issue?

Make that r145956 :/ how did r145955 even build?

comment:7 in reply to:  6 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Replying to pixilla@…:

Replying to pixilla@…:

Does r145955 resolve this issue?

Make that r145956 :/ how did r145955 even build?

Shall we try again r145957, cracking open svn manual...

comment:8 Changed 9 years ago by mouse07410 (Mouse)

Weird. Tried the update just now - got the very same thing:

$ sudo port upgrade mysql56
.........
.........
:info:build [ 20%] Building CXX object mysys_ssl/CMakeFiles/mysys_ssl.dir/my_default.cc.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/build/mysys_ssl && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++   -DHAVE_CONFIG_H -DHAVE_OPENSSL -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/extra/yassl/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl -I/opt/local/include  -pipe -Os -stdlib=libc++  -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -DNDEBUG -DDBUG_OFF -arch x86_64 -mmacosx-version-min=10.10   -o CMakeFiles/mysys_ssl.dir/my_default.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/my_default.cc
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:260:19: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char A[DIGEST_LEN];
:info:build                   ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
:info:build #define DIGEST_LEN      SHA256_DIGEST_LENGTH
:info:build                         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:261:19: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char B[DIGEST_LEN];
:info:build                   ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
:info:build #define DIGEST_LEN      SHA256_DIGEST_LENGTH
:info:build                         ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:262:20: error: use of undeclared identifier 'SHA256_DIGEST_LENGTH'
:info:build   unsigned char DP[DIGEST_LEN];
:info:build                    ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.29/mysys_ssl/crypt_genhash_impl.cc:54:20: note: expanded from macro 'DIGEST_LEN'
.........

Changed 9 years ago by mouse07410 (Mouse)

Attachment: mysql56.log added

result of "sudo port upgrare mysql56" as of 2016-02-23

comment:9 in reply to:  8 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Replying to uri@…:

Weird. Tried the update just now - got the very same thing:

Your log indicates you are building revision 3 and 4 is current.

port info --name --version --revision mysql56
version: 5.6.29
revision: 4
name: mysql56

Sync and try again.

sudo port sync
sudo port upgrade mysql56
Last edited 9 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

comment:10 Changed 9 years ago by pixilla (Bradley Giesbrecht)

uri: I see from the log you have the default macports prefix /opt/local so unless the mysql bundled yassl does not meet your needs you may want to drop the +openssl variant and receive the benefits of a binary install.

Last edited 9 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

comment:11 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Mysql56 now builds with yaSSL by default:

port variants mysql56
mysql56 has the variants:
   debug: Enable debug binaries
   openssl: Instead of the bundled yaSSL use OpenSSL
   universal: Build for multiple architectures

comment:12 Changed 9 years ago by mouse07410 (Mouse)

Thank you! I confirm that

$ sudo port -fsn install mysql56

succeeds, getting the current mysql56 retrieved, compiled, and installed.

I'm still concerned that it does not build correctly with the TLS standard of the industry - OpenSSL. The problem seems that mysql56 somehow doesn't figure that Macports also installed OpenSSL-1.0.2f in /opt/local, so the required file it needs to pull is

/opt/local/include/openssl/sha.h

I made sure it contains the definition that the build process complains about.

Is it feasible to get this fixed?

comment:13 Changed 6 years ago by mf2k (Frank Schima)

Owner: pixilla deleted
Status: newassigned

See #57827

comment:14 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

comment:15 Changed 4 years ago by mf2k (Frank Schima)

Keywords: SHA256_DIGEST_LEN missing removed
Note: See TracTickets for help on using tickets.