Solved this problem:
Code: Select all
Make Error at src/MacAppBundle/cmake_install.cmake:55 (file):
file INSTALL cannot find
"/tmp/freecad-20211115-25671-s2gnxp/src/MacAppBundle/import site": No such
By only having sip@4.19.24 available.
Code: Select all
$ brew link --force sip@4.19.24
$ brew remove sip
Now I'm resolving errors
Making bundle relocatable..:
Code: Select all
ERROR: Unable to find LC_DYLD_LOAD entry: @rpath/libc++abi.1.dylib
Changes to
src/MacAppBundle/CMakeLists.txt I'm working with now:
Code: Select all
$ git diff
diff --git a/src/MacAppBundle/CMakeLists.txt b/src/MacAppBundle/CMakeLists.txt
index c0b6ccf09f..a795c30bce 100644
--- a/src/MacAppBundle/CMakeLists.txt
+++ b/src/MacAppBundle/CMakeLists.txt
@@ -83,7 +83,7 @@ endif(BUILD_QT5)
install(FILES ${_pak_resolved_files} DESTINATION "${CMAKE_INSTALL_PREFIX}/")
# add icudtl.dat
-
+
install(PROGRAMS "${Qt5Core_DIR}/../../../lib/QtWebEngineCore.framework/Versions/5/Resources/icudtl.dat" DESTINATION ${CMAKE_INSTALL_PREFIX}/)
install(PROGRAMS "${Qt5Core_DIR}/../../../lib/QtWebEngineCore.framework/Versions/5/Resources/QtWebEngineCore.prl" DESTINATION ${CMAKE_INSTALL_PREFIX}/)
endif(BUILD_WEB)
@@ -112,7 +112,7 @@ install(CODE "execute_process(COMMAND chmod -R a+w ${CMAKE_INSTALL_LIBDIR})")
get_filename_component(APP_PATH ${CMAKE_INSTALL_PREFIX} PATH)
execute_process(
- COMMAND find /usr/local/Cellar/icu4c -name pkgconfig
+ COMMAND find /usr/local/Cellar/icu4c@67.1 -name pkgconfig
RESULT_VARIABLE CMD_ERROR
OUTPUT_VARIABLE CONFIG_ICU)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CONFIG_ICU}")
@@ -123,13 +123,17 @@ execute_process(
COMMAND find /usr/local/Cellar/nglib -name MacOS
OUTPUT_VARIABLE CONFIG_NGLIB)
-install(CODE
+execute_process(
+ COMMAND find /usr/local/Cellar/llvm -name lib
+ OUTPUT_VARIABLE CONFIG_LLVM)
+
+install(CODE
"message(STATUS \"Making bundle relocatable...\")
# The top-level CMakeLists.txt should prevent multiple package manager
# prefixes from being set, so the lib path will resolve correctly...
execute_process(
COMMAND python2.7
${CMAKE_SOURCE_DIR}/src/Tools/MakeMacBundleRelocatable.py
- ${APP_PATH} ${HOMEBREW_PREFIX}${MACPORTS_PREFIX}/lib ${ICU_PREFIX}/lib/ /usr/local/opt ${CONFIG_NGLIB} ${Qt5Core_DIR}/../../.. ${XCTEST_PATH} ${WEBKIT_FRAMEWORK_DIR}
+ ${APP_PATH} ${HOMEBREW_PREFIX}${MACPORTS_PREFIX}/lib ${ICU_PREFIX}/lib/ ${CONFIG_LLVM}/lib ${CONFIG_NGLIB} ${Qt5Core_DIR}/../../.. ${XCTEST_PATH} ${WEBKIT_FRAMEWORK_DIR}
)"
)
BUT ... even though I removed
icu4c from brew and only have
icu4c@67.1 installed
MakeMacBundleRelocatable.py is still looking for
/usr/local/opt/icu4c/lib/libicuuc.69.dylib
Code: Select all
-- Making bundle relocatable...
-- INFO: Analyzing bundle dependencies...
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: /usr/local/opt/icu4c/lib/libicuuc.69.dylib (No such file or directory)
-- ERROR: Failed to resolve dependency in /usr/local/opt/icu4c/lib/libicuuc.69.dylib
Traceback (most recent call last):
File "/Users/stephen/dev/freecad/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 388, in <module>
main()
File "/Users/stephen/dev/freecad/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 371, in main
build_deps_graph(graph, bundle_path, dir_filter, search_paths)
File "/Users/stephen/dev/freecad/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 238, in build_deps_graph
deps = create_dep_nodes(list_install_names(k2), s_paths)
File "/Users/stephen/dev/freecad/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 111, in list_install_names
output = check_output(["otool", "-L", path_macho])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['otool', '-L', '/usr/local/opt/icu4c/lib/libicuuc.69.dylib']' returned non-zero exit status 1
Here's the last section of the generated cmake file
src/MacAppBundle/cmake_install.cmake that's running this task:
Code: Select all
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
message(STATUS "Making bundle relocatable...")
# The top-level CMakeLists.txt should prevent multiple package manager
# prefixes from being set, so the lib path will resolve correctly...
execute_process(
COMMAND python2.7
/Users/stephen/dev/freecad/FreeCAD/src/Tools/MakeMacBundleRelocatable.py
/Users/stephen/dev/freecad/FreeCAD.app /usr/local/lib /usr/local/Cellar/icu4c@67.1/67.1_1/lib/ /usr/local/Cellar/llvm/13.0.0_1/lib
/usr/local/Cellar/llvm/13.0.0_1/lib/clang/13.0.0/lib
/usr/local/Cellar/llvm/13.0.0_1/Toolchains/LLVM13.0.0.xctoolchain/usr/lib
/usr/local/Cellar/llvm/13.0.0_1/Toolchains/LLVM13.0.0.xctoolchain/usr/lib/clang/13.0.0/lib
/lib /usr/local/Cellar/nglib/6.2.2101/Contents/MacOS
/usr/local/opt/qt5152/lib/cmake/Qt5Core/../../.. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/Current
)
endif()