ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

Seg Fault on Some Fedora 42 GNOME/KDE on Master Branch

Open matthew-j-hooper opened this issue 10 months ago • 21 comments

Summary

Following build instructions, I receive seg faults when attempting to build or run Ladybird. This occurs both on a brand new clone of the repo and on older repos pulling updates from master.

Operating system

Linux

Steps to reproduce

As described in the build instructions:

  1. run sudo dnf install autoconf-archive automake ccache cmake curl liberation-sans-fonts libglvnd-devel nasm ninja-build perl-FindBin perl-IPC-Cmd perl-lib qt6-qtbase-devel qt6-qtmultimedia-devel qt6-qttools-devel qt6-qtwayland-devel tar unzip zip zlib-ng-compat-static to update prerequisites.
  2. clone the repo with git clone https://github.com/LadybirdBrowser/ladybird.git and cd ladybird/
  3. build and run with ./Meta/ladybird.sh run

Expected behavior

Expected browser to open as usual

Actual behavior

When following the steps above:

matthew@192-168-1-117 ~/D/R/ladybird (master)> ./Meta/ladybird.sh run
ninja: Entering directory `/home/matthew/Documents/Repos/ladybird/Build/release'
[0/2] Re-checking globbed directories...
ninja: no work to do.
./Meta/ladybird.sh: line 192: 171922 Segmentation fault      (core dumped) "$BUILD_DIR/bin/$lagom_target" "${lagom_args[@]}"

after running cd Build/release/bin/ and gdb ./Ladybird:

matthew@192-168-1-117 ~/D/R/l/B/r/bin (master) [SIGSEGV]> gdb ./Ladybird
GNU gdb (Fedora Linux) 16.2-3.fc42
...
Reading symbols from ./Ladybird...
(gdb) run
Starting program: /home/matthew/Documents/Repos/ladybird/Build/release/bin/Ladybird 
...
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0c002cc in ?? ()
(gdb) bt
#0  0x00007ffff0c002cc in ?? ()
#1  0x00007ffff7fcb4f0 in call_init (l=0x7ffff5bab660, argc=1, argv=0x7fffffffe268, env=0x7fffffffe278) at dl-init.c:60
#2  call_init (l=0x7ffff5bab660, argc=1, argv=0x7fffffffe268, env=0x7fffffffe278) at dl-init.c:26
#3  0x00007ffff7fcb60d in _dl_init (main_map=0x7ffff7ffe310, argc=1, argv=0x7fffffffe268, env=0x7fffffffe278) at dl-init.c:121
#4  0x00007ffff7fe38e0 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#5  0x0000000000000001 in ?? ()
#6  0x00007fffffffe631 in ?? ()
#7  0x0000000000000000 in ?? ()
(gdb) 

running it with LD_DEBUG=libs produces this error with the last few lines shown:

    178019:	calling init: /home/matthew/Documents/Repos/ladybird/Build/release/vcpkg_installed/x64-linux-dynamic/lib/libfontconfig.so.1
    178019:	
    178019:	
    178019:	calling init: /home/matthew/Documents/Repos/ladybird/Build/release/vcpkg_installed/x64-linux-dynamic/lib/libskia.so
    178019:	
fish: Job 1, 'LD_DEBUG=libs ./Ladybird' terminated by signal SIGSEGV (Address boundary error)

Lastly running with BUILD_PRESET=Debug gives:

matthew@192-168-1-117 ~/D/R/l/B/r/bin (master) [SIGSEGV]> BUILD_PRESET=Debug ./Ladybird
fish: Job 1, 'BUILD_PRESET=Debug ./Ladybird' terminated by signal SIGSEGV (Address boundary error)

As an additional note, I have checked this using bash to make sure this is not a fish issue.

URL for a reduced test case

N/A

HTML/SVG/etc. source for a reduced test case

N/A

Log output and (if possible) backtrace

N/A

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • [ ] I’ll contribute a patch for this myself.

matthew-j-hooper avatar May 03 '25 07:05 matthew-j-hooper

Can confirm, have the same issue, on Fedora 42 KDE.

askonomm avatar May 03 '25 08:05 askonomm

I'm also on Fedora 42 KDE, and I don't get this issue, at least not when pulling master in an existing repo. So there's some extra nuance here.

AtkinsSJ avatar May 03 '25 09:05 AtkinsSJ

I'm at Fedora 42 GNOME and I have same issue

nekoedges avatar May 03 '25 13:05 nekoedges

I also have run into this issue on Fedora 42 (which is part of the reason that system is now on Arch).

billhasarrived avatar May 03 '25 20:05 billhasarrived

Have been looking around in the files to see if I could find anything useful but to no success so far. Last time I tried to compile it was last month (successfully), and at that time I was using F41. KDE is currently using this software:

Plasma: 6.3.4 Frameworks: 6.13.0 Qt: 6.9.0 Kernel: 6.14.4-300.fc42.x86_64 Platform: Wayland GPU: discreet AMD

matthew-j-hooper avatar May 04 '25 07:05 matthew-j-hooper

I have this same issue on the Fedora 42 Sway spin. The issue affects 2 of my machines with different hardware. Both machines started at version 40 and were updated over time to 41 and then 42 using dnf instead of clean installs. I ran across a person online that thought they fixed a build problem (on another code base) by reinstalling Fedora from scratch. I hope this isn't a Fedora system-upgrade problem leaving something old around. I've tried adding Mesa libraries (thinking libSkia needs them) and building with clang with no change in outcome. I haven't tried using a clean install of Fedora 42.

cmbrownfield avatar May 04 '25 13:05 cmbrownfield

I ran across a person online that thought they fixed a build problem (on another code base) by reinstalling Fedora from scratch. I hope this isn't a Fedora system-upgrade problem leaving something old around. I've tried adding Mesa libraries (thinking libSkia needs them) and building with clang with no change in outcome. I haven't tried using a clean install of Fedora 42.

My system was a clean install plus package updates, probably should have specified that, sorry. (I had a previous issue about this #4510 , but I closed it because I didn't have the time to figure out gdb.)

billhasarrived avatar May 04 '25 13:05 billhasarrived

We're crashing in static initializers of skia?

Yikes. Since Sam isn't seeing this, I'm guessing this is something that can be fixed or avoided by having some extra package we forgot to list (?). That or Sam isn't trying a Debug preset :). The root cause is probably some mismatch between system libraries and our own libraries.

There was a thread where some Arch users found adding qt (or rather, a specific list of qt subcomponents) to vcpkg.json to build qt from source with vcpkg libraries resolved an issue they were having. I wonder if that applies here?

ADKaster avatar May 04 '25 14:05 ADKaster

There was also an issue with harfbuzz version mismatches (on the release preset) on Arch, I completely forgot to mention that... (should be fine when vcpkg updates to the latest I think)

alimpfard avatar May 04 '25 14:05 alimpfard

This issue also happens on a fresh install of Fedora WSL on Windows 11. Thought this might help with debugging.

osalbahr avatar May 06 '25 00:05 osalbahr

Yeah, it happens in a fresh fedora:42 dockerfile as well. We don't need any more +1s on this issue, I think 😅

ADKaster avatar May 06 '25 00:05 ADKaster

Also seeing this on fedroa 42 updated from fedora 41. Tried under hyprlaqnd, KDE and Sway

theophilusx avatar May 07 '25 01:05 theophilusx

See also: https://github.com/LadybirdBrowser/ladybird/issues/2149

torokati44 avatar May 07 '25 08:05 torokati44

I get segmentation faults in GenerateCSSDescriptors, GenerateEncodingIndexes, and IPCCompiler. (lol c++)

ninja: Entering directory `/home/attila/projects/ladybird/Build/debug'
[0/2] Re-checking globbed directories...
[1/2876] Generating CSS/DescriptorID.h, CSS/DescriptorID.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/DescriptorID.h Lagom/Libraries/LibWeb/CSS/DescriptorID.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/DescriptorID.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/DescriptorID.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSDescriptors -h CSS/DescriptorID.h.tmp -c CSS/DescriptorID.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/Descriptors.json && /usr/bin/cmake -E copy_if_different CSS/DescriptorID.h.tmp CSS/DescriptorID.h && /usr/bin/cmake -E copy_if_different CSS/DescriptorID.cpp.tmp CSS/DescriptorID.cpp && /usr/bin/cmake -E remove CSS/DescriptorID.h.tmp CSS/DescriptorID.cpp.tmp
[2/2876] Generating CSS/GeneratedCSSStyleProperties.h, CSS/GeneratedCSSStyleProperties.cpp, CSS/GeneratedCSSStyleProperties.idl
FAILED: Lagom/Libraries/LibWeb/CSS/GeneratedCSSStyleProperties.h Lagom/Libraries/LibWeb/CSS/GeneratedCSSStyleProperties.cpp Lagom/Libraries/LibWeb/CSS/GeneratedCSSStyleProperties.idl /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/GeneratedCSSStyleProperties.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/GeneratedCSSStyleProperties.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/GeneratedCSSStyleProperties.idl 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSStyleProperties -h CSS/GeneratedCSSStyleProperties.h.tmp -c CSS/GeneratedCSSStyleProperties.cpp.tmp -i CSS/GeneratedCSSStyleProperties.idl.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/Properties.json && /usr/bin/cmake -E copy_if_different CSS/GeneratedCSSStyleProperties.h.tmp CSS/GeneratedCSSStyleProperties.h && /usr/bin/cmake -E copy_if_different CSS/GeneratedCSSStyleProperties.cpp.tmp CSS/GeneratedCSSStyleProperties.cpp && /usr/bin/cmake -E copy_if_different CSS/GeneratedCSSStyleProperties.idl.tmp CSS/GeneratedCSSStyleProperties.idl && /usr/bin/cmake -E remove CSS/GeneratedCSSStyleProperties.h.tmp CSS/GeneratedCSSStyleProperties.cpp.tmp CSS/GeneratedCSSStyleProperties.idl.tmp
[3/2876] Generating Worker/WebWorkerClientEndpoint.h
FAILED: Lagom/Libraries/LibWeb/Worker/WebWorkerClientEndpoint.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/Worker/WebWorkerClientEndpoint.h 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/IPCCompiler /home/attila/projects/ladybird/Libraries/LibWeb/Worker/WebWorkerClient.ipc -o Worker/WebWorkerClientEndpoint.h.tmp && /usr/bin/cmake -E copy_if_different Worker/WebWorkerClientEndpoint.h.tmp Worker/WebWorkerClientEndpoint.h && /usr/bin/cmake -E remove Worker/WebWorkerClientEndpoint.h.tmp
[4/2876] Generating CSS/MediaFeatureID.h, CSS/MediaFeatureID.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/MediaFeatureID.h Lagom/Libraries/LibWeb/CSS/MediaFeatureID.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/MediaFeatureID.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/MediaFeatureID.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSMediaFeatureID -h CSS/MediaFeatureID.h.tmp -c CSS/MediaFeatureID.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/MediaFeatures.json && /usr/bin/cmake -E copy_if_different CSS/MediaFeatureID.h.tmp CSS/MediaFeatureID.h && /usr/bin/cmake -E copy_if_different CSS/MediaFeatureID.cpp.tmp CSS/MediaFeatureID.cpp && /usr/bin/cmake -E remove CSS/MediaFeatureID.h.tmp CSS/MediaFeatureID.cpp.tmp
[5/2876] Generating CSS/PropertyID.h, CSS/PropertyID.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/PropertyID.h Lagom/Libraries/LibWeb/CSS/PropertyID.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/PropertyID.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/PropertyID.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSPropertyID -h CSS/PropertyID.h.tmp -c CSS/PropertyID.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/Properties.json && /usr/bin/cmake -E copy_if_different CSS/PropertyID.h.tmp CSS/PropertyID.h && /usr/bin/cmake -E copy_if_different CSS/PropertyID.cpp.tmp CSS/PropertyID.cpp && /usr/bin/cmake -E remove CSS/PropertyID.h.tmp CSS/PropertyID.cpp.tmp
[6/2876] Generating CSS/PseudoClass.h, CSS/PseudoClass.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/PseudoClass.h Lagom/Libraries/LibWeb/CSS/PseudoClass.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/PseudoClass.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/PseudoClass.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSPseudoClass -h CSS/PseudoClass.h.tmp -c CSS/PseudoClass.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/PseudoClasses.json && /usr/bin/cmake -E copy_if_different CSS/PseudoClass.h.tmp CSS/PseudoClass.h && /usr/bin/cmake -E copy_if_different CSS/PseudoClass.cpp.tmp CSS/PseudoClass.cpp && /usr/bin/cmake -E remove CSS/PseudoClass.h.tmp CSS/PseudoClass.cpp.tmp
[7/2876] Generating CSS/TransformFunctions.h, CSS/TransformFunctions.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/TransformFunctions.h Lagom/Libraries/LibWeb/CSS/TransformFunctions.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/TransformFunctions.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/TransformFunctions.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSTransformFunctions -h CSS/TransformFunctions.h.tmp -c CSS/TransformFunctions.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/TransformFunctions.json && /usr/bin/cmake -E copy_if_different CSS/TransformFunctions.h.tmp CSS/TransformFunctions.h && /usr/bin/cmake -E copy_if_different CSS/TransformFunctions.cpp.tmp CSS/TransformFunctions.cpp && /usr/bin/cmake -E remove CSS/TransformFunctions.h.tmp CSS/TransformFunctions.cpp.tmp
[8/2876] Generating CSS/PseudoElement.h, CSS/PseudoElement.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/PseudoElement.h Lagom/Libraries/LibWeb/CSS/PseudoElement.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/PseudoElement.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/PseudoElement.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSPseudoElement -h CSS/PseudoElement.h.tmp -c CSS/PseudoElement.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/PseudoElements.json && /usr/bin/cmake -E copy_if_different CSS/PseudoElement.h.tmp CSS/PseudoElement.h && /usr/bin/cmake -E copy_if_different CSS/PseudoElement.cpp.tmp CSS/PseudoElement.cpp && /usr/bin/cmake -E remove CSS/PseudoElement.h.tmp CSS/PseudoElement.cpp.tmp
[9/2876] Generating LookupTables.h, LookupTables.cpp
FAILED: Lagom/Libraries/LibTextCodec/LookupTables.h Lagom/Libraries/LibTextCodec/LookupTables.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibTextCodec/LookupTables.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibTextCodec/LookupTables.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibTextCodec && /home/attila/projects/ladybird/Build/debug/bin/GenerateEncodingIndexes -h LookupTables.h.tmp -c LookupTables.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibTextCodec/indexes.json && /usr/bin/cmake -E copy_if_different LookupTables.h.tmp LookupTables.h && /usr/bin/cmake -E copy_if_different LookupTables.cpp.tmp LookupTables.cpp && /usr/bin/cmake -E remove LookupTables.h.tmp LookupTables.cpp.tmp
[10/2876] Generating Services/RequestServer/RequestClientEndpoint.h
FAILED: Lagom/Services/RequestServer/RequestClientEndpoint.h /home/attila/projects/ladybird/Build/debug/Lagom/Services/RequestServer/RequestClientEndpoint.h 
cd /home/attila/projects/ladybird/Build/debug/Lagom && /home/attila/projects/ladybird/Build/debug/bin/IPCCompiler /home/attila/projects/ladybird/Services/RequestServer/RequestClient.ipc -o Services/RequestServer/RequestClientEndpoint.h.tmp && /usr/bin/cmake -E copy_if_different Services/RequestServer/RequestClientEndpoint.h.tmp Services/RequestServer/RequestClientEndpoint.h && /usr/bin/cmake -E remove Services/RequestServer/RequestClientEndpoint.h.tmp
[11/2876] Generating CSS/Enums.h, CSS/Enums.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/Enums.h Lagom/Libraries/LibWeb/CSS/Enums.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/Enums.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/Enums.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSEnums -h CSS/Enums.h.tmp -c CSS/Enums.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/Enums.json && /usr/bin/cmake -E copy_if_different CSS/Enums.h.tmp CSS/Enums.h && /usr/bin/cmake -E copy_if_different CSS/Enums.cpp.tmp CSS/Enums.cpp && /usr/bin/cmake -E remove CSS/Enums.h.tmp CSS/Enums.cpp.tmp
[12/2876] Generating CSS/MathFunctions.h, CSS/MathFunctions.cpp
FAILED: Lagom/Libraries/LibWeb/CSS/MathFunctions.h Lagom/Libraries/LibWeb/CSS/MathFunctions.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/MathFunctions.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/CSS/MathFunctions.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSMathFunctions -h CSS/MathFunctions.h.tmp -c CSS/MathFunctions.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/MathFunctions.json && /usr/bin/cmake -E copy_if_different CSS/MathFunctions.h.tmp CSS/MathFunctions.h && /usr/bin/cmake -E copy_if_different CSS/MathFunctions.cpp.tmp CSS/MathFunctions.cpp && /usr/bin/cmake -E remove CSS/MathFunctions.h.tmp CSS/MathFunctions.cpp.tmp
[13/2876] Generating ARIA/AriaRoles.h, ARIA/AriaRoles.cpp
FAILED: Lagom/Libraries/LibWeb/ARIA/AriaRoles.h Lagom/Libraries/LibWeb/ARIA/AriaRoles.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/ARIA/AriaRoles.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/ARIA/AriaRoles.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/GenerateAriaRoles -h ARIA/AriaRoles.h.tmp -c ARIA/AriaRoles.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/ARIA/AriaRoles.json && /usr/bin/cmake -E copy_if_different ARIA/AriaRoles.h.tmp ARIA/AriaRoles.h && /usr/bin/cmake -E copy_if_different ARIA/AriaRoles.cpp.tmp ARIA/AriaRoles.cpp && /usr/bin/cmake -E remove ARIA/AriaRoles.h.tmp ARIA/AriaRoles.cpp.tmp
[14/2876] Generating Worker/WebWorkerServerEndpoint.h
FAILED: Lagom/Libraries/LibWeb/Worker/WebWorkerServerEndpoint.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb/Worker/WebWorkerServerEndpoint.h 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibWeb && /home/attila/projects/ladybird/Build/debug/bin/IPCCompiler /home/attila/projects/ladybird/Libraries/LibWeb/Worker/WebWorkerServer.ipc -o Worker/WebWorkerServerEndpoint.h.tmp && /usr/bin/cmake -E copy_if_different Worker/WebWorkerServerEndpoint.h.tmp Worker/WebWorkerServerEndpoint.h && /usr/bin/cmake -E remove Worker/WebWorkerServerEndpoint.h.tmp
[15/2876] Generating PublicSuffixData.h, PublicSuffixData.cpp
FAILED: Lagom/Libraries/LibURL/PublicSuffixData.h Lagom/Libraries/LibURL/PublicSuffixData.cpp /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibURL/PublicSuffixData.h /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibURL/PublicSuffixData.cpp 
cd /home/attila/projects/ladybird/Build/debug/Lagom/Libraries/LibURL && /home/attila/projects/ladybird/Build/debug/bin/GeneratePublicSuffixData -h PublicSuffixData.h.tmp -c PublicSuffixData.cpp.tmp -p /home/attila/projects/ladybird/Build/caches/PublicSuffix/public_suffix_list.dat && /usr/bin/cmake -E copy_if_different PublicSuffixData.h.tmp PublicSuffixData.h && /usr/bin/cmake -E copy_if_different PublicSuffixData.cpp.tmp PublicSuffixData.cpp && /usr/bin/cmake -E remove PublicSuffixData.h.tmp PublicSuffixData.cpp.tmp
[16/2876] Generating Services/RequestServer/RequestServerEndpoint.h
FAILED: Lagom/Services/RequestServer/RequestServerEndpoint.h /home/attila/projects/ladybird/Build/debug/Lagom/Services/RequestServer/RequestServerEndpoint.h 
cd /home/attila/projects/ladybird/Build/debug/Lagom && /home/attila/projects/ladybird/Build/debug/bin/IPCCompiler /home/attila/projects/ladybird/Services/RequestServer/RequestServer.ipc -o Services/RequestServer/RequestServerEndpoint.h.tmp && /usr/bin/cmake -E copy_if_different Services/RequestServer/RequestServerEndpoint.h.tmp Services/RequestServer/RequestServerEndpoint.h && /usr/bin/cmake -E remove Services/RequestServer/RequestServerEndpoint.h.tmp
ninja: build stopped: subcommand failed.

torokati44 avatar May 07 '25 16:05 torokati44

I don't think it's been said yet: What compiler are you all using? I'm using clang version 20.1.3. Maybe this is a GCC problem?

AtkinsSJ avatar May 07 '25 16:05 AtkinsSJ

I'm running BUILD_PRESET=Debug CC=clang CXX=clang++ ./Meta/ladybird.sh run with

$ clang --version
clang version 20.1.3 (Fedora 20.1.3-1.fc42)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/lib64/llvm20/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg

and

$ clang++ --version
clang version 20.1.3 (Fedora 20.1.3-1.fc42)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/lib64/llvm20/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang++.cfg

.

My compilers are just fine, thank you very much.

torokati44 avatar May 07 '25 16:05 torokati44

I tried to ladybird/Build/debug/Lagom/Libraries/LibWeb $ gdb --args /home/attila/projects/ladybird/Build/debug/bin/GenerateCSSDescriptors -h CSS/DescriptorID.h.tmp -c CSS/DescriptorID.cpp.tmp -j /home/attila/projects/ladybird/Libraries/LibWeb/CSS/Descriptors.json, but alas:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77b6224 in ?? ()
(gdb) bt
#0  0x00007ffff77b6224 in ?? ()
#1  0x00007ffff7fcb4f0 in call_init (l=0x7ffff7edfca0, argc=7, 
    argv=0x7fffffffd028, env=0x7fffffffd068) at dl-init.c:60
#2  call_init (l=0x7ffff7edfca0, argc=7, argv=0x7fffffffd028, env=0x7fffffffd068)
    at dl-init.c:26
#3  0x00007ffff7fcb60d in _dl_init (main_map=0x7ffff7ffe310, argc=7, 
    argv=0x7fffffffd028, env=0x7fffffffd068) at dl-init.c:121
#4  0x00007ffff7fe38e0 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#5  0x0000000000000007 in ?? ()
#6  0x00007fffffffd541 in ?? ()
#7  0x00007fffffffd587 in ?? ()
#8  0x00007fffffffd58a in ?? ()
#9  0x00007fffffffd5a1 in ?? ()
#10 0x00007fffffffd5a4 in ?? ()
#11 0x00007fffffffd5bd in ?? ()
#12 0x00007fffffffd5c0 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) 

Does setting BUILD_PRESET=Debug not affect these binaries? Why no debug symbols?

torokati44 avatar May 07 '25 16:05 torokati44

I don't think it's been said yet: What compiler are you all using? I'm using clang version 20.1.3. Maybe this is a GCC problem?

I was indeed using GCC, so it very well could be as far as I know

Does setting BUILD_PRESET=Debug not affect these binaries? Why no debug symbols?

It happened for me with both the release and debug versions with the same Seg Fault error as OP. gdb wouldn't work for me because it kept complaing about debug symbols and I didn't have time to figure it out.

billhasarrived avatar May 07 '25 16:05 billhasarrived

We're crashing in static initializers of skia?

Yikes. Since Sam isn't seeing this, I'm guessing this is something that can be fixed or avoided by having some extra package we forgot to list (?). That or Sam isn't trying a Debug preset :). The root cause is probably some mismatch between system libraries and our own libraries.

There was a thread where some Arch users found adding qt (or rather, a specific list of qt subcomponents) to vcpkg.json to build qt from source with vcpkg libraries resolved an issue they were having. I wonder if that applies here?

Looks like there is something going on with the way the Skia lib is being built

==288732== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==288732==  Bad permissions for mapped region at address 0xB1532CC
==288732==    at 0xB1532CC: ??? (in /home/christopherwarner/Code/ladybird/Build/release/vcpkg_installed/x64-linux-dynamic/lib/libskia.so)
==288732==    by 0x400460C: _dl_init (dl-init.c:121)
==288732==    by 0x401C8DF: ??? (in /usr/lib64/ld-linux-x86-64.so.2)

Digging further to validate shared libs looks like there is also an issue with libjpeg-turbo.

ldd ./Build/vcpkg/packages/skia_x64-linux-dynamic/lib/libskia.so
	linux-vdso.so.1 (0x00007ff9adda2000)
	libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007ff9ad334000)
	libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007ff9add32000)
	libexpat.so.1 => /lib64/libexpat.so.1 (0x00007ff9add09000)
	libturbojpeg.so.0 => **not found**
	libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007ff9ad292000)
	libz.so.1 => /lib64/libz.so.1 (0x00007ff9ad26f000)
	libharfbuzz-subset.so.0 => /lib64/libharfbuzz-subset.so.0 (0x00007ff9ad140000)
	libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007ff9ad016000)
	libpng16.so.16 => /lib64/libpng16.so.16 (0x00007ff9acfdb000)
	libwebpdecoder.so.3 => /lib64/libwebpdecoder.so.3 (0x00007ff9acf92000)
	libwebpdemux.so.2 => /lib64/libwebpdemux.so.2 (0x00007ff9add01000)
	libwebpmux.so.3 => /lib64/libwebpmux.so.3 (0x00007ff9adcf2000)
	libwebp.so.7 => /lib64/libwebp.so.7 (0x00007ff9acf0d000)
	libGL.so.1 => /lib64/libGL.so.1 (0x00007ff9ace99000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007ff9acc00000)
	libm.so.6 => /lib64/libm.so.6 (0x00007ff9acb12000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff9acae6000)
	libc.so.6 => /lib64/libc.so.6 (0x00007ff9ac8f4000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff9adda4000)
	libbz2.so.1 => /lib64/libbz2.so.1 (0x00007ff9ace84000)
	libbrotlidec.so.1 => /lib64/libbrotlidec.so.1 (0x00007ff9ac8e6000)
	libxml2.so.2 => /lib64/libxml2.so.2 (0x00007ff9ac78b000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007ff9ac636000)
	libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007ff9ac616000)
	libsharpyuv.so.0 => /lib64/libsharpyuv.so.0 (0x00007ff9ace7c000)
	libGLX.so.0 => /lib64/libGLX.so.0 (0x00007ff9ac5e4000)
	libX11.so.6 => /lib64/libX11.so.6 (0x00007ff9ac49e000)
	libXext.so.6 => /lib64/libXext.so.6 (0x00007ff9ac48a000)
	libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007ff9ac411000)
	libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007ff9ac3ed000)
	liblzma.so.5 => /lib64/liblzma.so.5 (0x00007ff9ac3b8000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007ff9ac30d000)
	libxcb.so.1 => /lib64/libxcb.so.1 (0x00007ff9ac2e3000)
	libXau.so.6 => /lib64/libXau.so.6 (0x00007ff9ac2dd000)

