Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70763

[Qt 5.12.0 beta1] Unable to run Assistant with static build on Windows (mingw7.3.0) and macOS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Invalid
    • Affects Version/s: 5.12.0 Beta 1
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
    • Environment:
      macOS 10.12(Xcode 8.3.3
      Build version 8E3004b
      ) and with macOS 10.13 (Xcode 9.x.x)
      and Windows 10 (mingw7.3.0)
    • Platform/s:
      macOS, Windows

      Description

      It seems that MySQL is not correctly picked up at runtime on a static build when trying to run Assistant.

      Configure options used:

       ./configure -plugin-sql-mysql -xplatform macx-clang -sdk macosx -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 -sysconfdir /Library/Preferences/Qt -I/usr/local/opt/openssl/include -confirm-license -nomake tests -verbose -debug-and-release -release -nomake examples -skip qtwebengine -skip qtwebview -skip qt3d -commercial -static -prefix /Users/qt/RTA/src-5.12/qtbase

      The PATH:

       PATH=/usr/local/opt/openssl/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin/:/Applications/CMake.app/Contents/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/squish/squish-6.3.2/bin:/opt/mysql57/bin:/Applications/Postgres.app/Contents/Versions/9.6/bin:/opt/local/lib/mysql55/bin:/opt/local/lib/postgresql91/bin
      
      MYSQLBINPATH=/opt/mysql57/bin
       

      Config.tests find MySQL:

       Checking for MySQL... 
      Trying source 0 (type mysqlConfig) of library mysql ...
      + /opt/mysql57/bin/mysql_config --version
      > 5.7.15
      + /opt/mysql57/bin/mysql_config --libs_r
      > -L/opt/mysql57/lib -lmysqlclient 
      + /opt/mysql57/bin/mysql_config --include
      > -I/opt/mysql57/include
      + cd /Users/qt/RTA/src-5.12/config.tests/mysql && /Users/qt/RTA/src-5.12/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" 'INCLUDEPATH += /usr/local/opt/openssl/include' 'QMAKE_USE += mysql' 'QMAKE_LIBS_MYSQL = -L/opt/mysql57/lib -lmysqlclient' 'QMAKE_INCDIR_MYSQL = /opt/mysql57/include' /Users/qt/RTA/src-5.12/config.tests/mysql
      + cd /Users/qt/RTA/src-5.12/config.tests/mysql && MAKEFLAGS= /usr/bin/make
      > /Applications/Xcode8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -w -fPIC  -I. -I/usr/local/opt/openssl/include -I/opt/mysql57/include -I/Users/qt/RTA/src-5.12/qtbase/mkspecs/macx-clang -o main.o main.cpp
      > /Applications/Xcode8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.12 -Wl,-rpath,@executable_path/Frameworks -o mysql main.o   -L/opt/mysql57/lib -lmysqlclient 
       => source accepted.
      test config.qtbase_sqldrivers.libraries.mysql succeeded

      But when trying to run Assistant it gives:

       qt$ ./Assistant.app/Contents/MacOS/Assistant 
      dyld: Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib
        Referenced from: /Users/qt/RTA/src-5.12/qtbase/bin/./Assistant.app/Contents/MacOS/Assistant
        Reason: image not found
      Abort trap: 6
      

      The path /usr/local/mysql is nonexistent on the (Coin virtual) machine, looks like it's a hard coded path, since the mysql on (Coin virtual) machines is in /opt/mysql57.

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              buddenha Oswald Buddenhagen
              Reporter:
              mipohjan Milla Pohjanheimo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes