Project

General

Profile

Actions

Bug #18666

open

No rule to make target 'yaml/yaml.h', needed by 'api.o'

Added by duerst (Martin Dürst) about 2 months ago. Updated about 2 months ago.

Status:
Open
Priority:
Normal
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-06-03T06:59:33Z master 7e14762159) [x86_64-linux]
[ruby-core:108090]

Description

When updating my Ruby compilation with make up; make, I hit the following error:

make[2]: Entering directory '/home/duerst/14ruby/ext/psych'
make[2]: *** No rule to make target 'yaml/yaml.h', needed by 'api.o'.  Stop.
make[2]: Leaving directory '/home/duerst/14ruby/ext/psych'
make[1]: *** [exts.mk:262: ext/psych/all] Error 2
make[1]: Leaving directory '/home/duerst/14ruby'
make: *** [uncommon.mk:307: build-ext] Error 2

./ruby -v is ruby 3.2.0dev (2022-03-22T19:51:05Z master 0140e6c41e) [x86_64-linux]

All of this is on Ubuntu 20.04 on WSL2 on Windows 10.

My guess is that this bug is related to recent changes in psych/yaml/...


Files

mkmf.log (14.8 KB) mkmf.log duerst (Martin Dürst), 03/28/2022 05:27 AM
mkmf.log (2.57 KB) mkmf.log duerst (Martin Dürst), 03/29/2022 01:15 AM

Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #18571: Removed the bundled sources from release package after Ruby 3.2Assignedhsbt (Hiroshi SHIBATA)Actions

Updated by hsbt (Hiroshi SHIBATA) about 2 months ago

Can you install libyaml-dev package via apt?

Actions #2

Updated by hsbt (Hiroshi SHIBATA) about 2 months ago

  • Related to Feature #18571: Removed the bundled sources from release package after Ruby 3.2 added

Updated by duerst (Martin Dürst) about 2 months ago

hsbt (Hiroshi SHIBATA) wrote in #note-1:

Can you install libyaml-dev package via apt?

Many thanks for your advice!

I did this. Unfortunately, it didn't help, the error is still the same.

I also tried ./configure --enable-load-relative --disable-install-doc, but even this didn't help. The output does not include the word yaml anywhere. Maybe some additional configuration is necessary?

I found a file at /usr/include/yaml.h. I'm not sure this is the right one. But it definitely cannot be found by yaml/yaml.h.

I have attached the file mkmf.log from ext/psych, maybe this helps.

Updated by duerst (Martin Dürst) about 2 months ago

I created and successfully compiled a completely new clone of Ruby. That had no problem finding the yaml.h file. The corresponding mkmf.log file from ext/psych is attached.

The conclusion seems to be that when bundled sources were removed, there was no mechanism to trigger the right steps to fix whatever needed to be fixing in the Makefile or thereabouts.

I hope this can be fixed in future cases where bundled sources are removed.

Updated by duerst (Martin Dürst) about 2 months ago

I hoped https://github.com/ruby/ruby/commit/8e2a2ba0f9 (Merge psych master; Added files: ext/psych/extlibs; Modified files: ext/psych/extconf.rb; by @hsbt (Hiroshi SHIBATA)) might help with this. It didn't. But after I tried ./configure --enable-load-relative --disable-install-doc, I got the following in the output:

duerst@Kloentalersee:~/14ruby$ make up; make
Already up to date.
Current branch master is up to date.
Latest commit hash = 8e2a2ba0f9
tool/config.guess already exists
tool/config.sub already exists
downloading for ext/fiddle/extlibs
.downloaded-cache/libffi-3.2.1.tar.gz already exists
checking md5 of .downloaded-cache/libffi-3.2.1.tar.gz ... OK
checking sha512 of .downloaded-cache/libffi-3.2.1.tar.gz ... OK
downloading for ext/psych/extlibs
.downloaded-cache/yaml-0.2.5.tar.gz already exists
checking rmd160 of .downloaded-cache/yaml-0.2.5.tar.gz ... OK
checking sha256 of .downloaded-cache/yaml-0.2.5.tar.gz ... OK
checking sha512 of .downloaded-cache/yaml-0.2.5.tar.gz ... OK
make[1]: Entering directory '/home/duerst/14ruby'

I haven't seen this before (but it could be easy to miss, because the output passes by very quickly). I'm just pasting it here because it could help diagnose this bug.

Actions

Also available in: Atom PDF