Kid3 issues
https://invent.kde.org/multimedia/kid3/-/issues
2024-02-25T05:46:13Z
https://invent.kde.org/multimedia/kid3/-/issues/573
How I managed to build a native macOS-ARM64 binary on an Apple Silicon powere...
2024-02-25T05:46:13Z
Leo Maxwell
How I managed to build a native macOS-ARM64 binary on an Apple Silicon powered Mac and my kindly requests for the official ARM64 support
Hello KDE Developers! I am new to the open-source community and this might be my first contribution!
Kid3 is an excellent tag editing software with some exclusive features such as modifying the encoding for the cover, which is extremely...
Hello KDE Developers! I am new to the open-source community and this might be my first contribution!
Kid3 is an excellent tag editing software with some exclusive features such as modifying the encoding for the cover, which is extremely helpful, big thanks to the developers! Yet the lack of Apple Silicon support is always somehow bothering me because everyone likes native software!
After some working and shallow learning of Linux operation, I managed to figure out how to make an ARM64 binary. I discovered some scripts that might get in the way of doing so, and now I want to share how I modified them, hoping that you might add official support.
My environment: <br>
Macbook Pro 2021 M1 Max 64GB RAM <br>
macOS Ventura 13.4.1 <br>
XCode fully installed
According to the `build.sh`, I cloned the git to a **dedicated partition** whose filesystem is **APFS(Case Sensitive)**. Then a build directory was created in the same directory of kid3, like this:
-Develop <br>
|--kid3 <br>
|--build <br>
Then I `cd` to the build directory and executed `../kid3/build.sh`. After some waiting, all the libs were retrieved from the internet, and here was the first issue:
```
...
### Extracting taglib
### Extracting libogg
patching file debian/changelog
patching file debian/compat
patching file debian/control
patching file debian/copyright
patching file debian/libogg-dev.install
patching file debian/libogg0.install
patching file debian/libogg0.symbols
patching file debian/rules
patching file debian/source/lintian-overrides
patching file include/ogg/os_types.h
### Extracting libvorbis
patching file test/Makefile.am
patching file lib/vorbisfile.c
### Extracting libflac
patching file doc/Makefile.am
patching file src/flac/decode.c
patching file src/flac/decode.h
patching file src/flac/main.c
patching file include/share/alloc.h
Hunk #1 succeeded at 48 with fuzz 2 (offset 15 lines).
patching file patches/fixrpath.sh
patching file patches/ltmain.sh.patch
patching file patches/nasm.h.patch
can't find file to patch at input line 69
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru flac-1.3.0/src/plugin_xmms/Makefile.in flac-1.3.0.new/src/plugin_xmms/Makefile.in
|--- flac-1.3.0/src/plugin_xmms/Makefile.in 2013-05-27 10:11:57.000000000 +0200
|+++ flac-1.3.0.new/src/plugin_xmms/Makefile.in 2013-10-16 13:30:02.000000000 +0200
--------------------------
File to patch:
```
I was confused and I pressed Ctrl+C to abort this process. Then I re-executed the command `../kid3/build.sh`, and this issue was just gone. But I think this is worth noting.
Then the second issue rise: the `id3lib` failed to build because the `configure` of the `id3lib` was somehow "outdated" and it was unable to correctly detect the type of my build machine. Here I will show you some of the log and which part of the `configure` cause this issue.
From terminal:
```
...
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking build system type... configure: error: /bin/sh ./config.sub -apple-darwin22.5.0 failed
configure: WARNING: cache variable ac_cv_build contains a newline
...
```
From `build/id3lib-3.8.3/config.log`:
```
...
configure:4759: $? = 0
configure:4779: result: none required
configure:4864: checking build system type
configure:4876: error: /bin/sh ./config.sub -apple-darwin22.5.0 failed
## ---------------- ##
## Cache variables. ##
## ---------------- ##
configure:4876: WARNING: cache variable ac_cv_build contains a newline
ac_cv_c_compiler_gnu=yes
...
```
I checked the `build/id3lib-3.8.3/configure` and `build/id3lib-3.8.3/config.sub` (both files are opened by VSCode, despite the first one looks like a binary file, but it was actually a shell script), and I have no clue how to modify the code to add support for my machine. Hence I used brutal force ;-). From the log we could pinpoint where the error was, and then I will show you the original script:
From `build/id3lib-3.8.3/configure`:(the number at the beginning of each line represents line number)
```
...
4864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4865 printf %s "checking build system type... " >&6; }
4866 if test ${ac_cv_build+y}
4867 then :
4868 printf %s "(cached) " >&6
4869 else $as_nop
4870 ac_build_alias=$build_alias
4871 test "x$ac_build_alias" = x &&
4872 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
4873 test "x$ac_build_alias" = x &&
4874 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4875 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
4876 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
...
```
And using brutal force, I modified this piece like this:
```
...
4864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4865 printf %s "checking build system type... " >&6; }
4866 if test ${ac_cv_build+y}
4867 then :
4868 printf %s "(cached) " >&6
4869 else $as_nop
4870 ac_build_alias=$build_alias
4871 test "x$ac_build_alias" = x &&
4872 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
4873 test "x$ac_build_alias" = x &&
4874 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4875 ac_cv_build=arm-apple-darwin
4876 #ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
4877 # as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
...
```
Simply put, I added line 4875 to forcefully set the compile machine type because the script (`config.sub`) that is responsible for this step cannot correctly detect the machine type and I have no idea how to add the support. The value `ac_cv_build` was chosen as "arm-apple-darwin" because I read `config.sub` and this might be the best fit. Plus the `configure` will do a check to ensure the `ac_cv_build` looks like `*-*-*`.
Then the `id3lib` is all good. The exact same situation happens for `zlib`, as shown below:
From terminal:
```
...
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking build system type... configure: error: /bin/sh ./../config.sub -apple-darwin22.5.0 failed
configure: error: ./configure failed for zlib
...
```
From `build/id3lib-3.8.3/zlib/config.log`:
```
...
configure:1618: checking whether make sets ${MAKE}
configure:1638: result: yes
configure:1818: checking build system type
configure:1831: error: /bin/sh ./../config.sub -apple-darwin22.5.0 failed
...
```
And here we go again by modifying `build/id3lib-3.8.3/zlib/configure` using VSCode like before, the original `configure` looks like:
```
...
1830 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1831 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1832 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1833 { (exit 1); exit 1; }; }
...
```
My modify:
```
...
1830 ac_cv_build=arm-apple-darwin
1831 # ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1832 # { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1833 # echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1834 # { (exit 1); exit 1; }; }
...
```
Then the script `../kid3/build.sh` is working like a charm (for just a moment)! But these two issues are not kid3's, they are much more related to `id3lib`, and this library hasn't been updated for like 5 years. HOWEVER I think I must point out that the "arm-apple-darwin" **is just a fantasy option out of nowhere. I gave it to the compiler and I have no idea why this would ever work!** This question is left to the developers, maybe!
The next issue is directly related to the `makefile` of kid3.
```
...
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/OpenGL.framework
-- Found WrapOpenGL: TRUE
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Found Qt-Version 6.5.1 (using /opt/homebrew/bin/qmake)
CMake Error at CMakeLists.txt:410 (message):
Could not find HTML docbook.xsl
-- Configuring incomplete, errors occurred!
...
```
I am 100% sure I have installed `docbook-xsl` using homebrew. The cause is that in `kid3/CMakeLists.txt`, line 395-411, it could not find where the installed `docbook-xsl` was. For me, the correct path is `/opt/homebrew/Cellar/docbook-xsl/1.79.2_1/docbook-xsl`. Again I am premature to linux family and I used brutal force again. I firmly believe that you can definitely come up with a better solution.
The original part of `CMakeLists.txt` looks like this:
```
...
395 ### Check for HTML docbook.xsl
396 file(GLOB _versionedStyleSheetDir /usr/share/xml/docbook/xsl-stylesheets-*)
397 find_path(DOCBOOK_XSL_DIR xhtml/docbook.xsl
398 PATHS ${WITH_DOCBOOKDIR}
399 /usr/share/xml/docbook/stylesheet/nwalsh
400 /usr/share/xml/docbook/stylesheet/nwalsh/current
401 /usr/share/xml/docbook/stylesheet/docbook-xsl
402 /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
403 /usr/share/sgml/docbook/xsl-stylesheets
404 /usr/share/apps/ksgmltools2/docbook/xsl
405 ${_versionedStyleSheetDir}
406 $ENV{DOCBOOKDIR}
407 $ENV{HOME}/docbook-xsl-1.72.0
408 NO_DEFAULT_PATH)
409 if(NOT DOCBOOK_XSL_DIR)
410 message(FATAL_ERROR "Could not find HTML docbook.xsl")
411 endif()
...
```
And I modified like this:
```
...
395 ### Check for HTML docbook.xsl
396 set(DOCBOOK_XSL_DIR /opt/homebrew/Cellar/docbook-xsl/1.79.2_1/docbook-xsl)
397 if(NOT DOCBOOK_XSL_DIR)
398 message(FATAL_ERROR "Could not find HTML docbook.xsl")
399 endif()
...
```
Then executed `../kid3/build.sh` again. This time the compile was almost done, but the last step was an error...
```
...
[534/535] Run CPack packaging tool...
CPack: Create package using DragNDrop
CPack: Install projects
CPack: - Install project: kid3 []
CMake Error at /Volumes/Develop/build/kid3/src/plugins/kid3qml/cmake_install.cmake:67 (file):
file INSTALL cannot find "/opt/homebrew/qml/QtQuick/qmldir": No such file
or directory.
Call Stack (most recent call first):
/Volumes/Develop/build/kid3/src/plugins/cmake_install.cmake:92 (include)
/Volumes/Develop/build/kid3/src/cmake_install.cmake:42 (include)
/Volumes/Develop/build/kid3/cmake_install.cmake:42 (include)
CMake Error at /Volumes/Develop/build/kid3/src/plugins/kid3qml/cmake_install.cmake:71 (file):
file INSTALL cannot find "/opt/homebrew/qml/QtQuick/Layouts/qmldir": No
such file or directory.
Call Stack (most recent call first):
/Volumes/Develop/build/kid3/src/plugins/cmake_install.cmake:92 (include)
/Volumes/Develop/build/kid3/src/cmake_install.cmake:42 (include)
/Volumes/Develop/build/kid3/cmake_install.cmake:42 (include)
CMake Error at /Volumes/Develop/build/kid3/src/plugins/kid3qml/cmake_install.cmake:75 (file):
file INSTALL cannot find "/opt/homebrew/qml/QtQml/WorkerScript/qmldir": No
such file or directory.
Call Stack (most recent call first):
/Volumes/Develop/build/kid3/src/plugins/cmake_install.cmake:92 (include)
/Volumes/Develop/build/kid3/src/cmake_install.cmake:42 (include)
/Volumes/Develop/build/kid3/cmake_install.cmake:42 (include)
CMake Error at /Volumes/Develop/build/kid3/src/plugins/kid3qml/cmake_install.cmake:79 (file):
file INSTALL cannot find
"/opt/homebrew/qml/QtQuick/libqtquick2plugin.dylib": No such file or
directory.
Call Stack (most recent call first):
/Volumes/Develop/build/kid3/src/plugins/cmake_install.cmake:92 (include)
/Volumes/Develop/build/kid3/src/cmake_install.cmake:42 (include)
/Volumes/Develop/build/kid3/cmake_install.cmake:42 (include)
...
```
Then I realized this is another directory problem. The problem occurs at `build/kid3/src/plugins/kid3qml/cmake_install.cmake`, at line 67, 71, 75, 79. I will show you how this file originally looks like:
From `build/kid3/src/plugins/kid3qml/cmake_install.cmake`:
```
...
66 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
67 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/Resources/qml/imports/QtQuick" TYPE FILE FILES "/opt/homebrew/qml/QtQuick/qmldir")
68 endif()
69
70 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
71 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/Resources/qml/imports/QtQuick/Layouts" TYPE FILE FILES "/opt/homebrew/qml/QtQuick/Layouts/qmldir")
72 endif()
73
74 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
75 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/Resources/qml/imports/QtQml/WorkerScript" TYPE FILE FILES "/opt/homebrew/qml/QtQml/WorkerScript/qmldir")
76 endif()
77
78 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
79 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/PlugIns" TYPE FILE FILES
80 "/opt/homebrew/qml/QtQuick/libqtquick2plugin.dylib"
81 "/opt/homebrew/qml/QtQuick/Layouts/libqquicklayoutsplugin.dylib"
82 "/opt/homebrew/qml/QtQml/WorkerScript/libworkerscriptplugin.dylib"
83 )
84 endif()
...
```
I installed qt (version 6.5.1) using homebrew as well. The correct `qml` path should be `/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml`, hence I modified the `cmake` file like this:
```
...
66 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
67 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/Resources/qml/imports/QtQuick" TYPE FILE FILES "/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml/QtQuick/qmldir")
68 endif()
69
70 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
71 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/Resources/qml/imports/QtQuick/Layouts" TYPE FILE FILES "/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml/QtQuick/Layouts/qmldir")
72 endif()
73
74 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
75 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/Resources/qml/imports/QtQml/WorkerScript" TYPE FILE FILES "/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml/QtQml/WorkerScript/qmldir")
76 endif()
77
78 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
79 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/kid3.app/Contents/PlugIns" TYPE FILE FILES
80 "/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml/QtQuick/libqtquick2plugin.dylib"
81 "/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml/QtQuick/Layouts/libqquicklayoutsplugin.dylib"
82 "/opt/homebrew/Cellar/qt/6.5.1_2/share/qt/qml/QtQml/WorkerScript/libworkerscriptplugin.dylib"
83 )
84 endif()
...
```
After this step, we could finally successfully compile an ARM64 native binary. However this binary could not run because of the signing issues. If we open `build/kid3/kid3-3.9.4-Darwin.dmg/kid3.app` now, the app would crash, with crash reports like this (only important parts are shown):
```
...
Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes: UNKNOWN_0x32 at 0x00000001003f8000
Exception Codes: 0x0000000000000032, 0x00000001003f8000
Termination Reason: Namespace CODESIGNING, Code 2 Invalid Page
...
```
And from last compile we could see warnings like:
```
...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libglib-2.0.0.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libdbus-1.3.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libfreetype.6.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libintl.8.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libgthread-2.0.0.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libharfbuzz.0.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libb2.1.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libpng16.16.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libpcre2-16.0.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libpcre2-8.0.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtCore.framework/Versions/A/QtCore
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtDBus.framework/Versions/A/QtDBus
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtGui.framework/Versions/A/QtGui
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtSvg.framework/Versions/A/QtSvg
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/PlugIns/imageformats/libqjpeg.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtNetwork.framework/Versions/A/QtNetwork
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtXml.framework/Versions/A/QtXml
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtMultimedia.framework/Versions/A/QtMultimedia
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtOpenGL.framework/Versions/A/QtOpenGL
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtQml.framework/Versions/A/QtQml
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtQmlModels.framework/Versions/A/QtQmlModels
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtQuick.framework/Versions/A/QtQuick
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtWidgets.framework/Versions/A/QtWidgets
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtQuickLayouts.framework/Versions/A/QtQuickLayouts
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/QtQmlWorkerScript.framework/Versions/A/QtQmlWorkerScript
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libdouble-conversion.3.3.0.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libgraphite2.3.2.1.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libicudata.73.2.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libicui18n.73.2.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libicuuc.73.2.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libmd4c.0.4.8.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libjpeg.8.2.2.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libbrotlidec.1.0.9.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Volumes/Develop/build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app/Contents/Frameworks/libbrotlicommon.1.0.9.dylib
...
```
The last step is to copy all these files' path and sign. Here I would only show one of them, but **all the files mentioned above must be signed like the example**. You shall drag the kid3.app out of the .dmg file and then sign the files inside the package like the command shown below. YOU MAY NEED TO HAVE YOUR APPLE DEVELOPER CERTIFICATE INSTALLED CORRECTLY BEFORE SIGNING ANY FILES. NO 99$ DEVELOPER ID NEEDED, YOU JUST NEED A REGULAR APPLE ID TO DO SO.
```
codesign -s - -f -vvvvv /Volumes/Develop/build/kid3/kid3.app/Contents/Frameworks/libglib-2.0.0.dylib
```
For me I just copied all the warnings above and edited them in batch, then this file was executed as a shell script. **You should notice that the path here is changed, and I tried signing both build/kid3/kid3-3.9.4-Darwin.dmg/kid3 and the build/kid3/_CPack_Packages/Darwin/DragNDrop/kid3-3.9.4-Darwin/kid3.app, and the results are exactly the same, both .app run fine.** After that, the ARM64 native version of the kid3 is able to run smoothly, and most important, NATIVELY.
I am not sure if I am allowed to distribute the binary file signed with my own identity, because the entire code is written by you guys! Also, I am not sure if `id3lib` will update to add the support for Apple Silicon Macs, hence I just open the issue here. I sincerely appreciate your development of this software and I really want you to add official Apple Silicon support, hopefully using a more elegant solution over my brutal force ;-)
During the discovery, special thanks to miaopass for giving me guidance and advice.
https://invent.kde.org/multimedia/kid3/-/issues/569
Kid3-CLI fails when file path has Diacritics
2023-09-06T15:49:39Z
Kerry Uchida
Kid3-CLI fails when file path has Diacritics
Having a problem working with kid3-cli and files that have foreign diacritics such as
Ce Matin Là -> the a and maybe the I
Le Voyage De Pénélope -> the e's in Penelope
Medellín - the i
I've tried many different ways of executing from:
1...
Having a problem working with kid3-cli and files that have foreign diacritics such as
Ce Matin Là -> the a and maybe the I
Le Voyage De Pénélope -> the e's in Penelope
Medellín - the i
I've tried many different ways of executing from:
1) Shell Script Execution
2) Command Line Direct:
KTEL-MBP-1312:~ djk-tel$ kid3-cli -c "{\"method\": \"get\", \"params\": [\"all\",2]}" "/Volumes/Tekno/Users/kerry/Music/iTunes/iTunes Media/Music/Madonna/Madame X HD/Medellín.m4a"
3) Kid3-Cli Shell:
KTEL-MBP-1312:~ djk-tel$ kid3-cli "/Volumes/Tekno/Users/kerry/Music/iTunes/iTunes Media/Music/Madonna/Madame X HD/Medellín.m4a"
kid3-cli> {"method":"get","params":["all",2]}
--------------------------------------------------
All Results the same:
------------------------------------------------
{
"result": {
"taggedFile": {
}
}
}
I have tried all the above with different paths:
quoted/escaped - get same results.
Encoded as:
/Volumes/Tekno/Users/kerry/Music/iTunes/iTunes%20Media/Music/Madonna/Madame%20X%20HD/Medelli%CC%81n.m4a
FAILS with does not exist
If I load the folder, select next, execute the command then repeat select next
when it gets to the file it works:
KTEL-MBP-1312:~ djk-tel$ kid3-cli /Volumes/Tekno/Users/kerry/Music/iTunes/iTunes\ Media/Music/Madonna/Madame\ X\ HD
kid3-cli> select next
kid3-cli> {"method":"get","params":["all",2]}
............ TRIMMED
kid3-cli> select next
kid3-cli> {"method":"get","params":["all",2]}
{"result":{"taggedFile":{"fileName":"Medellín.m4a","fileNameChanged":false,"format":"MP4 AAC 16 bit 513 kbps 30464 Hz 2 Channels 4:58","tag2":{"format":"MP4","frames":[{"changed":false,"name":"Title","value":"Medellín"},{"changed":false,"name":"Artist","value":"Madonna"},{"changed":false,"name":"Album Artist","value":"Madonna"},{"changed":false,"name":"Album","value":"Madame X HD"},{"changed":false,"name":"Comment","value":"88"},{"changed":false,"name":"Date","value":"2019"},{"changed":false,"name":"Genre","value":"Pop"},{"changed":false,"name":"Track Number","value":"1/15"},{"changed":false,"name":"Composer","value":"FLAC 24bit/88.2khz"},{"changed":false,"name":"Label","value":"FLAC 24bit/88.2khz"},{"changed":false,"name":"Picture: Cover (front)","value":""},{"changed":false,"name":"Encoder Settings","value":"fdkaac 0.6.3, libfdk-aac 4.0.1, CBR 512kbps"},{"changed":false,"name":"Lyrics","value":"{\n \"currentLocation\" : \"/Volumes/Tekno/Users/kerry/Music/iTunes/iTunes Media/Music/Madonna/Madame X HD/Medellín.m4a\",\n \"persistentID\" : \"219B4B70BD978E78\",\n \"changes\" : [\n {\n \"dateCreated\" : \"2023-02-14, 23:04:24\"\n },\n {\n \"newValues\" : {\n \"episodeID\" : \"219B4B70BD978E78\"\n },\n \"oldValues\" : {\n \"episodeID\" : \"\"\n },\n \"dateChanged\" : \"2023-02-14, 23:04:23\"\n }\n ],\n \"locations\" : [\n \"/Volumes/Tekno/Users/kerry/Music/iTunes/iTunes Media/Music/Madonna/Madame X HD/Medellín.m4a\"\n ]\n}"},{"changed":false,"name":"Work","value":"CHECKED:\nALL-BASE - ALL-MID - WH_SP - MulART"},{"changed":false,"name":"iTunSMPB","value":" 00000000 00000800 00000070 0000000001B4C390 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000"},{"changed":false,"name":"replaygain_track_gain","value":"-8.18 dB"},{"changed":false,"name":"replaygain_track_peak","value":"1"},{"changed":false,"name":"TV Episode","value":"219B4B70BD978E78"},{"changed":false,"name":"TV Episode Number","value":"1023"},{"changed":false,"name":"Movement Count","value":"0"},{"changed":false,"name":"Movement Number","value":"2"},{"changed":false,"name":"Movement Name","value":"FLAGS:\nGENRE"},{"changed":false,"name":"©pub","value":"FLAC 24bit/88.2khz"}]}}}}
^^^^ WHICH IS EXACTLY WHAT I'M LOOKING TO GET
but can't access it via the file directly.
https://invent.kde.org/multimedia/kid3/-/issues/566
Can't read the tags of this m4a
2022-11-20T15:21:06Z
Rublzubl Bibldigugl
Can't read the tags of this m4a
It can't read this file:
[test.m4a.zip](/uploads/95671a5b3e95d40743323ca5bbe41aac/test.m4a.zip)
![image](/uploads/fe36663a4f0b9548685ffc13af1599da/image.png)
ffprobe prints
```
ffprobe version n5.1.2 Copyright (c) 2007-2022 the FFmpe...
It can't read this file:
[test.m4a.zip](/uploads/95671a5b3e95d40743323ca5bbe41aac/test.m4a.zip)
![image](/uploads/fe36663a4f0b9548685ffc13af1599da/image.png)
ffprobe prints
```
ffprobe version n5.1.2 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.m4a':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41isomiso2
creation_time : 2020-07-03T17:42:52.000000Z
album : test3
artist : test1
comment : test7
genre : test6
title : test2
track : 4
Duration: 00:00:01.11, start: 0.000000, bitrate: 78 kb/s
Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 70 kb/s (default)
Metadata:
creation_time : 2020-07-03T17:42:52.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
```
https://invent.kde.org/multimedia/kid3/-/issues/556
KID3 'developer could not be verified' error on Mac
2023-08-01T10:55:39Z
Andrew Ba
KID3 'developer could not be verified' error on Mac
Hi, I'm trying to install KID3 on Mac. Previously, I used it on Win PC, but I transitioned to Mac and need to use it there.
However, I just downloaded KID3 v3.9.1 for Mac, but it won't let me open it with security error 'developer could...
Hi, I'm trying to install KID3 on Mac. Previously, I used it on Win PC, but I transitioned to Mac and need to use it there.
However, I just downloaded KID3 v3.9.1 for Mac, but it won't let me open it with security error 'developer could not be verified'. By some sources, this may mean the developer is not registered with Apple or I'm using an outdated version. Or possibly, there's another explanation.
I really liked it on PC and I'd like to continue to use it on Mac, but at the moment, I can't.
What should I do? Can someone help me fix this, or should I look for another app??
Really appreciate some help on this!
Best regards,
Andrew
https://invent.kde.org/multimedia/kid3/-/issues/435
Matroška (mkv) and WebM Video/Audio Tagging Support
2020-02-02T10:41:12Z
KDE Community
Matroška (mkv) and WebM Video/Audio Tagging Support
I just thought I'd add this here since it's nice to have this kind of stuff documented: I already use kid3 to edit tags on `mp4` video files, but many video hi-res files use the open `mkv` format instead. Many also use `webm` which is a ...
I just thought I'd add this here since it's nice to have this kind of stuff documented: I already use kid3 to edit tags on `mp4` video files, but many video hi-res files use the open `mkv` format instead. Many also use `webm` which is a subset of Matroshka (which has the same format as the pretty uncommon `weba` audio-only variant).
Some Links:
* [Matroshka Tagging Spec](https://matroska.org/technical/specs/tagging/index.html)
* [WebM Tagging Spec](https://www.webmproject.org/docs/container/#tagging) (just a list of supported section types of the above)
* [Matroshka Standard-Tagname Examples](https://www.matroska.org/technical/specs/tagging/example-video.html)
(Note that Matroshka's tagging format is based on XML and freely extensible within reasonable limits; making it conceptually similar to Vorbis Comments. There is also a [table comparison of their tag names](https://matroska.org/technical/specs/tagging/othertagsystems/comparetable.html) to other tagging systems.)
Imported from [SourceForge](https://sourceforge.net/p/kid3/feature-requests/94/), author: ntninja
KDE Community
KDE Community