Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libgccjit 11.3 replace .so file to .dylib let libgccjit_lib_dir become empty. #71

Closed
ccqpein opened this issue Apr 28, 2022 · 4 comments

Comments

@ccqpein
Copy link

ccqpein commented Apr 28, 2022

I update gcc and libgccjit this morning and the libgccjit.so file in /usr/local/opt/libgccjit/lib/gcc/ changed to libgccjit.0.dylib. And it make libgccjit_lib_dir become empty line 1128

Sounds like they keep this change in future versions disscussion.

Do we have configuration filter or options can make build-emacs-for-macos use libgccjit.dylib instead of .so?

Thank you

@Eason0210
Copy link

Eason0210 commented Apr 29, 2022

I also got this issue after brew upgrade.
when build emacs, will got this error:

➜  build-emacs-for-macos git:(master) ./build-emacs-for-macos --native-full-aot
==> INFO: Fetching info for git ref: master
==> INFO: emacs-mirror-emacs-fa52782.tgz already exists locally, attempting to use.
==> INFO: emacs-mirror-emacs-fa52782 source tree exists, attempting to use.
==> CMD: ./autogen.sh
Checking whether you have the necessary tools...
(Read INSTALL.REPO for more details on building Emacs)
Checking for autoconf (need at least version 2.65) ... ok
Your system has the required tools.
Running 'autoreconf -fi -I m4' ...
You can now run './configure'.
==> INFO: Detecting native-comp support: Supported
==> INFO: Compiling from source. This will take a while...
==> INFO: Compiling with native-comp enabled
ERROR: Detected GCC and libgccjit library paths do not belong to the same major
version of GCC. Detected paths:
  - /usr/local/opt/gcc/lib/gcc/11
  -

And emacs-plus have been fix it.
d12frosted/homebrew-emacs-plus#455

@ccqpein
Copy link
Author

ccqpein commented Apr 29, 2022

@Eason0210 thanks for your reply. Depends on the discussion in the link, looks like the master version of emacs can accept dylib now.

I change line 1129 to File.join(libgccjit_root_dir, 'lib/gcc/*/libgccjit.0.dylib*') and it works.

But do we need to keep the old .so options there? I dont know ruby, so I left my solution here and wish author or someone else can make a PR for it.

@Eason0210
Copy link

Eason0210 commented Apr 29, 2022

@ccqpein

Depends on the discussion in the link, looks like the master version of emacs can accept dylib now.

Yes, the master branch have been update to accept dylib.
see here : emacs-mirror/emacs@faa29fa

I change line 1129 to File.join(libgccjit_root_dir, 'lib/gcc/*/libgccjit.0.dylib*') and it works.

Good to know it works for you.
I change it to File.join(libgccjit_root_dir, 'lib/gcc/*/libgccjit.dylib*') and it works as well.

@jimeh
Copy link
Owner

jimeh commented Apr 29, 2022

Thanks for this report and information, I'll have a look and push a fix tonight :)

@jimeh jimeh closed this as completed in e31f5aa Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants