Opened 5 years ago

Closed 5 years ago

#58555 closed defect (worksforme)

mysql8 @8.0.16 build failure: No rule to make target `/opt/local/lib/libsasl2.dylib'

Reported by: haraldgroven (Harald) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc:
Port: mysql8

Description

I was able to build mysql8-server+mysql8 on a clean install mac running 10.14 Mojave. However, when trying to install on a similar machine with mysql57-server already installed, upgrade to mysql8-server failed. After reinstalling macports, the build error persisted.

Maybe this build error affect other standard Mysql upgrades.

:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql8/mysql8/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql8/mysql8/work/build" && /usr/bin/make -j12 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build mysql8: command execution failed
:debug:build Error code: CHILDSTATUS 53988 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build 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.

Attached /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql8/mysql8/main.log

Attachments (1)

mysql8_main_errorlog.txt (158.0 KB) - added by haraldgroven (Harald) 5 years ago.

Download all attachments as: .zip

Change History (17)

Changed 5 years ago by haraldgroven (Harald)

Attachment: mysql8_main_errorlog.txt added

comment:1 Changed 5 years ago by herbygillot (Herby Gillot)

Thanks for reporting this, Harald.

Might it be possible for you to list what's currently active on the machine where the build is failing? (port list active)

comment:2 Changed 5 years ago by haraldgroven (Harald)

The following ports are currently installed:

port installed active
The following ports are currently installed:
  apache2 @2.4.39_0+preforkmpm (active)
  apr @1.6.5_0 (active)
  apr-util @1.6.1_2 (active)
  autoconf @2.69_5 (active)
  bzip2 @1.0.6_0 (active)
  cmake @3.14.4_0 (active)
  curl @7.64.1_0+ssl (active)
  curl-ca-bundle @7.64.1_0 (active)
  db48 @4.8.30_4 (active)
  expat @2.2.6_1 (active)
  freetype @2.10.0_0 (active)
  gdbm @1.18.1_1 (active)
  gettext @0.19.8.1_2 (active)
  ghc @7.8.3_6 (active)
  giflib @4.2.3_0+x11 (active)
  glib2 @2.58.3_0+x11 (active)
  gmp @6.1.2_1 (active)
  gsed @4.7_0 (active)
  hs-aeson @0.7.0.4_1 (active)
  hs-alex @3.1.3_1 (active)
  hs-async @2.0.1.5_1 (active)
  hs-attoparsec @0.10.4.0_4 (active)
  hs-base-unicode-symbols @0.2.2.4_2 (active)
  hs-base64-bytestring @1.0.0.1_5 (active)
  hs-blaze-builder @0.3.3.4_1 (active)
  hs-blaze-html @0.7.0.3_1 (active)
  hs-blaze-markup @0.6.2.0_1 (active)
  hs-conduit @1.2.3.1_1 (active)
  hs-data-default @0.5.3_4 (active)
  hs-data-default-class @0.0.1_3 (active)
  hs-data-default-instances-base @0.0.1_3 (active)
  hs-data-default-instances-containers @0.0.1_3 (active)
  hs-data-default-instances-dlist @0.0.1_4 (active)
  hs-data-default-instances-old-locale @0.0.1_3 (active)
  hs-deepseq-generics @0.1.1.2_1 (active)
  hs-digest @0.0.1.2_5 (active)
  hs-dlist @0.6.0.1_2 (active)
  hs-enclosed-exceptions @1.0.1_1 (active)
  hs-exceptions @0.6.1_1 (active)
  hs-extensible-exceptions @0.1.1.4_3 (active)
  hs-happy @1.19.4_1 (active)
  hs-hashable @1.2.2.0_1 (active)
  hs-highlighting-kate @0.5.11.1_1 (active)
  hs-hslua @0.3.9_2 (active)
  hs-http @4000.2.10_1 (active)
  hs-lifted-base @0.2.1.1_2 (active)
  hs-mmorph @1.0.0_2 (active)
  hs-monad-control @0.3.2.2_2 (active)
  hs-mtl @2.1.3.1_1 (active)
  hs-nats @0.1.2_2 (active)
  hs-network @2.4.2.3_1 (active)
  hs-pandoc-types @1.12.4.1_2 (active)
  hs-parsec @3.1.5_1 (active)
  hs-pcre-light @0.4.0.3_1 (active)
  hs-primitive @0.5.2.1_1 (active)
  hs-quickcheck @2.6_3 (active)
  hs-random @1.0.1.1_5 (active)
  hs-resourcet @1.1.3.3_1 (active)
  hs-scientific @0.2.0.2_1 (active)
  hs-semigroups @0.16.0.1_1 (active)
  hs-sha @1.6.4.1_1 (active)
  hs-stm @2.4.2_3 (active)
  hs-syb @0.4.1_1 (active)
  hs-tagsoup @0.13.3_1 (active)
  hs-temporary @1.2.0.3_1 (active)
  hs-texmath @0.6.6.3_1 (active)
  hs-text @1.1.0.0_1 (active)
  hs-transformers-base @0.4.1_2 (active)
  hs-unordered-containers @0.2.4.0_1 (active)
  hs-utf8-string @0.3.7_5 (active)
  hs-vector @0.10.9.1_1 (active)
  hs-void @0.7_1 (active)
  hs-xml @1.3.13_3 (active)
  hs-yaml @0.8.10.1_1 (active)
  hs-zip-archive @0.1.4_1 (active)
  hs-zlib @0.5.4.1_4 (active)
  icu @58.2_2 (active)
  jpeg @9c_0 (active)
  libarchive @3.3.3_1 (active)
  libcxx @5.0.1_4 (active)
  libedit @20190324-3.1_0 (active)
  libffi @3.2.1_0 (active)
  libiconv @1.16_0 (active)
  libidn2 @2.2.0_0 (active)
  libmcrypt @2.5.8_1 (active)
  libpng @1.6.37_0 (active)
  libpsl @0.21.0-20190419_0 (active)
  libtool @2.4.6_6 (active)
  libunistring @0.9.10_0 (active)
  libuv @1.29.1_0 (active)
  libxml2 @2.9.9_1 (active)
  libxslt @1.1.33_1 (active)
  libzip @1.5.2_0 (active)
  llvm-3.5 @3.5.2_9 (active)
  llvm_select @2_0 (active)
  lz4 @1.9.1_0 (active)
  lzo2 @2.10_0 (active)
  mhash @0.9.9.9_1 (active)
  mysql57 @5.7.26_0 (active)
  mysql57-server @5.7.26_0 (active)
  mysql_select @0.1.2_3 (active)
  ncurses @6.1_0 (active)
  openssl @1.0.2s_0 (active)
  pandoc @1.12.4.2_1 (active)
  pcre @8.43_0 (active)
  pcre2 @10.33_0 (active)
  perl5 @5.26.1_0+perl5_28 (active)
  perl5.28 @5.28.2_0 (active)
  php73 @7.3.5_0+libedit (active)
  php73-apache2handler @7.3.5_0 (active)
  php73-cgi @7.3.5_0 (active)
  php73-fpm @7.3.5_0 (active)
  php73-gd @7.3.5_0 (active)
  php73-mbstring @7.3.5_0 (active)
  php73-mcrypt @1.0.2_0 (active)
  php73-mysql @7.3.5_0+mysqlnd (active)
  php73-odbc @7.3.5_0+unixodbc (active)
  php73-postgresql @7.3.5_0+postgresql10 (active)
  php73-sqlite @7.3.5_0 (active)
  php73-zip @1.15.4_0 (active)
  php_select @1.0_0 (active)
  phpmyadmin @4.8.5_0+php73 (active)
  pkgconfig @0.29.2_0 (active)
  postgresql10 @10.8_1 (active)
  postgresql_select @0.4_0 (active)
  python2_select @0.0_3 (active)
  python27 @2.7.16_1 (active)
  python_select @0.3_8 (active)
  readline @8.0.000_0 (active)
  sqlite3 @3.28.0_0 (active)
  tiff @4.0.10_1 (active)
  unixODBC @2.3.7_1 (active)
  webp @1.0.2_0 (active)
  xorg-libice @1.0.9_1 (active)
  xorg-libpthread-stubs @0.4_0 (active)
  xorg-libsm @1.2.3_0 (active)
  xorg-libX11 @1.6.7_0 (active)
  xorg-libXau @1.0.9_0 (active)
  xorg-libxcb @1.13.1_0+python27 (active)
  xorg-libXdmcp @1.1.3_0 (active)
  xorg-xcb-proto @1.13_1+python27 (active)
  xorg-xorgproto @2018.4_0 (active)
  xz @5.2.4_0 (active)
  zlib @1.2.11_0 (active)
  zstd @1.4.0_0 (active)

Last edited 5 years ago by haraldgroven (Harald) (previous) (diff)

comment:3 in reply to:  1 Changed 5 years ago by jmroot (Joshua Root)

Cc: herbygillot removed
Keywords: mysql8 removed
Owner: set to herbygillot
Port: mysql8 added; mysql8-server removed
Priority: Not setNormal
Status: newassigned
Summary: mysql8-server Failed to build mysql8mysql8 @8.0.16 build failure: No rule to make target `/opt/local/lib/libsasl2.dylib'

