Yippee...
Fixed sqlite3 database export on Apple arm64 packages with Digikam scripts .
https://www.qt.io/blog/commercial-lts-q … 9-released
Qt 5.15.9 provides support for macOS on ARM, including prebuilt binaries for both single architecture and universal builds. Build system support for universal builds is limited to the qmake build system. See the Qt for macOS documentation for details on how to enable universal builds for your application.
F/opt/digikam.org.arm64/libexec/qt5/lib /opt/digikam.org.arm64/lib/libsqlite3.0.dylib -framework QtSvg -framework QtPrintSupport /opt/digikam.org.arm64/lib/libKF5WidgetsAddons.dylib -framework QtWidgets -framework QtGui -framework AppKit -framework Metal -framework QtNetwork -framework QtXml -framework QtSql -framework QtConcurrent /opt/digikam.org.arm64/lib/libKF5CoreAddons.dylib -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtWidgets.framework/QtWidgets) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtGui.framework/QtGui) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/lib/libKF5WidgetsAddons.dylib) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtSvg.framework/QtSvg) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtPrintSupport.framework/QtPrintSupport) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/lib/libsqlite3.0.dylib) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtNetwork.framework/QtNetwork) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtSql.framework/QtSql) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtXml.framework/QtXml) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/lib/libKF5CoreAddons.dylib) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtConcurrent.framework/QtConcurrent) was built for newer macOS version (11.3) than being linked (11.0)
ld: warning: dylib (/opt/digikam.org.arm64/libexec/qt5/lib/QtCore.framework/QtCore) was built for newer macOS version (11.3) than being linked (11.0)
The time of compilation is 1 min 10 sec
______________________________________________________________
Copy Qt libraries and private frameworks:
Processing Mac deployment tool...
______________________________________________________________
Copy file missing:
Copying add elements in the bundle...
Copying titleblocks in the bundle...
Copying translations in the bundle...
Copying translations in the bundle...
Copying examples in the bundle...
qelectrotech.app: replacing existing signature
______________________________________________________________
Create zip tarball:
Would you like to upload for Notarize packages qelectrotech-0.100.0-r7856-arm64.zip, n/Y?.
FYI, I just saw MacPorts ported Qt 5.15.9 and I retry again Digikam scripts with little hacks for build only arm64 (Apple silicon) packages for the moment.. QET build with universal compile ok, but QET crash on launch ... So need to hack again Digikam and compile many hours again only arch: arm64......
I will see later...for universal....
laurent@mini-de-laurent digikam % git diff
diff --git a/project/bundles/3rdparty/ext_kf5_frameworks/CMakeLists.txt b/project/bundles/3rdparty/ext_kf5_frameworks/CMakeLists.txt
index 89de58b171..2212bc50fc 100755
--- a/project/bundles/3rdparty/ext_kf5_frameworks/CMakeLists.txt
+++ b/project/bundles/3rdparty/ext_kf5_frameworks/CMakeLists.txt
@@ -108,7 +108,7 @@ function(InstallKF5Component
CONFIGURE_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. &&
sed -i '' -e "s/DBUILD_TESTING=ON/DBUILD_TESTING=OFF/g" <SOURCE_DIR>/bootstrap.macports &&
- <SOURCE_DIR>/bootstrap.macports ${EXTPREFIX_frameworks} debug x86_64 "${argoptions}"
+ <SOURCE_DIR>/bootstrap.macports ${EXTPREFIX_frameworks} debug arm64 "${argoptions}"
BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE)
diff --git a/project/bundles/macports/01-build-macports.sh b/project/bundles/macports/01-build-macports.sh
index dd073280a6..9f8eb237f8 100755
--- a/project/bundles/macports/01-build-macports.sh
+++ b/project/bundles/macports/01-build-macports.sh
@@ -210,7 +210,7 @@ EOF
# No need to build with both architectures embeded (x86 and ARM) for Apple Silicon target
cat << EOF >> "$INSTALL_PREFIX/etc/macports/variants.conf"
-+universal
++arm64
EOF
fi
@@ -243,84 +243,15 @@ echo "---------- Building digiKam dependencies with Macports"
# With OSX less than El Capitan, we need a more recent Clang compiler than one provided by XCode.
# This only concern x86_64 architecture.
-if [[ $MAJOR_OSX_VERSION -lt 11 && $MINOR_OSX_VERSION -lt 10 ]]; then
- echo "---------- Install more recent Clang compiler from Macports for specific ports"
- port install clang_select
- port install clang-3.4
- port select --set clang mp-clang-3.4
-
-fi
-
-echo -e "\n"
-
-if [[ $ARCH_TARGET = "x86_64" ]] ; then
-
- # Note: subversion is used to checkout translations from KDE repositories.
- # Subversion do not compile under arm64 and XCode drop svn supports.
- # KDE team plan to migrate svn to git: https://phabricator.kde.org/T13514
-
- port install \
- ld64 +ld64_xcode \
- subversion
-
-fi
-
-echo -e "MariaDB Variant=$MP_MARIADB_VARIANT\n"
port install \
cctools +xcode \
cmake \
ccache \
- libpng \
- jpeg \
- tiff \
- boost \
- eigen3 \
- gettext \
- libusb \
- libgphoto2 \
- jasper \
- lcms2 \
- expat \
- libxml2 \
- libxslt \
- libical \
- lensfun \
- bison \
- py38-lxml \
- x265 \
- libde265 \
- libheif \
- aom \
- ffmpeg \
- wget +ssl \
- qt5-qtbase \
- qt5-qtdeclarative \
- qt5-qtmacextras \
- qt5-qtquickcontrols \
- qt5-qtxmlpatterns \
- qt5-qtsvg \
- qt5-qttools \
- qt5-qttranslations \
- qt5-qtimageformats \
- qt5-qtnetworkauth \
- qt5-sqlite-plugin \
- qt5-mysql-plugin $MP_MARIADB_VARIANT
-
-port deactivate boost
-
-if [[ $DK_QTWEBENGINE = 1 ]] ; then
-
- port install qt5-qtwebengine
+ qt5
-else
- port install qt5-qtwebkit
-
-fi
-
-port activate boost
# port broken since a while. check later
# sane-backends \
@@ -360,17 +291,9 @@ cmake $ORIG_WD/../3rdparty \
-DKA_VERSION=$DK_KA_VERSION \
-DKF5_VERSION=$DK_KF5_VERSION \
-DENABLE_QTVERSION=$DK_QTVERSION \
- -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE \
- -Wno-dev
+ -Wno-dev
-if [[ $DK_QTWEBENGINE = 0 ]] ; then
- cmake --build . --config RelWithDebInfo --target ext_qtwebkit -- -j$CPU_CORES
-fi
-cmake --build . --config RelWithDebInfo --target ext_opencv -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_imagemagick -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_libjxl -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_libavif -- -j$CPU_CORES
#################################################################################################
diff --git a/project/bundles/macports/02-build-extralibs.sh b/project/bundles/macports/02-build-extralibs.sh
index ffad309c19..0307ae5133 100755
--- a/project/bundles/macports/02-build-extralibs.sh
+++ b/project/bundles/macports/02-build-extralibs.sh
@@ -69,35 +69,18 @@ cmake $ORIG_WD/../3rdparty \
-DKP_VERSION=$DK_KP_VERSION \
-DKF5_VERSION=$DK_KF5_VERSION \
-DENABLE_QTVERSION=$DK_QTVERSION \
- -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE \
-Wno-dev
# NOTE: The order to compile each component here is very important.
# core KF5 frameworks dependencies
cmake --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kconfig -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_breeze-icons -- -j$CPU_CORES
+
cmake --build . --config RelWithDebInfo --target ext_kcoreaddons -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kwindowsystem -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_solid -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_threadweaver -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_karchive -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kdbusaddons -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_ki18n -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kcrash -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kcodecs -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kauth -- -j$CPU_CORES
+
cmake --build . --config RelWithDebInfo --target ext_kguiaddons -- -j$CPU_CORES
cmake --build . --config RelWithDebInfo --target ext_kwidgetsaddons -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kitemviews -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kcompletion -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kconfigwidgets -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kiconthemes -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kservice -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kglobalaccel -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kxmlgui -- -j$CPU_CORES
-cmake --build . --config RelWithDebInfo --target ext_kbookmarks -- -j$CPU_CORES
+
cmake --build . --config RelWithDebInfo --target ext_kimageformats -- -j$CPU_CORES
# Extra support for digiKam
@@ -106,17 +89,7 @@ cmake --build . --config RelWithDebInfo --target ext_kimageformats -- -j$C
#cmake --build . --config RelWithDebInfo --target ext_libksane -- -j$CPU_CORES
# Geolocation support
-cmake --build . --config RelWithDebInfo --target ext_marble -- -j$CPU_CORES
-
-# Marble install shared lib at wrong place.
-mv $INSTALL_PREFIX/Marble.app/Contents/MacOS/lib/libastro* $INSTALL_PREFIX/lib
-mv $INSTALL_PREFIX/Marble.app/Contents/MacOS/lib/libmarble* $INSTALL_PREFIX/lib
-
-# Calendar support
-cmake --build . --config RelWithDebInfo --target ext_kcalendarcore -- -j$CPU_CORES
-# Breeze style support
-cmake --build . --config RelWithDebInfo --target ext_breeze -- -j$CPU_CORES
#################################################################################################
diff --git a/project/bundles/macports/config.sh b/project/bundles/macports/config.sh
index 830ac93ed5..d84dc30231 100644
--- a/project/bundles/macports/config.sh
+++ b/project/bundles/macports/config.sh
@@ -16,7 +16,7 @@ BUILDING_DIR="`pwd`/temp.build"
########################################################################
# Target macOS architecture: "x86_64" for Intel 64 bits, or "arm64" for Apple Silicon 64 bits.
-ARCH_TARGET="x86_64"
+ARCH_TARGET="arm64"
if [[ $ARCH_TARGET = "x86_64" ]] ; then
@@ -50,7 +50,7 @@ if [[ $ARCH_TARGET = "x86_64" ]] ; then
elif [[ $ARCH_TARGET = "arm64" ]] ; then
# Apple Silicon is supported since macOS BigSur
- OSX_MIN_TARGET="11.0"
+ OSX_MIN_TARGET="11.3"
else
diff --git a/qelectrotech.pro b/qelectrotech.pro
index b9ec6ecba..937c1bf8b 100644
--- a/qelectrotech.pro
+++ b/qelectrotech.pro
@@ -244,7 +244,7 @@ TARGET = qelectrotech
# Ajustement des bibliotheques utilisees lors de l'edition des liens
unix:QMAKE_LIBS_THREAD -= -lpthread
-unix|win32: PKGCONFIG += sqlite3
+#unix|win32: PKGCONFIG += sqlite3
# Enable C++17
QMAKE_CXXFLAGS += -std=c++17
@@ -312,7 +312,8 @@ macx {
# les chemins definis precedemment sont relatifs au dossier contenant le binaire executable
DEFINES += QET_LANG_PATH_RELATIVE_TO_BINARY_PATH
DEFINES += QET_COMMON_COLLECTION_PATH_RELATIVE_TO_BINARY_PATH
- LIBS += /opt/digikam.org.x86_64/lib/libsqlite3.0.dylib
+ LIBS += /opt/digikam.org.arm64/lib/libsqlite3.0.dylib
+
}
# Compilers-specific options
Well, I did not try to compile Digikam in arm64 just to save time during the compilation of the environment, but it was a mistake to build all Qt5 was much longer than building qt5-qtbase and the Qt modules which I needed..
it takes a lot of time and I haven't looked at how many hours it took yet with an M2 chip it's much faster than an intel macbook pro, I seem to have read that Gilles said that building the DigiKam macports environment on his intel mac took more than 23 hours...
And to think that I lost a lot of time with Homebrew and even recompiled several times qt@5 formula for Sqlite3 export... since some weeks.... without result , each time a big crash during the export of the database... or database was empty..
https://download.qelectrotech.org/qet/b … S_X/arm64/
Enjoy!
"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !