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:

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