Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#63641 closed defect (fixed)

mysql8 @8.0.26: install_name_tool: can't create output file: /opt/local/libexec/openssl11/lib/libssl.dylib.XXXXXX (Operation not permitted)

Reported by: j-mac344 Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: chrstphrchvz (Christopher Chavez)
Port: mysql8

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

--->  Configuring mysql8
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  setns: found in build/CMakeFiles/CMakeError.log
  exit: found in build/CMakeFiles/CMakeError.log
  memset: found in build/CMakeFiles/CMakeError.log
--->  Building mysql8
Error: Failed to build mysql8: command execution failed  
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql8/mysql8/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port mysql8-server failed

Attachments (3)

MySQL8 Build Fail.txt (4.8 KB) - added by j-mac344 3 years ago.
CMakeError.log (239.0 KB) - added by j-mac344 3 years ago.
main.log (2.4 MB) - added by j-mac344 3 years ago.

Change History (14)

Changed 3 years ago by j-mac344

Attachment: MySQL8 Build Fail.txt added

Changed 3 years ago by j-mac344

Attachment: CMakeError.log added

comment:1 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Could the reporter please attach main.log instead? The provided attachments do not indicate the error that occurred during the build phase.

comment:2 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

Changed 3 years ago by j-mac344

Attachment: main.log added

comment:3 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

The build ultimately fails with:

:info:build error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't create output file: /opt/local/libexec/openssl11/lib/libssl.dylib.XXXXXX (Operation not permitted)
:info:build fatal error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: cannot rename /opt/local/libexec/openssl11/lib/libssl.1.1.dylib to /opt/local/libexec/openssl11/lib/libssl.dylib.XXXXXX (No such file or directory)

But I notice something strange is happening to the paths to libssl.dylib and libcrypto.dylib, where a bogus path is being used. Examples:

_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql8/mysql8/work/build/plugin_output_directory && /opt/local/bin/cmake -E create_symlink ../lib//opt/local/libexec/openssl11/lib/libcrypto.dylib /opt/local/libexec/openssl11/lib/libcrypto.dylib
:info:build Error copying file "/opt/local/lib//opt/local/libexec/openssl11/lib/libssl.dylib" to ".//opt/local/libexec/openssl11/lib/libssl.dylib".
:info:build Error copying file "/opt/local/lib//opt/local/libexec/openssl11/lib/libcrypto.dylib" to ".//opt/local/libexec/openssl11/lib/libcrypto.dylib".

I don’t know what is causing these errors; I have not tried to reproduce them. Could these errors have something to do with the openssl port recently being made a shim for openssl11?

comment:4 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Can someone please assign this ticket to the maintainer (herbygillot) so that they are notified?

comment:5 Changed 3 years ago by neverpanic (Clemens Lang)

Owner: set to herbygillot
Status: newassigned

comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: mysql8 removed
Summary: mysql8 8.0.26: Build Fails - command execution failedmysql8 @8.0.26: install_name_tool: can't create output file: /opt/local/libexec/openssl11/lib/libssl.dylib.XXXXXX (Operation not permitted)

comment:7 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

I believe I have reproduced this issue while attempting to update the port to 8.0.27: https://github.com/macports/macports-ports/pull/12638

comment:8 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Prior to openssl being a shim port, these symbolic links used to point directly to versioned libraries:

${prefix}/lib/libcrypto.dylib -> libcrypto.1.1.dylib
${prefix}/lib/libssl.dylib -> libssl.1.1.dylib

Whereas the shim port now points them to other symbolic links:

${prefix}/lib/libcrypto.dylib ->${prefix}/libexec/openssl11/lib/libcrypto.dylib
${prefix}/lib/libssl.dylib ->${prefix}/libexec/openssl11/lib/libssl.dylib

I suspect the issue is that a MySQL CMake script assumes that the ${prefix}/lib/libcrypto.dylib and ${prefix}/lib/libssl.dylib symbolic links do not in turn point to other symbolic links. See https://github.com/mysql/mysql-server/blob/beb865a960b9a8a16cf999c323e46c5b0c67f21f/cmake/ssl.cmake#L381-L389

Should MacPorts not be pointing ${prefix}/lib/libcrypto.dylib and ${prefix}/lib/libssl.dylib to other symbolic links, or should software e.g. MySQL accommodate the approach used by the shim port?

comment:9 Changed 3 years ago by cjones051073 (Chris Jones)

My gut reaction is a sym. link to a sym. link is a perfectly valid thing, so if MySQL is indeed tripping over this it is for me a bug on their behalf and should be reported back to them.

Note, one way out in the meantime is to update the port to not use the shim openssl port, but instead use the openssl PG that can be used to help configure the port to directly use the installation under libexec, thus avoiding the second level of sim. links.

comment:10 Changed 3 years ago by Chris Jones <jonesc@…>

Resolution: fixed
Status: assignedclosed

In 9a562bef5fed999e91a6f228b8cc6076631f886f/macports-ports (master):

mysql8: Use openssl PG to configure build
Closes: #63641

comment:11 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

The neglected percona port is also likely affected as it uses the same CMake script code.

Note: See TracTickets for help on using tickets.