Bug 15979 - wpewebkit build failing (for ARM A15/NEON)
Summary: wpewebkit build failing (for ARM A15/NEON)
Status: RESOLVED MOVED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2024.02
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-11 08:16 UTC by Michael Nosthoff
Modified: 2024-06-15 15:23 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nosthoff 2024-03-11 08:16:11 UTC
Since bumping to 2024.02 the build for wpewebkit is failing. Last BR version I worked with was 2023.08.3 (where it worked) so I can't tell about the ones in between.


[4/5994] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/FastMalloc.cpp.o
/home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WTF/wtf/FastMalloc.cpp: In function ‘void* WTF::fastAlignedMalloc(size_t, size_t)’:
/home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WTF/wtf/FastMalloc.cpp:192:19: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  192 |     posix_memalign(&p, alignment, size);
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WTF/wtf/FastMalloc.cpp: In function ‘void* WTF::tryFastAlignedMalloc(size_t, size_t)’:
/home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WTF/wtf/FastMalloc.cpp:202:19: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  202 |     posix_memalign(&p, alignment, size);
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
[963/5994] Generating ../../WebCore/DerivedSources/Settings.h, ../../WebCore/DerivedSources/Settings.cpp, ../../WebCore/DerivedSource...gsGenerated.h, ../../WebCore/DerivedSources/InternalSettingsGenerated.cpp, ../../WebCore/DerivedSources/InternalSettingsGenerated.idl
FAILED: WebCore/DerivedSources/Settings.h WebCore/DerivedSources/Settings.cpp WebCore/DerivedSources/InternalSettingsGenerated.h WebCore/DerivedSources/InternalSettingsGenerated.cpp WebCore/DerivedSources/InternalSettingsGenerated.idl /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WebCore/DerivedSources/Settings.h /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WebCore/DerivedSources/Settings.cpp /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WebCore/DerivedSources/InternalSettingsGenerated.h /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WebCore/DerivedSources/InternalSettingsGenerated.cpp /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WebCore/DerivedSources/InternalSettingsGenerated.idl
cd /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore && /home/build/buildroot-upstream/output/host/bin/ruby /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/GenerateSettings.rb --outputDir /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WebCore/DerivedSources --template /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb --template /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb --template /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb --template /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb --template /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/SettingsTemplates/Settings.h.erb /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/page/Settings.yaml
/home/build/buildroot-upstream/output/host/lib/ruby/3.3.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
<internal:/home/build/buildroot-upstream/output/host/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require': cannot load such file -- psych (LoadError)
        from <internal:/home/build/buildroot-upstream/output/host/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        from /home/build/buildroot-upstream/output/host/lib/ruby/3.3.0/yaml.rb:4:in `<top (required)>'
        from <internal:/home/build/buildroot-upstream/output/host/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        from <internal:/home/build/buildroot-upstream/output/host/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
        from /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/Source/WebCore/Scripts/GenerateSettings.rb:29:in `<main>'
[987/5994] Generating ../../JavaScriptCore/DerivedSources/LLIntDesiredOffsets.h
ninja: build stopped: subcommand failed.
make: *** [package/pkg-generic.mk:283: /home/build/buildroot-upstream/output/build/wpewebkit-2.42.5/.stamp_built] Error 1

To me this looks like a missing dependency. I tried adding a dependency on host-libyaml for wpewebkit but it didn't help. Any Ideas?

Defconfig to reproduce:

BR2_arm=y
BR2_cortex_a15_a7=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_DEFCONFIG="multi_v7_defconfig"
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_WPEWEBKIT=y
Comment 1 Peter Seiderer 2024-03-11 10:59:17 UTC
You need to add the host-libyaml dependency to host-ruby (instead of wpewebkit) and re-build host-ruby:

--- a/package/ruby/ruby.mk
+++ b/package/ruby/ruby.mk
@@ -20,7 +20,7 @@ RUBY_LICENSE_FILES = LEGAL COPYING BSDL
 RUBY_CPE_ID_VENDOR = ruby-lang
 
 RUBY_DEPENDENCIES = host-pkgconf host-ruby
-HOST_RUBY_DEPENDENCIES = host-pkgconf host-openssl
+HOST_RUBY_DEPENDENCIES = host-pkgconf host-openssl host-libyaml
 RUBY_MAKE_ENV = $(TARGET_MAKE_ENV)
 RUBY_CONF_OPTS = \
        --disable-install-doc \
Comment 2 Michael Nosthoff 2024-03-12 08:55:18 UTC
Thanks Peter! That fixes the build for me.

But would this approach be feasible to fix this? Or should we do something like 

ifeq ($(BR2_PACKAGE_HOST_LIBYAML),y)
HOST_RUBY_DEPENDENCIES += host-libyaml
endif

in the ruby.mk and then depend on host-libyaml in the wpewebkit.mk?
Comment 3 Peter Seiderer 2024-03-14 13:52:16 UTC
There is no BR2_PACKAGE_HOST_LIBYAML option (yet) in buildroot (not all host enabled packages have a proper configure setup, most/many are simply enabled by a direct dependency statement and host-libyaml and host-ruby are among of them), either the above patch/hack is acceptable (despite the additional host-libyaml dependency for all other host-ruby users qt5webkit, webkitgtk, ruby) or host-ruby is extended to an real host package (Config.in.host, BR2_PACKAGE_HOST_RUBY and BR2_PACKAGE_HOST_RUBY_YAML_SUPPORT)...
Comment 4 Thomas Devoogdt 2024-04-05 09:50:42 UTC
I came across the same problem while preparing the bump to webkitgtk-2.44.0:

https://patchwork.ozlabs.org/project/buildroot/list/?series=401571

See patch about ruby:

https://patchwork.ozlabs.org/project/buildroot/patch/20240403171424.44580-1-thomas@devoogdt.com/

I independently had the same comment about how to add it properly.
Anyway, webkitgtk is a quite big fish to compile, so the additional few
seconds to get host-libyaml is perhaps not worth the additional trouble.
Comment 5 Yann E. MORIN 2024-06-15 15:23:43 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!