Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882061 - mail-client/thunderbird-102.5.0: failed to run custom build command for `gecko-profiler` on llvm system
Summary: mail-client/thunderbird-102.5.0: failed to run custom build command for `geck...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal trivial
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2022-11-19 23:04 UTC by foearb
Modified: 2023-05-25 07:22 UTC (History)
0 users

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


Attachments
build-script backtrace (file_882061.txt,792 bytes, text/plain)
2022-11-19 23:04 UTC, foearb
Details
emerge --info thunderbird (file_882061.txt,6.94 KB, text/plain)
2022-11-19 23:06 UTC, foearb
Details
build.log (build.log.zst,484.71 KB, application/zstd)
2022-11-19 23:25 UTC, foearb
Details
gdb output, without patches (file_882061.txt,717 bytes, text/plain)
2022-11-19 23:28 UTC, foearb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description foearb 2022-11-19 23:04:29 UTC
Created attachment 833907 [details]
build-script backtrace

thunderbird failes to compile on llvm profile. The custom build command under tools/proofiler/rust-api/build.rs throws a SIGSEGV for the crate `gecko-profiler`. I backtraced it with gdb (RUST_BACKTRACE=1 gdb --args ../thunderbird_build/releases/build/gecko-profiler-*/build-script_build) (Attachment 1 [details]). Note: I had already created a patch for which commented out the first occurance of the error, which was a println statement in line 114:54 of tools/profiler/rust-api/build.rs. 

Looking in the code it seems that 'env::var_os("OUT_DIR").unwrap()' leads to the segemntation fault.
Comment 1 foearb 2022-11-19 23:06:59 UTC
Created attachment 833909 [details]
emerge --info thunderbird
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-19 23:08:16 UTC
Please attach the full build.log too. What is the patch?
Comment 3 foearb 2022-11-19 23:25:04 UTC
Created attachment 833911 [details]
build.log
Comment 4 foearb 2022-11-19 23:28:16 UTC
Created attachment 833913 [details]
gdb output, without patches

I re-ran the build without patches
Comment 5 Joonas Niilola gentoo-dev 2022-11-21 08:41:04 UTC
I can't reproduce this, tried on an empty container with clang profile, your CFLAGS and use flags. I _could_ get this error for firefox-107.0 which is weird. 

Can you try if this fixes it for you: 
mkdir -p /etc/portage/patches/mail-client/thunderbird-102.5.0/
cd /etc/portage/patches/mail-client/thunderbird-102.5.0/
wget https://dev.gentoo.org/~juippis/mozilla/patchsets/0037-bgo-877267-rust-opaque-binding-type.patch

(use your own overlay if you have one, if not:)
cd /var/db/repos/gentoo/mail-client/thunderbird
edit thunderbird-102.5.0.ebuild

With:
----------
@@ -646,6 +646,9 @@ src_prepare() {
        einfo "Removing pre-built binaries ..."
        find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
 
+       # Clearing crate checksums where we have applied patches
+       moz_clear_vendor_checksums bindgen
+
        # Create build dir
        BUILD_DIR="${WORKDIR}/${PN}_build"
        mkdir -p "${BUILD_DIR}" || die
----------

And try emerging? After your attempt, if you used /var/db/repos/gentoo/mail-client/thunderbird you should "git restore thunderbird-102.5.0.ebuild" so it won't conflict on next emerge --sync.
Comment 6 12101111 2022-11-21 09:14:59 UTC
I can build Thunderbird with this patch. Don't have this issue on Firefox.
Comment 7 foearb 2022-11-21 10:40:20 UTC
Compiled with the patchset.
Comment 8 Larry the Git Cow gentoo-dev 2022-11-21 11:21:55 UTC
The bug has been closed via the following commit(s):

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

commit 70fba4d8c835bb958e2127663a77f7ed26afa866
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-11-21 11:21:07 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-11-21 11:21:53 +0000

    mail-client/thunderbird: update patchset, include libcxx patch from ff-106
    
    Closes: https://bugs.gentoo.org/882061
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 mail-client/thunderbird/Manifest                   | 2 +-
 mail-client/thunderbird/thunderbird-102.5.0.ebuild | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

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

commit 70ae9efefb72dfc723275ccf668f8581b1be78c0
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-11-21 11:20:25 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-11-21 11:21:53 +0000

    www-client/firefox: update patchset, include libcxx patch from ff-106
    
    Closes: https://bugs.gentoo.org/882061
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest               | 2 +-
 www-client/firefox/firefox-102.5.0.ebuild | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)