cmake fixup_bundle не говорит, почему он не работает - PullRequest
0 голосов
/ 14 июля 2020

У меня есть проект cmake, который использует библиотеки Qt, и мне нужно собрать его на нескольких разных системах. Я настроил проект cmake для установки зависимостей библиотек с помощью fixup_bundle . Это работает в некоторых системах, но не работает в других, и я не могу сказать почему.

Я включаю расположение всех зависимостей библиотеки в третий параметр fixup_bundle, и, похоже, у него нет никаких проблемы с поиском библиотек или их копированием в каталог установки. И, как указано выше, в некоторых системах все работает нормально.

В системах, где это не удается, библиотеки Qt перечислены как внешние предварительные требования . Но я не знаю почему. Он копирует все библиотеки Qt в каталог установки. Он также копирует библиотеки, от которых зависят библиотеки QT, в каталог установки. Так что я не понимаю, в чем проблема.

make install
...
[100%] Built target my_project_executable
Install the project...
-- Install configuration: "Release"
-- Installing: /build/workspace/my_project/build/install_dir/./libgenerated-proto.so
-- Installing: /build/workspace/my_project/build/install_dir/./libicudata.so
-- Installing: /build/workspace/my_project/build/install_dir/./libicudata.so.64
-- Installing: /build/workspace/my_project/build/install_dir/./libicudata.so.64.1
-- Installing: /build/workspace/my_project/build/install_dir/./libicui18n.so
-- Installing: /build/workspace/my_project/build/install_dir/./libicui18n.so.64
-- Installing: /build/workspace/my_project/build/install_dir/./libicui18n.so.64.1
-- Installing: /build/workspace/my_project/build/install_dir/./libicuuc.so
-- Installing: /build/workspace/my_project/build/install_dir/./libicuuc.so.64
-- Installing: /build/workspace/my_project/build/install_dir/./libicuuc.so.64.1
-- Installing: /build/workspace/my_project/build/install_dir/./libicutu.so
-- Installing: /build/workspace/my_project/build/install_dir/./libicutu.so.64
-- Installing: /build/workspace/my_project/build/install_dir/./libicutu.so.64.1
-- Installing: /build/workspace/my_project/build/install_dir/./libssl.so
-- Installing: /build/workspace/my_project/build/install_dir/./libssl.so.1.1
-- Installing: /build/workspace/my_project/build/install_dir/./libcrypto.so
-- Installing: /build/workspace/my_project/build/install_dir/./libcrypto.so.1.1
-- Installing: /build/workspace/my_project/build/install_dir/./my_project_executable
-- fixup_bundle
--   app='/build/workspace/my_project/build/install_dir/my_project_executable'
--   libs=''
--   dirs='/build/workspace/my_project/build/install_dir;/build/workspace/my_project/build/lib;/opt/Qt5.6.1/5.6/gcc_64/lib'
--   ignoreItems=''
-- fixup_bundle: preparing...
-- fixup_bundle: copying...
-- 1/40: *NOT* copying '/build/workspace/my_project/build/install_dir/my_project_executable'
-- 2/40: copying '/home/build/gcc5/lib64/libgcc_s.so.1'
-- 3/40: linking '/build/workspace/my_project/build/install_dir/libstdc++.so.6.0.21' -> '/build/workspace/my_project/build/install_dir/libstdc++.so.6'
-- 4/40: linking '/build/workspace/my_project/build/install_dir/libQt5Core.so.5.6.1' -> '/build/workspace/my_project/build/install_dir/libQt5Core.so.5'
-- 5/40: linking '/build/workspace/my_project/build/install_dir/libQt5Network.so.5.6.1' -> '/build/workspace/my_project/build/install_dir/libQt5Network.so.5'
-- 6/40: linking '/build/workspace/my_project/build/install_dir/libQt5Sql.so.5.6.1' -> '/build/workspace/my_project/build/install_dir/libQt5Sql.so.5'
-- 7/40: linking '/build/workspace/my_project/build/install_dir/libQt5Xml.so.5.6.1' -> '/build/workspace/my_project/build/install_dir/libQt5Xml.so.5'
-- 8/40: linking '/build/workspace/my_project/build/install_dir/libQt5XmlPatterns.so.5.6.1' -> '/build/workspace/my_project/build/install_dir/libQt5XmlPatterns.so.5'
-- 9/40: linking '/build/workspace/my_project/build/install_dir/libicudata.so.56.1' -> '/build/workspace/my_project/build/install_dir/libicudata.so.56'
-- 10/40: linking '/build/workspace/my_project/build/install_dir/libicui18n.so.56.1' -> '/build/workspace/my_project/build/install_dir/libicui18n.so.56'
-- 11/40: linking '/build/workspace/my_project/build/install_dir/libicuuc.so.56.1' -> '/build/workspace/my_project/build/install_dir/libicuuc.so.56'
-- 12/40: copying '/home/build/gcc5/lib64/libstdc++.so.6.0.21'
-- 13/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Core.so.5.6.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libQt5Core.so.5.6.1"
-- 14/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Network.so.5.6.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libQt5Network.so.5.6.1"
-- 15/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Sql.so.5.6.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libQt5Sql.so.5.6.1"
-- 16/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Xml.so.5.6.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libQt5Xml.so.5.6.1"
-- 17/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5XmlPatterns.so.5.6.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libQt5XmlPatterns.so.5.6.1"
-- 18/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libicudata.so.56.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libicudata.so.56.1"
-- 19/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libicui18n.so.56.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libicui18n.so.56.1"
-- 20/40: copying '/opt/Qt5.6.1/5.6/gcc_64/lib/libicuuc.so.56.1'
-- Removed runtime path from "/build/workspace/my_project/build/install_dir/libicuuc.so.56.1"
-- fixup_bundle: fixing...
-- 21/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/my_project_executable'
-- 22/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libgcc_s.so.1'
-- 23/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libstdc++.so.6'
-- 24/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Core.so.5'
-- 25/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Network.so.5'
-- 26/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Sql.so.5'
-- 27/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Xml.so.5'
-- 28/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5XmlPatterns.so.5'
-- 29/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libicudata.so.56'
-- 30/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libicui18n.so.56'
-- 31/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libicuuc.so.56'
-- 32/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libstdc++.so.6.0.21'
-- 33/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Core.so.5.6.1'
-- 34/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Network.so.5.6.1'
-- 35/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Sql.so.5.6.1'
-- 36/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5Xml.so.5.6.1'
-- 37/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libQt5XmlPatterns.so.5.6.1'
-- 38/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libicudata.so.56.1'
-- 39/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libicui18n.so.56.1'
-- 40/40: fix-up not required on this platform '/build/workspace/my_project/build/install_dir/libicuuc.so.56.1'
-- fixup_bundle: cleaning up...
-- fixup_bundle: verifying...
-- ===========================================================================
-- Analyzing app='/build/workspace/my_project/build/install_dir/my_project_executable'
-- bundle='/build/workspace/my_project/build/install_dir'
-- executable='/build/workspace/my_project/build/install_dir/my_project_executable'
-- valid='1'
-- executable file 1: /build/workspace/my_project/build/install_dir/libQt5Core.so.5.6.1
-- executable file 2: /build/workspace/my_project/build/install_dir/my_project_executable
-- verified='0'
-- info='external prerequisites found:
f='/build/workspace/my_project/build/install_dir/my_project_executable'
external_prereqs='/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Core.so.5;/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Network.so.5;/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Sql.so.5;/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5Xml.so.5;/opt/Qt5.6.1/5.6/gcc_64/lib/libQt5XmlPatterns.so.5'
'
-- 
CMake Error at /home/build/cmake-3.17.1/share/cmake-3.17/Modules/BundleUtilities.cmake:1119 (message):
  error: verify_app failed
Call Stack (most recent call first):
  /home/build/cmake-3.17.1/share/cmake-3.17/Modules/BundleUtilities.cmake:986 (verify_app)
  src/server/cmake_install.cmake:47 (fixup_bundle)
  cmake_install.cmake:81 (include)


make: *** [install] Error 1

Я знаю, что здесь есть 2 разные версии библиотек ICU. В моем проекте используется ICU и версия 64. Библиотеки Qt ссылаются на более старую версию библиотек ICU. В файлах ICU lib указана версия, указанная в имени файла, поэтому это не должно быть проблемой и, похоже, не вызывает проблем в системе, в которой работает fixup_bundle.

Надеюсь, кто-то знает, что такое fixup_bundle задыхается и может помочь. Я сейчас в тупике.

...