Opened 2 days ago

Closed 21 minutes ago

#70314 closed defect (fixed)

mysql8 @8.4.0_4: ld: symbol(s) not found for architecture x86_64

Reported by: BjarneDMat Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: jhoyt4
Port: mysql8

Description (last modified by ryandesign (Ryan Carsten Schmidt))

$=> system_profiler -detailLevel mini SPHardwareDataType SPSoftwareDataType 
Hardware:
    Hardware Overview:
      Model Name: Mac Pro
      Model Identifier: MacPro5,1
      Hyper-Threading Technology: Enabled
      Boot ROM Version: 9144.0.9.2.0
      SMC Version (system): 1.39f11
Software:
    System Software Overview:
      System Version: macOS 10.15.7 (19H1519)
      Kernel Version: Darwin 19.6.0
:debug:main Starting logging for mysql8 @8.4.0_4
:debug:sysinfo macOS 10.15.7 (darwin/19.6.0) arch i386
:debug:sysinfo MacPorts 2.9.3
:debug:sysinfo Xcode 12.4, CLT 12.4.0.0.1.1610135815
:debug:sysinfo SDK 10.15
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.15
:info:build [ 22%] Built target ndbportlib
:info:build Undefined symbols for architecture x86_64:
:info:build   "_EVP_CIPHER_get_block_size", referenced from:
:info:build       my_aes_get_size(unsigned int, my_aes_opmode) in libmysys.a(my_aes_openssl.cc.o)
:info:build   "_EVP_CIPHER_get_iv_length", referenced from:
:info:build       my_aes_encrypt(unsigned char const*, unsigned int, unsigned char*, unsigned char const*, unsigned int, my_aes_opmode, unsigned char const*, bool, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*) in libmysys.a(my_aes_openssl.cc.o)
:info:build       my_aes_decrypt(unsigned char const*, unsigned int, unsigned char*, unsigned char const*, unsigned int, my_aes_opmode, unsigned char const*, bool, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*) in libmysys.a(my_aes_openssl.cc.o)
:info:build       my_aes_needs_iv(my_aes_opmode) in libmysys.a(my_aes_openssl.cc.o)
:info:build   "_EVP_PKEY_CTX_add1_hkdf_info", referenced from:
:info:build       Key_hkdf_function::derive_key(unsigned char const*, unsigned int, unsigned char*, unsigned int) in libmysys.a(my_kdf.cc.o)
:info:build   "_EVP_PKEY_CTX_set1_hkdf_key", referenced from:
:info:build       Key_hkdf_function::derive_key(unsigned char const*, unsigned int, unsigned char*, unsigned int) in libmysys.a(my_kdf.cc.o)
:info:build   "_EVP_PKEY_CTX_set1_hkdf_salt", referenced from:
:info:build       Key_hkdf_function::derive_key(unsigned char const*, unsigned int, unsigned char*, unsigned int) in libmysys.a(my_kdf.cc.o)
:info:build   "_EVP_PKEY_CTX_set_hkdf_md", referenced from:
:info:build       Key_hkdf_function::derive_key(unsigned char const*, unsigned int, unsigned char*, unsigned int) in libmysys.a(my_kdf.cc.o)
:info:build ld: symbol(s) not found for architecture x86_64

It looks as if the changes jhoyt4 made in https://github.com/macports/macports-ports/pull/24615 has introduced some new errors for architecture x86_64.
mysql8 @8.4.0_3 does compile & install and works correctly w/ my PR https://github.com/macports/macports-ports/pull/24232
I have de-activated boost178 as described in #70061

Attachments (1)

main.log (2.2 MB) - added by BjarneDMat 2 days ago.

Change History (14)

Changed 2 days ago by BjarneDMat

Attachment: main.log added

comment:1 Changed 35 hours ago by jhoyt4

Actually, you're trying to build against the update pushed in PR24696 https://github.com/macports/macports-ports/pull/24696

That's a newer PR that removes the cmake patches I hacked up and performs the install using the "system" mechanism that mysql8 devs said we should be using (not trying to be pendantic, just trying to help triage which mod).

":debug:main Starting logging for mysql8 @8.4.0_4" tells me that much.

Also 8.4.0_4 should be the version your report in the bug report.