Tried copying into /lib64 and reloading but that doesn't look like the issue. Or at least not directly, just tried building the codebase for the first time on Fedora so the build system is a little hairy to traverse here without a guide but i'm not sure if it's Cmake/Bazel code that needs updating.

christophwarner avatar May 07 '25 18:05 christophwarner

This is the same patchelf problem as the older fedora issue. Patchelf is now completely busted on fedora 42, regardless of linker, compiler, or linker options.

We need to tell vcpkg to never ever use it, and then also come up with a way for vcpkg-created host tools to keep working.

Another problem with debugging this is that changing the flag vcpkg uses to determine if patchelf should be used to fix-up rpaths does not affect the cache. So the binary vcpkg cache must be manually obliterated between each run.

ADKaster avatar May 07 '25 23:05 ADKaster

Between https://github.com/microsoft/vcpkg/pull/45417 and #4642 this issue should be resolved.

The action to take for developers on Fedora 42 wanting to build ladybird is to dnf install patchelf to ensure that patchelf 0.18.0 is installed instead of the old 0.14.5 version used by vcpkg by default.

ADKaster avatar May 08 '25 01:05 ADKaster

Between microsoft/vcpkg#45417 and #4642 this issue should be resolved.

The action to take for developers on Fedora 42 wanting to build ladybird is to dnf install patchelf to ensure that patchelf 0.18.0 is installed instead of the old 0.14.5 version used by vcpkg by default.

Confirmed that this works.

yuchanns avatar May 08 '25 06:05 yuchanns

I can confirm too. No further workarounds or settings were needed for a simple ./Meta/ladybird.sh run to work on current master after installing the patchelf (0.18) system package.

torokati44 avatar May 08 '25 09:05 torokati44

I just installed patchelf on my Fedora 42 KDE and rebuilt (Meta/ladybird.sh rebuild), but the resulting binary immediately segfaults; interestingly the build completed surprizingly and unusually quickly, much quicker than the debug build I'm right now trying to do.
On my PC with Nobara (based on Fedora 42 KDE) I cannot even get it to build.

Lampe2020 avatar May 17 '25 23:05 Lampe2020