[MacPorts] #71298: emacs @29.4+nativecomp+treesitter segfaults clang during build

MacPorts noreply at macports.org
Wed Nov 13 13:09:04 UTC 2024


#71298: emacs @29.4+nativecomp+treesitter segfaults clang during build
-------------------------+----------------------
  Reporter:  JGoldstone  |      Owner:  drkp
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.10.4
Resolution:              |   Keywords:
      Port:  emacs       |
-------------------------+----------------------

Comment (by JGoldstone):

 Regarding "Which file, and why is it broken?", I re-ran the install with
 -d, and examined the output, which naturally enough is now more helpful
 than "Found one broken file, matching files to ports". That expands to
 this:

 {{{
 --->  Scanning binaries for linking errors
 DEBUG: Skipping weakly-linked /opt/local/lib/libXss.1.dylib
 DEBUG: Skipping weakly-linked /opt/local/lib/libXss.1.dylib
 DEBUG: Ignoring loadcommand containing @rpath in
 /opt/local/lib/libgcc/libgfortran.5.dylib
 DEBUG: Ignoring loadcommand containing @rpath in
 /opt/local/lib/libgcc/libgfortran.5.dylib
 DEBUG: Ignoring loadcommand containing @rpath in /opt/local/lib/libgcc
 /libobjc-gnu.4.dylib
 DEBUG: Ignoring loadcommand containing @rpath in
 /opt/local/lib/libgcc/libstdc++.6.dylib
 DEBUG: Ignoring loadcommand containing @rpath in
 /opt/local/lib/gcc14/libgccjit.0.dylib
 Could not open /opt/local/lib/libtree-sitter.0.23.dylib: Error opening or
 reading file (referenced from /opt/local/bin/emacs-29.4)
 DEBUG: Marking /opt/local/bin/emacs-29.4 as broken
 DEBUG: Ignoring loadcommand containing @rpath in /opt/local/bin/emacs-29.4
 --->  Found 1 broken file, matching files to ports
 --->  Found 1 broken port, determining rebuild order
 DEBUG: Broken: emacs
 DEBUG: Processing port emacs @0:29.4_1+nativecomp+treesitter
 }}}

 In /opt/local/lib there is a libtree-sitter.0.24.dylib, but not the above-
 linked libtree-sitter.0.23.dylib. I tried installing without the default
 treesitter variant, but that leads to a recompile, which leads to the
 clang segfault, which as you point out is not your problem.

 I don't know enough MacPorts internals to understand how I can update the
 emacs Portfile so that when the tree-sitter dependency is satisfied, it
 goes for the most recent version rather than 0.23. Or perhaps it's some
 other file that needs to be changed; again, I don't know enough; my
 experience with MacPorts is as a user, not someone who has had to learn
 how to make and maintain a port.

 I realize it's quite grotesque, but I seem to have managed a workaround:
 first I install  with --no-rev-upgrade, and then I use install_name_tool
 to cause the emacs binary to reference the newest (0.24) version rather
 than the nonexistent 0.23 version to which it is embedding a reference.

 Leaving the clang thing unaddressed (since as you say it's not your
 problem) does the above more detailed diagnosis provide information on
 which a maintainer could act? If not, is there something I could do to
 make this an actionable report?

-- 
Ticket URL: <https://trac.macports.org/ticket/71298#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list