Replying to herbygillot:

Might it be possible for you to list what's currently active on the machine where the build is failing? (port list active)

Don't use port list for this; it will show you the available version of each specified port, not the version that is installed. Use port installed (e.g. port installed active) to find out what is installed.

comment:4 Changed 5 years ago by herbygillot (Herby Gillot)

Thank you for the correction, jmroot. haraldgroven, I'm actually unable to reproduce - I have MySQL8 successfully building and running alongside MySQL 5.7. What is the OS and XCode version where this is happening? Is it also Mojave? The following command might help:

echo "macOS $(sw_vers -productVersion) $(sw_vers -buildVersion)"; echo "Xcode $(xcodebuild -version | awk '{print $NF}' | tr '\n' ' ')" 

And also perhaps you can try running @jmroot's suggestion as well.

comment:5 Changed 5 years ago by haraldgroven (Harald)

Thank you @herbygillot for looking into this issue.

According to the error log (attached), is it possible to infer which step in the build process it is crashing? Maybe the install script assumes some directory or file permissions which may deviate from a clean install OS. Since the problem persisted after I reinstalled Macports, I assume that its not caused by conflicts with other ports.

Environment:

echo "macOS $(sw_vers -productVersion) $(sw_vers -buildVersion)"; echo "Xcode $(xcodebuild -version | awk '{print $NF}' | tr '\n' ' ')" 
macOS 10.14.4 18E226
Xcode 10.2.1 10E1001 
Last edited 5 years ago by haraldgroven (Harald) (previous) (diff)

