Bug 14695 - ruby 3.1.0 do_install failure
Summary: ruby 3.1.0 do_install failure
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 3.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.0 M3
Assignee: Unassigned
QA Contact:
URL:
Whiteboard: AB-INT
Depends on:
Blocks:
 
Reported: 2022-01-17 16:02 UTC by Alexandre Belloni
Modified: 2022-01-27 15:55 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Belloni 2022-01-17 16:02:24 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/2521/steps/11/logs/stdio


| linking shared-library libruby.so.3.1.0
| ./libruby.so: file not recognized: file format not recognized
| collect2: error: ld returned 1 exit status
| ../ruby-3.1.0/defs/gmake.mk:413: recipe for target 'spec/ruby/optional/capi/ext/proc_spec.so' failed
| make: *** [spec/ruby/optional/capi/ext/proc_spec.so] Error 1
| make: *** Waiting for unfinished jobs....
| linking ruby
| make[2]: Leaving directory '/home/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build'
| make[1]: Leaving directory '/home/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build'
| make[1]: Entering directory '/home/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build'
| make[1]: Nothing to be done for 'note'.
| make[1]: Leaving directory '/home/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
NOTE: recipe ruby-3.1.0-r0: task do_install: Failed
ERROR: Task (/home/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-devtools/ruby/ruby_3.1.0.bb:do_install) failed with exit code '1'


On the worker:
tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build$ file libruby.so
libruby.so: symbolic link to libruby.so.3.1.0
tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build$ file libruby.so.3.1.0
libruby.so.3.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=29104e2d28ae1d507a490e1de26440e9bb512e6e, with debug_info, not stripped
Comment 1 Alexandre Belloni 2022-01-17 16:04:25 UTC
tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build$ stat libruby.so.3.1.0
  File: libruby.so.3.1.0
  Size: 18387704  	Blocks: 35920      IO Block: 4096   regular file
Device: fd01h/64769d	Inode: 258289976   Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 6000/pokybuild)   Gid: ( 6000/pokybuild)
Access: 2022-01-17 15:56:13.920962593 +0000
Modify: 2022-01-16 04:16:14.522093947 +0000
Change: 2022-01-16 04:16:14.522093947 +0000
 Birth: -
tmp/work/core2-64-poky-linux/ruby/3.1.0-r0/build$ stat libruby.so
  File: libruby.so -> libruby.so.3.1.0
  Size: 16        	Blocks: 0          IO Block: 4096   symbolic link
Device: fd01h/64769d	Inode: 258290018   Links: 1
Access: (0777/lrwxrwxrwx)  Uid: ( 6000/pokybuild)   Gid: ( 6000/pokybuild)
Access: 2022-01-17 15:55:57.989048817 +0000
Modify: 2022-01-16 04:16:14.558093782 +0000
Change: 2022-01-16 04:16:14.558093782 +0000
 Birth: -
Comment 2 Richard Purdie 2022-01-17 16:48:14 UTC
I think these can happen when the file is being written by two writers and it sees an incomplete file, or the file is being accessed before it was completely written out. This therefore could be some kind of race in ruby's makefiles?
Comment 3 Alexandre Belloni 2022-01-17 17:06:00 UTC
The ruby workdir is saved in /srv/autobuilder/autobuilder.yocto.io/pub/failed-builds-data/bug14695

Running do_install again on the worker after renaming the build directory properly just worked.
Comment 6 Randy MacLeod 2022-01-20 15:45:35 UTC
This seems to have started after December's ruby upgrade.
Comment 7 Alexander Kanavin 2022-01-20 15:52:59 UTC
Konrad, would you be able to take a look?
Comment 8 Alexander Kanavin 2022-01-20 22:24:34 UTC
Patch proposed:
https://lists.openembedded.org/g/openembedded-core/message/160802

Note that *not* enabling libruby.so is the upstream default.
Comment 9 Alexander Kanavin 2022-01-21 13:48:08 UTC
Better patch:
https://lists.openembedded.org/g/openembedded-core/message/160829