Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837506 - app-editors/emacs-28.1[jit] fails to configure with FEATURES="distcc"
Summary: app-editors/emacs-28.1[jit] fails to configure with FEATURES="distcc"
Status: RESOLVED FIXED
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: PATCH
Depends on:
Blocks:
 
Reported: 2022-04-09 16:24 UTC by Maciej S. Szmigiero
Modified: 2022-04-11 06:44 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,14.00 KB, text/x-log)
2022-04-10 22:58 UTC, Maciej S. Szmigiero
Details
proposed patch (emacs-28.1.ebuild.patch,664 bytes, patch)
2022-04-10 22:58 UTC, Maciej S. Szmigiero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2022-04-09 16:24:36 UTC
app-editors/emacs-28.1[jit] fails to configure when distcc is enabled:
> 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: The installed libgccjit failed to compile and run a test program using
> the libgccjit library; see config.log for the details of the failure.
> The test program can be found here:
> <https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
> You can try compiling it yourself to investigate the issues.
> Please report the issue to your distribution if libgccjit was installed
> through that.
> You can find the instructions on how to compile and install libgccjit from
> source on this site:
> <https://gcc.gnu.org/wiki/JIT>.

The relevant config.log snippet is:
> configure:16621: checking for libgccjit.h
> configure:16621: result: yes
> configure:16685: x86_64-pc-linux-gnu-gcc -o conftest  -march=ivybridge -pipe -O2 -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -pthread -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz  -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16      -Wl,-O1 -Wl,--as-needed  conftest.c -lgccjit -lX11   -lcairo  >&5 
> configure:16685: $? = 0
> configure:16685: ./conftest
> 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
> configure:16685: $? = 1
> configure: program exited with status 1

The package does configure and build successfully with FEATURES="-distcc".

This is similar to bug #801580 but for distcc instead of ccache.
Comment 1 Jonas Stein gentoo-dev 2022-04-10 12:21:09 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. This includes
* the complete build.log as attachment and
* a paste of the emerge info 
as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket

Please reopen this ticket (Status:UNCONFIRMED) afterwards.
Comment 2 Maciej S. Szmigiero 2022-04-10 22:58:11 UTC
Created attachment 769925 [details]
build.log
Comment 3 Maciej S. Szmigiero 2022-04-10 22:58:35 UTC
Created attachment 769928 [details, diff]
proposed patch
Comment 4 Maciej S. Szmigiero 2022-04-10 23:01:07 UTC
Attached the failed build.log and a proposed trivial patch that fixes the issue for me.

If whole "emerge --info" data turns out to be also necessary here would prefer to share it privately.
Comment 5 Larry the Git Cow gentoo-dev 2022-04-11 06:44:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cf5b2461c512ac556571f15968a826b5aa130b6

commit 1cf5b2461c512ac556571f15968a826b5aa130b6
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2022-04-11 06:42:29 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2022-04-11 06:44:02 +0000

    app-editors/emacs: Enable jit workaround also with distcc
    
    Thanks to Maciej S. Szmigiero for the fix.
    
    Closes: https://bugs.gentoo.org/837506
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-editors/emacs/emacs-28.1.9999.ebuild | 4 ++--
 app-editors/emacs/emacs-28.1.ebuild      | 4 ++--
 app-editors/emacs/emacs-29.0.9999.ebuild | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)