Install Error: Library Not Found

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Install Error: Library Not Found

Post by FreddyFreddy »

macOS 12.4

Install error:

Code: Select all

-- INFO: Analyzing bundle dependencies...
-- ERROR: Unable to find LC_DYLD_LOAD entry: @rpath/libc++abi.1.dylib
-- ERROR: Failed to resolve dependency in /usr/local/opt/llvm/lib/libc++.1.dylib
Traceback (most recent call last):
  File "/Users/bernie/CLionProjects/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 391, in <module>
    main()
  File "/Users/bernie/CLionProjects/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 374, in main
    build_deps_graph(graph, bundle_path, dir_filter, search_paths)
  File "/Users/bernie/CLionProjects/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 241, in build_deps_graph
    deps = create_dep_nodes(list_install_names(k2), s_paths)
  File "/Users/bernie/CLionProjects/FreeCAD/src/Tools/MakeMacBundleRelocatable.py", line 166, in create_dep_nodes
    raise LibraryNotFound(lib_name + " not found in given search paths")
__main__.LibraryNotFound: libc++abi.1.dylib not found in given search paths
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Install Error: Library Not Found

Post by Gift »

Do you change this line?

If the file /usr/local/opt/llvm/lib/libc++abi.1.dylib exists you can overwrite @rpath to absolut path. The script change anyway this entry.

Code: Select all

install_name_tool -change @rpath/libc++abi.1.dylib /usr/local/opt/llvm/lib/libc++abi.1.dylib /usr/local/opt/llvm/lib/libc++.1.dylib
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Install Error: Library Not Found

Post by Gift »

FreddyFreddy wrote: Wed Jun 29, 2022 9:19 am macOS 12.4

Install error:
...
Have you been able to test this? Which version are you using? freecad.rb points to an old version. You can try to build it yourself (-DCMAKE_SKIP_RPATH=ON).
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: Install Error: Library Not Found

Post by FreddyFreddy »

Gift wrote: Fri Jul 08, 2022 7:34 am
FreddyFreddy wrote: Wed Jun 29, 2022 9:19 am macOS 12.4

Install error:
...
Have you been able to test this? Which version are you using? freecad.rb points to an old version. You can try to build it yourself (-DCMAKE_SKIP_RPATH=ON).
Sorry, I don't understand. Which version of what? I have NOT changed the line you mentioned previously.
Not ungrateful, appreciate your following up (!!!), and appreciate you are working on fixing the qt thing (!!!), but the whole thing is leaving me a bit cold. I wish I could understand the details, but alas ... If there is some way I can help pls let me know.
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Install Error: Library Not Found

Post by Gift »

FreddyFreddy wrote: Fri Jul 08, 2022 8:12 am Sorry, I don't understand. Which version of what? I have NOT changed the line you mentioned previously.
Not ungrateful, appreciate your following up (!!!), and appreciate you are working on fixing the qt thing (!!!), but the whole thing is leaving me a bit cold. I wish I could understand the details, but alas ... If there is some way I can help pls let me know.
When you create the bundle, the dependent libraries are copied into the bundle. Because the libraries also have dependencies, a tree with all dependencies is created first. Then the required files are searched for in previously defined directories. (In real both recursive.) If a dependency cannot be resolved, the script is terminated. The directories are defined here. Hence my question if you have changed anything there.

The script seems to have problems with @rpath (What) entries. You can manually overwrite the entity as described in my first post. Other solution is to use the cmake flag -DCMAKE_SKIP_RPATH=ON. But then you have to build LLVM yourself. I was still wondering that this problem exists with LLVM. I use llvm@13 and have no problems. Homebrew/FreeCAD points to llvm@11. Homebrew/Core is now at 14. Hence my question which version you are using.

I hope this helps a little.
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: Install Error: Library Not Found

Post by FreddyFreddy »

After some distractions, back to this.

Am using llvm v14.
Post Reply