Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.15.2 MySQL plugin for M1 architecture
Forum Updated to NodeBB v4.3 + New Features

Qt 5.15.2 MySQL plugin for M1 architecture

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 324 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SafariDrip
    wrote on last edited by
    #1

    Hello!

    For a few days now, I have been attempting to create a MySQL plugin for my M1 Mac. However, even after finding several guides on the forum, I was not successful, as I have either found guides for Qt 6 or guides for Intel based MacBooks.

    I have followed the steps as described on the Qt 5 wiki and I have most probably identified the problem:

    > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -o mysql main.o   -L/opt/homebrew/Cellar/mysql/8.0.32/lib -lmysqlclient -L/opt/homebrew/lib -L/opt/homebrew/opt/openssl@1.1/lib   
    
    > > ld: warning: ignoring file /opt/homebrew/Cellar/mysql/8.0.32/lib/libmysqlclient.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
    
    

    Is there any way I can make qmake build for arm64 architecture, or is it that I cannot build a MySQL plugin for arm64 architecture whatsoever?

    Thank you very much for your time and effort.

    SGaistS 1 Reply Last reply
    0
    • S SafariDrip

      Hello!

      For a few days now, I have been attempting to create a MySQL plugin for my M1 Mac. However, even after finding several guides on the forum, I was not successful, as I have either found guides for Qt 6 or guides for Intel based MacBooks.

      I have followed the steps as described on the Qt 5 wiki and I have most probably identified the problem:

      > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -o mysql main.o   -L/opt/homebrew/Cellar/mysql/8.0.32/lib -lmysqlclient -L/opt/homebrew/lib -L/opt/homebrew/opt/openssl@1.1/lib   
      
      > > ld: warning: ignoring file /opt/homebrew/Cellar/mysql/8.0.32/lib/libmysqlclient.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
      
      

      Is there any way I can make qmake build for arm64 architecture, or is it that I cannot build a MySQL plugin for arm64 architecture whatsoever?

      Thank you very much for your time and effort.

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You have to build the plugin for x86_64. Qt 5.15.2 was released before the M1 was generally available.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        You have to build the plugin for x86_64. Qt 5.15.2 was released before the M1 was generally available.

        S Offline
        S Offline
        SafariDrip
        wrote on last edited by
        #3

        @SGaist Ah, I understand, thank you for your quick reply. Does the same issue apply to other types of SQL plugins? I was thinking that I would switch to Postgre in case that MySQL would not work out.

        SGaistS 1 Reply Last reply
        0
        • S SafariDrip

          @SGaist Ah, I understand, thank you for your quick reply. Does the same issue apply to other types of SQL plugins? I was thinking that I would switch to Postgre in case that MySQL would not work out.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The PostgreSQL plugin is already available. The only thing that you may have to do is to update the search path for the library in the plugin based on how you installed PostgreSQL. Way simpler in contrast to building the MySQL plugin.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved