Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721126 - www-client/firefox-76.0: emake failed: failed to run custom build command for swgl v0.1.0
Summary: www-client/firefox-76.0: emake failed: failed to run custom build command for...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 17:41 UTC by Alexey
Modified: 2020-10-04 14:36 UTC (History)
2 users (show)

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


Attachments
build.log (build.log.bz2,216.81 KB, application/x-bzip2)
2020-05-05 17:43 UTC, Alexey
Details
emerge --info (file_721126.txt,19.33 KB, text/plain)
2020-05-05 17:45 UTC, Alexey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2020-05-05 17:41:47 UTC
[swgl 0.1.0] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError { info: "0: at line 904:\n#define ACTUAL_VECS_PER_BRUSH VECS_PER_SPECIFIC_BRUSH\n^\nexpected \'}\', found #\n\n" }', src/libcore/result.rs:1188:5
Comment 1 Alexey 2020-05-05 17:43:18 UTC
Created attachment 636268 [details]
build.log
Comment 2 Alexey 2020-05-05 17:45:30 UTC
Created attachment 636270 [details]
emerge --info
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-05-06 13:30:21 UTC
The interesting part seems to be

> 3:58.19 --- stderr
> 3:58.19 thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError { info: "0: at line 904:\n#define ACTUAL_VECS_PER_BRUSH VECS_PER_SPECIFIC_BRUSH\n^\nexpected \'}\', found #\n\n" }', src/libcore/result.rs:1188:5
> 3:58.19 stack backtrace:
> 3:58.19    0:     0x561b53056a53 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he791667536cc6636
> 3:58.19    1:     0x561b5307230d - core::fmt::write::h9812d54d3d1b3ed1
> 3:58.19    2:     0x561b53055955 - std::io::Write::write_fmt::haf77cbecd15fd6f5
> 3:58.19    3:     0x561b53059efe - std::panicking::default_hook::{{closure}}::h3e9084c18932584e
> 3:58.19    4:     0x561b53059c10 - std::panicking::default_hook::hd9ee49f6927eb94c
> 3:58.19    5:     0x561b5305a5db - std::panicking::rust_panic_with_hook::h6f1a44b2613a334b
> 3:58.19    6:     0x561b5305a18e - rust_begin_unwind
> 3:58.19    7:     0x561b5307760e - core::panicking::panic_fmt::hc8975cca6005847b
> 3:58.19    8:     0x561b53071ab7 - core::result::unwrap_failed::hd3fcebbab8d186ae
> 3:58.19    9:     0x561b52f79060 - glsl_to_cxx::parse_shader::hb415b2d67ab25bbb
> 3:58.19   10:     0x561b52f78727 - glsl_to_cxx::translate::h278aee5673ff1943
> 3:58.19   11:     0x561b52f6cad0 - build_script_build::main::h6b02893ea45414cf
> 3:58.19   12:     0x561b52f69483 - std::rt::lang_start::{{closure}}::h02617dec8f03267c
> 3:58.19   13:     0x561b5305a023 - std::panicking::try::do_call::hbff5af65fcac42c3
> 3:58.19   14:     0x561b5305da2a - __rust_maybe_catch_panic
> 3:58.19   15:     0x561b53049c9c - std::rt::lang_start_internal::h31d7321f9a231a49
> 3:58.19   16:     0x561b52f6dd72 - main
> 3:58.19   17:     0x7fc9972eee2b - __libc_start_main
> 3:58.19                                at ../csu/libc-start.c:308
> 3:58.19   18:     0x561b52f681ba - _start
> 3:58.19   19:                0x0 - <unknown>
> 3:58.19 warning: build failed, waiting for other jobs to finish...

I have no idea at the moment and I can't reproduce. I used up-to-date stable stage3 with your USE flag when I tried to reproduce.

