Bug 271562 - www/qt5-webkit: Port fails to build with Ruby 3.2.x
Summary: www/qt5-webkit: Port fails to build with Ruby 3.2.x
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 12:29 UTC by jimp
Modified: 2024-05-02 02:59 UTC (History)
4 users (show)

See Also:
jhale: maintainer-feedback+


Attachments
Patch to fix qt5-webkit build with Ruby 3.x (1.07 KB, patch)
2023-05-22 12:29 UTC, jimp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jimp 2023-05-22 12:29:08 UTC
Created attachment 242325 [details]
Patch to fix qt5-webkit build with Ruby 3.x

www/qt5-webkit fails to build with Ruby 3.2.2 for me (and almost certainly others), since one of its files uses deprecated Ruby syntax.

Searching on the error led me to https://www.linuxquestions.org/questions/slackware-14/regression-on-current-with-qt5-webkit-4175720296/ and applying that patch locally fixes the build.

Here is the build error:

FAILED: DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h /usr/ports/www/qt5-webkit/work/.build/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h 
cd /usr/ports/www/qt5-webkit/work/.build/Source/JavaScriptCore && /usr/local/bin/ruby /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb -I/usr/ports/www/qt5-webkit/work/.build/DerivedSources/JavaScriptCore/ /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/llint/LowLevelInterpreter.asm /usr/ports/www/qt5-webkit/work/.build/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h
/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:587:in `block in parseSequence': undefined method `=~' for #<Annotation:0x0000000806bf2468 @codeOrigin=#<CodeOrigin:0x0000000806bf2530 @sourceFile=#<SourceFile:0x0000000806c1fb70 @name=#<Pathname:/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm>, @fileNumber=3>, @lineNumber=511>, @type=:local, @string="Check if there are some unaligned slots we can use"> (NoMethodError)
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:654:in `block in parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:814:in `parseData'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:818:in `parse'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:780:in `block in parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:625:in `block in parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:814:in `parseData'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:818:in `parse'
        from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb:68:in `<main>'

Using the attached patch as www/qt5-webkit/files/patch-Source_JavaScriptCore_offlineasm_parser.rb allows the port to build successfully
Comment 1 Chad Jacob Milios 2023-09-13 22:34:22 UTC
Worked for me. Thank you!

Question: will unconditionally applying this patch break the build for the current default case of Ruby 3.1?
Comment 2 Adriaan de Groot freebsd_committer freebsd_triage 2023-09-19 14:04:58 UTC
qt5-webkit is going away (as it is unmaintained) at the end of the calendar year; I'd prefer not to land changes in it with potential impact in languages I don't speak, just ahead of getting rid of it entirely. Any consumers of qt5-webkit should be looking at porting to something else, rather than worrying about Ruby 3.2 compatibility of a deprecated web browser.
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2023-09-19 18:53:16 UTC
Moin moin 

I think rather than patching support in for a modern ruby version, the port should just use an older ruby :) -- it is a build-only dependency after all.

That way the port can be built even on systems with a more current DEFAULT_VERSION of ruby.


Please give the attached patch a go.
https://people.freebsd.org/~tcberner/patches/0001-www-qt5-webkit-force-ruby-3.1.patch

mfg Tobias
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2024-05-02 02:58:48 UTC
Closing this as www/qt5-webengine has been since removed from the ports tree. [1]

[1] https://cgit.freebsd.org/ports/commit/?id=cb3615b528c288d90aff6aa0e7a9778f80c9e85d
Comment 5 Jason E. Hale freebsd_committer freebsd_triage 2024-05-02 02:59:58 UTC
I meant www/qt5-webkit has been removed, not webengine.