Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940244 - app-emacs/magit-4.0.0 fails to emerge: elisp-compile: batch-byte-compile failed
Summary: app-emacs/magit-4.0.0 fails to emerge: elisp-compile: batch-byte-compile failed
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-25 15:08 UTC by Remco Rijnders
Modified: 2024-09-25 18:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,89.54 KB, text/x-log)
2024-09-25 15:08 UTC, Remco Rijnders
Details
emerge info (magit_emerge_info.txt,6.83 KB, text/plain)
2024-09-25 15:10 UTC, Remco Rijnders
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remco Rijnders 2024-09-25 15:08:41 UTC
Created attachment 903778 [details]
build.log

When running: emerge --ask magit I get:
 * elisp-compile: batch-byte-compile failed                                                                                                           [ !! ]
 * ERROR: app-emacs/magit-4.0.0::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 136:  Called src_compile
 *   environment, line 912:  Called elisp_src_compile
 *   environment, line 802:  Called elisp-compile 'git-commit-pkg.el' 'git-commit.el' 'git-rebase.el' 'magit-apply.el' 'magit-autorevert.el' 'magit-base.el' 'magit-bisect.el' 'magit-blame.el' 'magit-bookmark.el' 'magit-branch.el' 'magit-bundle.el' 'magit-clone.el' 'magit-commit.el' 'magit-core.el' 'magit-diff.el' 'magit-ediff.el' 'magit-extras.el' 'magit-fetch.el' 'magit-files.el' 'magit-git.el' 'magit-gitignore.el' 'magit-log.el' 'magit-margin.el' 'magit-merge.el' 'magit-mode.el' 'magit-notes.el' 'magit-patch.el' 'magit-pkg.el' 'magit-process.el' 'magit-pull.el' 'magit-push.el' 'magit-reflog.el' 'magit-refs.el' 'magit-remote.el' 'magit-repos.el' 'magit-reset.el' 'magit-section-pkg.el' 'magit-section.el' 'magit-sequence.el' 'magit-sparse-checkout.el' 'magit-stash.el' 'magit-status.el' 'magit-submodule.el' 'magit-subtree.el' 'magit-tag.el' 'magit-transient.el' 'magit-version.el' 'magit-wip.el' 'magit-worktree.el' 'magit.el'
 *   environment, line 509:  Called die
 * The specific snippet of code:
 *       eend $? "elisp-compile: batch-byte-compile failed" || die
 * 
 * If you need support, post the output of `emerge --info '=app-emacs/magit-4.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emacs/magit-4.0.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emacs/magit-4.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emacs/magit-4.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emacs/magit-4.0.0/work/magit-4.0.0/lisp'
 * S: '/var/tmp/portage/app-emacs/magit-4.0.0/work/magit-4.0.0/lisp'
Comment 1 Remco Rijnders 2024-09-25 15:10:26 UTC
Created attachment 903779 [details]
emerge info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-25 15:31:00 UTC
```
In end of data:
git-commit-pkg.el:1:2: Warning: the function ‘define-package’ is not known to be defined.

In toplevel form:
git-commit.el:126:2: Error: Native compiler error: (lambda (&rest arg0) (let ((f #'make-process)) (apply f arg0))), "Compiling /var/tmp/portage/app-emacs/magit-4.0.0/homedir/.emacs.d/eln-cache/29.4-d8b76f26/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln...
ld: cannot find crtbeginS.o: No such file or directory
ld: cannot find -lgcc: No such file or directory
ld: cannot find -lgcc_s: No such file or directory
libgccjit.so: error: error invoking gcc driver
Internal native compiler error: \"failed to compile\", \"/var/tmp/portage/app-emacs/magit-4.0.0/homedir/.emacs.d/eln-cache/29.4-d8b76f26/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln\", \"error invoking gcc driver\"
```

Your currently selected GCC seems to not have gcc[jit].
Comment 3 Remco Rijnders 2024-09-25 16:54:42 UTC
Thanks Sam. I rebuilt gcc with use flag jit and it seems to make no difference. Checking use of this jit USE flag, it is enabled and used for both gcc and emacs.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-25 16:56:00 UTC
(In reply to Remco Rijnders from comment #3)
> Thanks Sam. I rebuilt gcc with use flag jit and it seems to make no
> difference. Checking use of this jit USE flag, it is enabled and used for
> both gcc and emacs.

Can you try the following:
1) show gcc-config output, then `gcc-config latest`, then
2) . /etc/profile
and share the new build.log + emerge --info?
Comment 5 Remco Rijnders 2024-09-25 17:39:54 UTC
I think this one might fall in the PEBKAC category.

I tried to switch from nomultilib profile before to mulitlib so I could run steam, then found out I had gotten in a little deeper than I wanted and reversed back. It looks like that may have left my system in a somewhat inconsistent state and this being the result of it.

Going to try Sam's suggestion now and hope that will take care of it.
Comment 6 Remco Rijnders 2024-09-25 18:26:00 UTC
I did several steps including re-emerging glibc, binutils, emacs, and gcc. All without luck. After doing:

export LIBRARY_PATH="/usr/lib/gcc/x86_64-pc-linux-gnu/13:$LIBRARY_PATH"
export CFLAGS="-L/usr/lib/gcc/x86_64-pc-linux-gnu/13 $CFLAGS"
export LDFLAGS="-L/usr/lib/gcc/x86_64-pc-linux-gnu/13 $LDFLAGS"

I was able to emerge magit successfully.

Thanks for your help Sam.