Have you tested against 8.4.1? @herbygillot just pushed an update to that version [c0c4e0b8f9d7466a5ac3198fba11b22adf9f6f08/macports-ports]

I'm not claiming 8.4.1 will solve the problem - just trying to get a better baseline.

Very curious how this got through the CI chain and the builders without erroring on the OS 12 and OS 13 runners which run x86_64.

Last edited 27 hours ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 35 hours ago by jhoyt4

Just built successfully on:

macOS 14.5 23F79 x86_64
Xcode 15.3 15E204a

No issues

Perhaps this is isolated to Catalina and other "older" OSes?

Last edited 35 hours ago by jhoyt4 (previous) (diff)

comment:3 Changed 35 hours ago by jhoyt4

Have you upgraded openssl3 lately?

comment:4 Changed 27 hours ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: set to herbygillot
Status: newassigned
Summary: [mysql8] ld: symbol(s) not found for architecture x86_64mysql8 @8.4.0_4: ld: symbol(s) not found for architecture x86_64

comment:5 Changed 23 hours ago by BjarneDMat

I tried re-introducing the patches from 8.4.0_3 into 8.4.0_4 & it compiled.

openssl3 @3.3.1_1 (active)

Presently, I'm trying to triage regarding whitch patch fixes the issue. Also trying 8.4.1_0.

comment:6 Changed 21 hours ago by BjarneDMat

8.4.1_0 fails to compile on system as reported w/ the same errors

Re-Introducing patch-ssl.cmake.diff fixes the issue in both 8.4.0_4 and 8.4.1_0

Now, to triage patch-ssl.cmake.diff to see which part(s) of the patch (is|are) necessary.

comment:7 Changed 19 hours ago by BjarneDMat

The second part - @@ -350,9 +352,26 @@ - of patch-ssl.cmake.diff is the only one necessary in order for 8.4.1_0 to compile on my reported system.

comment:8 Changed 12 hours ago by jhoyt4

Interesting, I have no clue why cmake sets OPENSSL_ROOT_DIR automatically on newer systems but not on Catalina.

Would you mind trying to compile again, this time leave off the patch and remove this line 172 from the portfile:

-DOPENSSL_ROOT_DIR=[openssl::install_area] \

I may have been overzealous in my attempt to remove flags from the openssl portgroup. If this works for you, IMHO this would be a better solution that carrying an extra patchfile.

comment:9 Changed 12 hours ago by jhoyt4

For those following along, the reason why @@ -350,9 +352,26 @@ - of patch-ssl.cmake.diff works is it removes the following logic from the cmake process:

-  # For APPLE we set the hint ${HOMEBREW_HOME}/openssl
-  IF(APPLE AND NOT OPENSSL_ROOT_DIR)
-    SET(OPENSSL_ROOT_DIR "${HOMEBREW_HOME}/openssl")

For some reason (...and because I removed the openssl portgroup flag...), cmake is not setting OPENSSL_ROOT_DIR on Catalina, and so the logic is setting that value to homebrew's default.

comment:10 Changed 12 hours ago by jhoyt4

PR opened to resolve: https://github.com/macports/macports-ports/pull/24779

I'll convert from draft to final once @BjarneDMat confirms this is resolved by fixing the flag or whether it needs the patch file.

comment:11 in reply to:  8 Changed 59 minutes ago by BjarneDMat

Replying to jhoyt4:

Would you mind trying to compile again, this time leave off the patch and remove this line 172 from the portfile:

-DOPENSSL_ROOT_DIR=[openssl::install_area] \

SUCCESS :-)

comment:12 Changed 58 minutes ago by jhoyt4

awesome, thank you for checking!

comment:13 Changed 21 minutes ago by jhoyt4

Resolution: fixed
Status: assignedclosed

In c040148701cbbe5c7478a3f96bbd76c2c38a9bb0/macports-ports (master):

mysql8: Add missing cmake PortGroup Flag OPENSSL_ROOT_DIR

On older versions of macOS, cmake does not automatically set the
OPENSSL_ROOT_DIR flag. This flag needs to be set to avoid tripping
hard-coded Homebrew logic in the ssl.cmake cmake file.

Closes: #70314

Note: See TracTickets for help on using tickets.