[問題] debian 編譯 exiv2 (avif 的 EXIF 問題)

看板Linux作者 (sppmg)時間2年前 (2022/06/13 21:56), 1年前編輯推噓4(4010)
留言14則, 3人參與, 2年前最新討論串1/1
近期想把相片轉 avif 保存。 OS 使用 Debian stable(11)。大多數工具都有了,但 EXIF 好像要靠外部工具 匯出匯入。imagemagick 等等似乎無法自動轉過去。(?) 稍微 google 一下,確認 Exiv2 v0.27.4 以上支援 avif。 不過 debian 要 testing 才有 v0.27.5。 我試著用 debian apt source 的方式編譯 apt-get source -t testing -b exiv2 但最後會出現如下錯誤。(我貼在文末) 看相依性應該使用到的程式庫應該可以用 stable 的編譯吧? 用 cmake 照原始套件方式編譯是沒問題的。 這是 debian 套件問題吧?? 有辦法解決嗎? 看起來像是 debian/libexiv2-27.symbols 這檔案出問題? 是用到 0.27.3 的資料了嗎? --------- 以下錯誤訊息 ----------- dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below dpkg-gensymbols: error: some symbols or patterns disappeared in the symbols file: see diff output below dpkg-gensymbols: warning: debian/libexiv2-27/DEBIAN/symbols doesn't match completely debian/libexiv2-27.symbols --- debian/libexiv2-27.symbols (libexiv2-27_0.27.5-3_amd64) +++ dpkg-gensymbolst9CV49 2022-06-13 21:21:10.902056781 +0800 @@ -1297,7 +1297,7 @@ (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Base 0.27.3 (optional=templinst)_ZNSt6vectorIjSaIjEE17_M_realloc_insertIJRKjEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_@Base 0.27.3 (optional=templinst)_ZNSt6vectorIjSaIjEE17_M_realloc_insertIJjEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_@Base 0.27.3 - _ZNSt6vectorIlSaIlEE12emplace_backIJlEEERlDpOT_@Base 0.27.5 +#MISSING: 0.27.5-3# _ZNSt6vectorIlSaIlEE12emplace_backIJlEEERlDpOT_@Base 0.27.5 _ZNSt6vectorIlSaIlEE17_M_realloc_insertIJlEEEvN9__gnu_cxx17__normal_iteratorIPlS1_EEDpOT_@Base 0.27.5 (optional=templinst|arch=alpha amd64 arm64 ia64 kfreebsd-amd64 mips64el ppc64 ppc64el riscv64 s390x sparc64)_ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_@Base 0.27.3 (optional=templinst)_ZNSt6vectorIsSaIsEE17_M_realloc_insertIJRKsEEEvN9__gnu_cxx17__normal_iteratorIPsS1_EEDpOT_@Base 0.27.3 @@ -1316,6 +1316,7 @@ (optional=templinst|subst)_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateE{size_t}{size_t}PKc{size_t}@Base 0.27.3 (optional=templinst)_ZNSt7__cxx114listIN5Exiv29ExifdatumESaIS2_EE4sortIPFbRKNS1_9MetadatumES8_EEEvT_@Base 0.25 (optional=templinst)_ZNSt7__cxx114listIN5Exiv29ExifdatumESaIS2_EE5mergeIPFbRKNS1_9MetadatumES8_EEEvOS4_T_@Base 0.27.3 + _ZNSt7__cxx114listIN5Exiv29ExifdatumESaIS2_EE6insertISt20_List_const_iteratorIS2_EvEESt14_List_iteratorIS2_ES7_T_SA_@Base 0.27.5-3 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_@Base 0.27.3 (optional=templinst|arch=!amd64 !arm64 !hppa !ia64 !kfreebsd-amd64 !mips64el !ppc64el !riscv64 !sh4 !sparc64 !x32)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_@Base 0.27.3 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5Exiv29XmpNsInfoEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE24_M_get_insert_unique_posERS7_@Base 0.25 dh_makeshlibs: error: failing due to earlier errors make: *** [debian/rules:16:binary] 錯誤 1 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 E: 編譯指令 'cd exiv2-0.27.5 && dpkg-buildpackage -b -uc' 失敗。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 101.10.13.191 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1655128610.A.3A7.html

06/13 23:42, 2年前 , 1F
就產出的 library 跟 symbol table 內容有出入吧
06/13 23:42, 1F
我程式功力還沒到那裡 XD 為何要預先生成 symbol table 啊? ※ 編輯: sppmg (101.10.13.191 臺灣), 06/14/2022 01:56:08

06/14 07:10, 2年前 , 2F
應該是你的libexiv2-27也要上testing
06/14 07:10, 2F

06/14 07:11, 2年前 , 3F
我看teating 跟unstable都上27.5了
06/14 07:11, 3F
我是從原始碼套件編譯的, libexiv2-27 是編譯完生成的喔! https://packages.debian.org/source/bookworm/exiv2 記得我有試過直接裝 testing 的 deb,會依賴 testing 的 libc 的樣子。

06/14 08:59, 2年前 , 4F
一個用途是控制符號可見性,gcc 可以吃額外的檔案不用
06/14 08:59, 4F

06/14 08:59, 2年前 , 5F
寫在 source code 裡。
06/14 08:59, 5F
※ 編輯: sppmg (101.10.13.191 臺灣), 06/14/2022 09:09:28

06/14 23:34, 2年前 , 6F
最懶的方法就是把 debian/libexiv2-27.symbols 刪掉
06/14 23:34, 6F

06/14 23:34, 2年前 , 7F
重新弄一個空白的檔案就可以編起來了
06/14 23:34, 7F

06/14 23:35, 2年前 , 8F
然後最後如果要更新那個 symbols 的話可以參考:
06/14 23:35, 8F

06/14 23:35, 2年前 , 9F
06/14 23:35, 9F

06/14 23:36, 2年前 , 10F
另外編套件我習慣用 sbuild, 它會每次開一個 chroot
06/14 23:36, 10F

06/14 23:37, 2年前 , 11F
去編跟你現在發行版相容的套件, 編出來的東西會比較
06/14 23:37, 11F

06/14 23:37, 2年前 , 12F
乾淨
06/14 23:37, 12F

06/14 23:49, 2年前 , 13F
八卦是 debian/*.symbols 好像是 Ubuntu 弄出來回饋給
06/14 23:49, 13F

06/14 23:49, 2年前 , 14F
Debian 的一套機制
06/14 23:49, 14F
感謝(以及八卦 XD)! 後來也有搜尋到 debian 文件,不過一直糾結在 要不要弄成 libfooa 這種 形式。(怕影響到原系統其他程式。直接砍 *.symbols 內容也是有點擔心。) ※ 編輯: sppmg (101.10.13.191 臺灣), 06/15/2022 09:16:56
文章代碼(AID): #1Yfq8YEd (Linux)