Mysql drivers built but qt can not find them
-
Hi, found it: https://forum.qt.io/topic/136231/mysql-plugin-on-m1-mac/10
Adding -DCMAKE_OSX_ARCHITECTURES="arm64" has not been sufficient for a looong time.
The good news is that for Qt 6.7.0 it's slightly easier. Anyway there are two things that has be fixed: build with Nnja and manually edit the Ninja build file before issuing the cmake --build .
So the qt-cmake command should be:
~/Qt/6.7.0/macos/bin/qt-cmake -GNinja -DMySQL_LIBRARY=/opt/homebrew/opt/mysql/lib/libmysqlclient.dylib -DMySQL_INCLUDE_DIR=/opt/homebrew/opt/mysql/include/mysql -DCMAKE_OSX_ARCHITECTURES="arm64" .Once it's done, do this magic command:
sed -i -e 's/-arch x86_64/-arch arm64/g' build.ninja
Then proceed with the usual:
cmake --build .
Don't forget to nuke the sqldrivers directory first :-)
-
Hi, found it: https://forum.qt.io/topic/136231/mysql-plugin-on-m1-mac/10
Adding -DCMAKE_OSX_ARCHITECTURES="arm64" has not been sufficient for a looong time.
The good news is that for Qt 6.7.0 it's slightly easier. Anyway there are two things that has be fixed: build with Nnja and manually edit the Ninja build file before issuing the cmake --build .
So the qt-cmake command should be:
~/Qt/6.7.0/macos/bin/qt-cmake -GNinja -DMySQL_LIBRARY=/opt/homebrew/opt/mysql/lib/libmysqlclient.dylib -DMySQL_INCLUDE_DIR=/opt/homebrew/opt/mysql/include/mysql -DCMAKE_OSX_ARCHITECTURES="arm64" .Once it's done, do this magic command:
sed -i -e 's/-arch x86_64/-arch arm64/g' build.ninja
Then proceed with the usual:
cmake --build .
Don't forget to nuke the sqldrivers directory first :-)
@hskoglund
That worked! Thank you so much. -
H hskoglund referenced this topic on
-
-
H hskoglund referenced this topic on