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 no longer includes libgccjit.so #101673

Closed
2 tasks done
nhojb opened this issue May 16, 2022 · 7 comments
Closed
2 tasks done

libgccjit no longer includes libgccjit.so #101673

nhojb opened this issue May 16, 2022 · 7 comments
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age

Comments

@nhojb
Copy link

nhojb commented May 16, 2022

brew gist-logs <formula> link OR brew config AND brew doctor output

brew config

HOMEBREW_VERSION: 3.4.11
ORIGIN: https://github.com/Homebrew/brew
HEAD: 30e3d8883cde265cbc16ff94b49a3ac14137590e
Last commit: 6 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 8f4a34c6a496b80fba397a3e3f234dfde8c5fb69
Core tap last commit: 41 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_EDITOR: emacs -nw
HOMEBREW_MAKE_JOBS: 16
HOMEBREW_NO_INSTALL_CLEANUP: set
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit cometlake
Clang: 13.1.6 build 1316
Git: 2.36.1 => /usr/local/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3.1-x86_64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.3.1
brew doctor
Your system is ready to brew.

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

In the past libgccjit install included the libgccjit.so library, in addition to the dylibs.

The .so library is required to build software from source which depends on libgccjit e.g. Emacs.

What happened (include all command output)?

The .so library is no longer installed after upgrading/installing libgccjit. I have tried:

brew upgrade

then
brew rm gcc libgccjit
brew install gcc libgccjit

In both cases the .so library was not installed. This is the contents of the libgccjit--11.3.0.monterey.bottle.tar.gz:

libgccjit/11.3.0/
libgccjit/11.3.0/.brew/
libgccjit/11.3.0/.brew/libgccjit.rb
libgccjit/11.3.0/COPYING
libgccjit/11.3.0/COPYING.LIB
libgccjit/11.3.0/COPYING.RUNTIME
libgccjit/11.3.0/ChangeLog
libgccjit/11.3.0/NEWS
libgccjit/11.3.0/README
libgccjit/11.3.0/include/
libgccjit/11.3.0/include/libgccjit++.h
libgccjit/11.3.0/include/libgccjit.h
libgccjit/11.3.0/lib/
libgccjit/11.3.0/lib/gcc/
libgccjit/11.3.0/lib/gcc/11/
libgccjit/11.3.0/lib/gcc/11/libgccjit.0.dylib
libgccjit/11.3.0/lib/gcc/11/libgccjit.dylib
libgccjit/11.3.0/libexec/
libgccjit/11.3.0/libexec/gcc/
libgccjit/11.3.0/libexec/gcc/x86_64-apple-darwin21/
libgccjit/11.3.0/libexec/gcc/x86_64-apple-darwin21/11/
libgccjit/11.3.0/libexec/gcc/x86_64-apple-darwin21/11/install-tools/
libgccjit/11.3.0/libexec/gcc/x86_64-apple-darwin21/11/plugin/
libgccjit/11.3.0/share/
libgccjit/11.3.0/share/info/
libgccjit/11.3.0/share/info/libgccjit.info

What did you expect to happen?

libgccjit.so should be included along with the dylib libraries.

Step-by-step reproduction instructions (by running brew commands)

brew install libgccjit
@nhojb nhojb added the bug Reproducible Homebrew/homebrew-core bug label May 16, 2022
@nhojb
Copy link
Author

nhojb commented May 16, 2022

Looks like the .so is only install on ARM64. Closing.

@SMillerDev
Copy link
Member

.so files are the linux version of .dylib files on macOS. They should not be installed on macOS and are not needed for software on macOS.

@nhojb nhojb closed this as completed May 16, 2022
@nhojb
Copy link
Author

nhojb commented May 16, 2022

Re-opening to get some clarity on this.

  1. I regularly build Emacs from source on M1 and Intel, and have done so for many months without problem.
  2. During this time I have used brew's libgccjit for Emacs native-complication feature. Installed via brew install libgccjit.
  3. After a break using my Intel Mac I ran a brew upgrade and then later attempted to launch Emacs. However this fails because the binary (previously built on the same Intel Mac) requires libgccjit.so:
otool -L Emacs
Emacs:
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2113.40.126)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 165.0.0)
	/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
	/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/local/opt/gnutls/lib/libgnutls.30.dylib (compatibility version 63.0.0, current version 63.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/local/opt/jansson/lib/libjansson.4.dylib (compatibility version 19.0.0, current version 19.0.0)
	/usr/local/opt/gmp/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0)
	/usr/local/opt/libgccjit/lib/gcc/11/libgccjit.so.0 (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
	/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1557.5.4)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
	/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1858.112.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
  1. If I try and compile Emacs from source (via make bootstrap) it fails during the configure step, but was previously working fine:
configure: error: ELisp native compiler was requested, but libgccjit was not found
  1. On my M1 Mac at /opt/homebrew/Cellar/libgccjit/11.3.0/lib/gcc/lib there is only the .so:
  2. On my Intel Mac at /usr/local/Cellar/libgccjit/11.3.0/lib/gcc/lib there is now only the .dylib

If the Emacs build requires libgccjit.so and it was previously working, then something must have changed in the libgccjit brew cask?

@nhojb nhojb reopened this May 16, 2022
@SMillerDev
Copy link
Member

Since GCC isn't officially supported on ARM yet https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libgccjit.rb uses a maintainer's branch. It could be that this .so extenstion bug is not fixed there yet. As to what emacs is doing when you compile from source, you'll have to ask upstream.

@nhojb
Copy link
Author

nhojb commented May 16, 2022

Thanks. So looks like a bug in Emacs configure.

FWIW renaming .dylib -> .so at least enables me to run Emacs again. But the build still fails.

@nhojb
Copy link
Author

nhojb commented May 16, 2022

Sent a patch to emacs upstream.

@nhojb nhojb closed this as completed May 16, 2022
@Bo98
Copy link
Member

Bo98 commented May 16, 2022

The .so was an upstream bug which was fixed: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100613. .dylib is indeed the correct behaviour.

arm64 build is a fork that doesn't contain all the 11.3 fixes which is why that still has .so, but it will be fixed with the 12.0 update soon.

@github-actions github-actions bot added the outdated PR was locked due to age label Jun 16, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

3 participants