You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# https:/stackoverflow.com/questions/9369519/reset-homebrew-formula/# Revert to original gcc.rb
brew update-reset
# Check languages for the absence of jit
brew edit gcc
# Reinstall regular gcc
brew reinstall gcc
../configure-gccemacs.sh
# checking for gcc_jit_context_acquire in -lgccjit... no# configure: error: elisp native compiler requested but libgccjit not found.# Please try installing libgccjit or similar package.# Modified ../configure-gccemacs.sh to use the following# readonly GCC_DIR="$(realpath $(brew --prefix)/opt/libgccjit)"
../configure-gccemacs.sh
# checking for gcc_jit_context_acquire in -lgccjit... yes# checking libgccjit.h usability... yes# checking libgccjit.h presence... yes# checking for libgccjit.h... yes# configure: error: Installed libgccjit has failed passing the smoke test.# You can verify it yourself compiling:# <https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.# Please report the issue to your distribution if libgccjit was installed through# that.# Here instructions on how to compile and install libgccjit from source:# <https://gcc.gnu.org/wiki/JIT>.# https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.htmlcd ../
gcc tut01-hello-world.c -o tut01-hello-world -lgccjit
# ld: library not found for -lgccjit# clang: error: linker command failed with exit code 1 (use -v to see invocation)# Added following @mnewt's advice# https://github.com/Homebrew/homebrew-core/pull/60338#issuecomment-735275157readonly GCC_LIBRARY_PATH="$(brew --prefix libgccjit)/lib/gcc/10"
[[ -d$GCC_LIBRARY_PATH ]] || { echo"${GCC_LIBRARY_PATH} not found";exit 1; }
export LIBRARY_PATH="${GCC_LIBRARY_PATH}"
gcc tut01-hello-world.c -o tut01-hello-world -lgccjit
# ld: warning: dylib (/usr/local/opt/libgccjit/lib/gcc/10//libgccjit.so) was built for newer macOS version (10.16) than being linked (10.15.6)
brew reinstall gcc
brew reinstall libgccjit
gcc tut01-hello-world.c -o tut01-hello-world -lgccjit
# ld: warning: dylib (/usr/local/opt/libgccjit/lib/gcc/10//libgccjit.so) was built for newer macOS version (10.16) than being linked (10.15.6)# Need to reinstall CLT under Big Sur
rm -rf /Library/Developer/CommandLineTools
xcode-select --install
gcc tut01-hello-world.c -o tut01-hello-world -lgccjit
# No error
./tut01-hello-world
# hello world# Success if the following appears.# Does Emacs have native lisp compiler? yes
Compile
sysctl hw.logicalcpu
# hw.logicalcpu: 8
make -j8
make install
This procedure installs gccemacs using the new
libgccjit
Homebrew formula (Oct 2020) without having to edit thegcc
formula.