jimeh / build-emacs-for-macos

Somewhat hacky script to automate building of Emac.app on macOS.
484 stars 50 forks source link

install_name_tool error while embedding libraries #60

Closed CsBigDataHub closed 3 years ago

CsBigDataHub commented 3 years ago

command -

./build-emacs-for-macos --no-xwidgets --native-full-aot --posix-spawn emacs-28
==> INFO: Embedding libraries for 1504 *.eln files within Emacs.app
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/mymac/Documents/build-emacs-for-macos/builds/Emacs.2021-11-10.8d81ab3.emacs-28.macOS-11.x86_64/Emacs.app/Contents/Frameworks/native-lisp/28_0_60-120224af/tag-write-5b235879-c4998f91.eln (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/mymac/Documents/build-emacs-for-macos/builds/Emacs.2021-11-10.8d81ab3.emacs-28.macOS-11.x86_64/Emacs.app/Contents/Frameworks/native-lisp/28_0_60-120224af/sendmail-bcf4df3f-e639e570.eln (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
==> INFO: Embedding libgccjit into Emacs.app
jimeh commented 3 years ago

Can you please try adding the --no-relink-eln-files flag, it should resolve it. Looks like I'll need to make that flag enabled by default.

CsBigDataHub commented 3 years ago

Thanks @jimeh , Should I update README to show --no-relink-eln-files and --posix-spawn options and create a PR.

jimeh commented 3 years ago

I'd say only if you're bored, I'll be doing that tonight along with making no-relink enabled by default. It was originally an experimental flag I added to try and resolve some issues with my emacs-builds project, but it really needs some proper attention/use now till I can resolve the underlying issue :)