Looks like you are failing in https://hg.mozilla.org/releases/mozilla-release/file/tip/gfx/wr/webrender/res/brush.glsl#l158 ...
Comment 4 Jory A. Pratt gentoo-dev 2020-05-06 14:29:14 UTC
(In reply to Thomas Deutschmann from comment #3)
> The interesting part seems to be
> 
> > 3:58.19 --- stderr
> > 3:58.19 thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError { info: "0: at line 904:\n#define ACTUAL_VECS_PER_BRUSH VECS_PER_SPECIFIC_BRUSH\n^\nexpected \'}\', found #\n\n" }', src/libcore/result.rs:1188:5
> > 3:58.19 stack backtrace:
> > 3:58.19    0:     0x561b53056a53 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he791667536cc6636
> > 3:58.19    1:     0x561b5307230d - core::fmt::write::h9812d54d3d1b3ed1
> > 3:58.19    2:     0x561b53055955 - std::io::Write::write_fmt::haf77cbecd15fd6f5
> > 3:58.19    3:     0x561b53059efe - std::panicking::default_hook::{{closure}}::h3e9084c18932584e
> > 3:58.19    4:     0x561b53059c10 - std::panicking::default_hook::hd9ee49f6927eb94c
> > 3:58.19    5:     0x561b5305a5db - std::panicking::rust_panic_with_hook::h6f1a44b2613a334b
> > 3:58.19    6:     0x561b5305a18e - rust_begin_unwind
> > 3:58.19    7:     0x561b5307760e - core::panicking::panic_fmt::hc8975cca6005847b
> > 3:58.19    8:     0x561b53071ab7 - core::result::unwrap_failed::hd3fcebbab8d186ae
> > 3:58.19    9:     0x561b52f79060 - glsl_to_cxx::parse_shader::hb415b2d67ab25bbb
> > 3:58.19   10:     0x561b52f78727 - glsl_to_cxx::translate::h278aee5673ff1943
> > 3:58.19   11:     0x561b52f6cad0 - build_script_build::main::h6b02893ea45414cf
> > 3:58.19   12:     0x561b52f69483 - std::rt::lang_start::{{closure}}::h02617dec8f03267c
> > 3:58.19   13:     0x561b5305a023 - std::panicking::try::do_call::hbff5af65fcac42c3
> > 3:58.19   14:     0x561b5305da2a - __rust_maybe_catch_panic
> > 3:58.19   15:     0x561b53049c9c - std::rt::lang_start_internal::h31d7321f9a231a49
> > 3:58.19   16:     0x561b52f6dd72 - main
> > 3:58.19   17:     0x7fc9972eee2b - __libc_start_main
> > 3:58.19                                at ../csu/libc-start.c:308
> > 3:58.19   18:     0x561b52f681ba - _start
> > 3:58.19   19:                0x0 - <unknown>
> > 3:58.19 warning: build failed, waiting for other jobs to finish...
> 
> I have no idea at the moment and I can't reproduce. I used up-to-date stable
> stage3 with your USE flag when I tried to reproduce.
> 
> Looks like you are failing in
> https://hg.mozilla.org/releases/mozilla-release/file/tip/gfx/wr/webrender/
> res/brush.glsl#l158 ...

Your chasing a bug that is gonna be introduced by another overlay, or from a user with a modified eclass/ebuild. -g* are filtered via the eclass and should not be seen in the log.
Comment 5 Alexey 2020-05-06 14:35:16 UTC
No, I didn't modify my firefox eclass/ebuild...
Comment 6 Ionen Wolkens gentoo-dev 2020-05-06 16:44:29 UTC
(In reply to Jory A. Pratt from comment #4)
> -g* are filtered via the eclass and should not be seen in the log.
No, '-ggdb[0-9]' is in ALLOWED_FLAGS=() (see flag-o-matic eclass) and left alone by strip-flags(). If it needs to be stripped, will need to be done differently. Currently all the eclass does specially when -g* exists is disable elf hack.
Comment 7 زياد بن عبدالعزيز الباتلي 2020-05-10 20:47:06 UTC
Had the same problem.  The error:
----8<----
23:41.38 [swgl 0.1.0] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError { info: "0: at line 875:\n#define ACTUAL_VECS_PER_BRUSH VECS_PER_SPECIFIC_BRUSH\n^\nexpected \'}\', found #\n\n" }', src/libcore/result.rs:1188:5
23:41.38 [swgl 0.1.0] stack backtrace:
23:41.63 [swgl 0.1.0]    0:     0x558cc5520a33 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he791667536cc6636
23:41.63 [swgl 0.1.0]    1:     0x558cc553c2ed - core::fmt::write::h9812d54d3d1b3ed1
23:41.63 [swgl 0.1.0]    2:     0x558cc551f935 - std::io::Write::write_fmt::haf77cbecd15fd6f5
23:41.63 [swgl 0.1.0]    3:     0x558cc5523ede - std::panicking::default_hook::{{closure}}::h3e9084c18932584e
23:41.63 [swgl 0.1.0]    4:     0x558cc5523bf0 - std::panicking::default_hook::hd9ee49f6927eb94c
23:41.63 [swgl 0.1.0]    5:     0x558cc55245bb - std::panicking::rust_panic_with_hook::h6f1a44b2613a334b
23:41.63 [swgl 0.1.0]    6:     0x558cc552416e - rust_begin_unwind
23:41.63 [swgl 0.1.0]    7:     0x558cc55415ee - core::panicking::panic_fmt::hc8975cca6005847b
23:41.63 [swgl 0.1.0]    8:     0x558cc553ba97 - core::result::unwrap_failed::hd3fcebbab8d186ae
23:41.63 [swgl 0.1.0]    9:     0x558cc5443040 - glsl_to_cxx::parse_shader::hb415b2d67ab25bbb
23:41.63 [swgl 0.1.0]   10:     0x558cc5442707 - glsl_to_cxx::translate::h278aee5673ff1943
23:41.63 [swgl 0.1.0]   11:     0x558cc5436ab0 - build_script_build::main::h6b02893ea45414cf
23:41.63 [swgl 0.1.0]   12:     0x558cc5433463 - std::rt::lang_start::{{closure}}::h02617dec8f03267c
23:41.64 [swgl 0.1.0]   13:     0x558cc5524003 - std::panicking::try::do_call::hbff5af65fcac42c3
23:41.64 [swgl 0.1.0]   14:     0x558cc5527a0a - __rust_maybe_catch_panic
23:41.64 [swgl 0.1.0]   15:     0x558cc5513c7c - std::rt::lang_start_internal::h31d7321f9a231a49
23:41.64 [swgl 0.1.0]   16:     0x558cc5437d52 - main
23:41.64 [swgl 0.1.0]   17:     0x7f682fe13e0e - __libc_start_main
23:41.64 [swgl 0.1.0]                                at ../csu/libc-start.c:308
23:41.64 [swgl 0.1.0]   18:     0x558cc54321ba - _start
23:41.64 [swgl 0.1.0]   19:                0x0 - <unknown>
23:41.64 error: failed to run custom build command for `swgl v0.1.0 (/mnt/4TB/var/tmp/portage/www-client/firefox-76.0.1/work/firefox-76.0.1/gfx/wr/swgl)`
23:41.64 Caused by:
23:41.64   process didn't exit successfully: `/mnt/4TB/var/tmp/portage/www-client/firefox-76.0.1/work/firefox-76.0.1/ff/release/build/swgl-f6d811ecfa4704ce/build-script-build` (exit code: 101)
---->8----

And managed to “fix” it.

It seems removing any trace of “-g” in “CFLAGS” will fix this problem!  Not even passing “-g0” (which disable any “-g” option according to GCC documentation) at the end of “CFLAGS” will fix this.  Only removing the debugging option fixed it for me.

I added a “www-client/firefox no-debug.conf” line to “/etc/portage/package.env”; then created a “/etc/portage/env/no-debug.conf” file that contains: “CFLAGS="$CFLAGS -g0"”, but it didn’t work!  I then modified the file to include the same “CFLAGS” found in “/etc/portage/make.conf” after stripping/filtering all reference to “-g”, and it worked!.  Weird.

My “USE” flags: -bindist -clang custom-cflags custom-optimization -debug -eme-free -geckodriver -gmp-autoupdate -hardened hwaccel -jack -lto -pgo -pulseaudio -screenshot (-selinux) startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -test wayland -wifi

My normal “CFLAGS” contains: -ggdb3

Everything in my system is stable except:
    www-client/firefox (obviously)
    media-fonts/*
    xfce-*/*
    media-video/ffmpeg
    media-video/mpv
    media-gfx/mcomix
and whatever is needed to build above packages.


Hope that helps.
Thank you for your help.
Ziyad.
Comment 8 Larry the Git Cow gentoo-dev 2020-10-04 14:36:29 UTC
The bug has been closed via the following commit(s):

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

commit c933d829abca11b8909587fa14ce82e24dd175d5
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-10-04 14:35:59 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-10-04 14:36:24 +0000

    mail-client/thunderbird: don't pass -g* value from FLAGS when not using CLANG
    
    Closes: https://bugs.gentoo.org/721126
    Closes: https://bugs.gentoo.org/746506
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 mail-client/thunderbird/thunderbird-78.3.1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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

commit d16d2717ec6e75c500dd429abf39e93bc1d58130
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-10-04 14:33:56 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-10-04 14:36:23 +0000

    www-client/firefox: don't pass -g* value from FLAGS when not using CLANG
    
    Closes: https://bugs.gentoo.org/721126
    Closes: https://bugs.gentoo.org/746506
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-78.3.1.ebuild | 6 +++++-
 www-client/firefox/firefox-81.0.1.ebuild | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)