comment:6 Changed 5 years ago by herbygillot (Herby Gillot)

@haraldgroven thanks for your patience on this.

I've installed the dependencies you listed in a fresh 10.14 environment and was able to successfully build MySQL 8 alongside 5.7 again, so unfortunately I am again unable to reproduce this issue.

Looking at the log again:

:info:build make[2]: *** No rule to make target `/opt/local/lib/libsasl2.dylib', needed by `plugin_output_directory/authentication_ldap_sasl_client.so'.  Stop.
584	:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql8/mysql8/work/build'
585	:info:build /Applications/Xcode.app/Contents/Developer/usr/bin/make -f storage/csv/CMakeFiles/csv.dir/build.make storage/csv/CMakeFiles/csv.dir/build
586	:info:build make[1]: *** [libmysql/authentication_ldap/CMakeFiles/authentication_ldap_sasl_client.dir/all] Error 2
587	:info:build make[1]: *** Waiting for unfinished jobs....

...this is definitely weird. Even after the dependency install and build, I don't see a copy of libsasl2.dylib in the Macports tree (/opt/local/lib). This seems to be a macOS system lib, found in /usr/lib, so the build process trying to either find or build it in /opt/local/lib is abnormal.

You mention you are uninstalling and reinstalling MacPorts - did that include removing your prior MacPorts tree? ie., did you delete /opt/local as part of the uninstall process? That might be a bit of a hassle, but I think doing that would be a proper clean reset. You will probably want to backup configuration files you care about from /opt/local/etc and data from /opt/local/var/db beforehand.

The MacPorts official guide actually recommends an even more thorough process:

https://guide.macports.org/chunked/installing.macports.uninstalling.html

I wish I had a better suggestion, but as I am unable to reproduce the issue, I think it's worth trying a full MacPorts reset to see if the issue still persists afterwards.

comment:7 Changed 5 years ago by josephsacco

mysql8 does not build if boost @1.66 is installed. In theory that should not matter since the mysql8 build downloads boost @1.69 into the work directory. In practice there are some include-path issues. If boost @1.66 is temporarily deactivated, mysql8 builds and runs.

-Joseph

comment:8 Changed 5 years ago by herbygillot (Herby Gillot)

Thanks @josephsacco. I've created a separate issue to track this: #58563

comment:9 Changed 5 years ago by herbygillot (Herby Gillot)

Cc: herbygillot added

comment:10 Changed 5 years ago by herbygillot (Herby Gillot)

Cc: herbygillot removed

comment:11 Changed 5 years ago by jmroot (Joshua Root)

% port provides /opt/local/lib/libsasl2.dylib
/opt/local/lib/libsasl2.dylib is provided by: cyrus-sasl2

Could this port have been installed previously? The attached log is not from a clean build (starts with the configure phase already complete); have you tried cleaning? Even if that doesn't solve the problem, having a complete log may help.

If mysql8 is opportunistically using cyrus-sasl2 without declaring a dependency, that should be fixed.

comment:12 Changed 5 years ago by herbygillot (Herby Gillot)

comment:13 Changed 5 years ago by herbygillot (Herby Gillot)

OK, we're just adding cyrus-sasl2 as a build dependency and building MySQL 8's libsasl requirement against that. The fix has been merged into master.

comment:14 Changed 5 years ago by herbygillot (Herby Gillot)

@haraldgroven can you verify you're all good here? I think we can close this one out.

comment:15 Changed 5 years ago by haraldgroven (Harald)

I was unable to make mysql8-server install successfully by cleaning and reinstalling Macports. Solved by making a clean install of OSX, Macports and mysql8-server.

Last edited 5 years ago by haraldgroven (Harald) (previous) (diff)

comment:16 Changed 5 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.