Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706012 - =dev-java/openjdk-11.0.5_p10: No rule to make target '/var/tmp/portage/dev-java/openjdk-11.0.5_p10/work/jdk11u-jdk-11.0.5+10/build/linux-arm-normal-server-release/make-support/vardeps/make/ModuleWrapper.gmk/java.base/ORDERED_CFG_VARIANTS.vardeps'
Summary: =dev-java/openjdk-11.0.5_p10: No rule to make target '/var/tmp/portage/dev-ja...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: make-4.3
  Show dependency tree
 
Reported: 2020-01-21 16:25 UTC by matoro
Modified: 2020-08-04 21:58 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,154.30 KB, text/plain)
2020-01-21 16:25 UTC, matoro
Details
emerge --info (info.txt,5.85 KB, text/plain)
2020-01-21 16:26 UTC, matoro
Details
build.log (build.log,131.41 KB, text/plain)
2020-01-22 03:58 UTC, Luis Cáceres
Details
emerge --info =openjdk-11.0.6 (info.txt,7.38 KB, text/plain)
2020-01-22 04:02 UTC, Luis Cáceres
Details
Convinces make 4.3 to try looking for the .vardeps file again (jdk11-make-3.4.patch,595 bytes, patch)
2020-01-28 05:56 UTC, Alex Parker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description matoro 2020-01-21 16:25:33 UTC
dev-java/openjdk:11 fails to build on armv7.  Using dev-java/openjdk-bin as bootstrap.  The only modification I have made is a custom dev-java/java-config to enable python3_8.

Reproducible: Always
Comment 1 matoro 2020-01-21 16:25:55 UTC
Created attachment 603862 [details]
build.log
Comment 2 matoro 2020-01-21 16:26:14 UTC
Created attachment 603864 [details]
emerge --info
Comment 3 Georgy Yakovlev gentoo-dev 2020-01-21 21:05:22 UTC
Hit this today on ppc64, at different place on different version, I think it's some makefile race as it's kinda random, at least in my case.

will investigate a bit more, but probably you could build it with -j1 meanwhile.
Comment 4 matoro 2020-01-21 23:03:31 UTC
Just tried with -j1, no dice.  I also tried switching bootstrap jvm to dev-java/icedtea, but I don't think it's getting that far as it didn't make a difference.
Comment 5 Luis Cáceres 2020-01-22 03:57:45 UTC
I have a similar build failure on amd64. Tried building with -j1 and it didn't work either.

Using openjdk-11.0.5_p10 as bootstrap.
Comment 6 Luis Cáceres 2020-01-22 03:58:37 UTC
Created attachment 603930 [details]
build.log
Comment 7 Luis Cáceres 2020-01-22 04:02:22 UTC
Created attachment 603932 [details]
emerge --info =openjdk-11.0.6
Comment 8 Johannes Hirte 2020-01-22 08:16:16 UTC
Looks like a problem with sys-devel/make-4.3. After downgrading this to  sys-devel/make-4.2.1-r4, I was able to emerge openjdk again.
Comment 9 matoro 2020-01-22 17:02:05 UTC
(In reply to Johannes Hirte from comment #8)
> Looks like a problem with sys-devel/make-4.3. After downgrading this to 
> sys-devel/make-4.2.1-r4, I was able to emerge openjdk again.

Wow, great catch!  I never would have connected this with the make upgrade.  Should we have <sys-devel/make-4.3 added to build deps for now?  And is there a corresponding upstream bug?
Comment 10 indocomsoft 2020-01-23 10:00:02 UTC
I can confirm: after downgrading to sys-devel/make-4.2.1-r4, I am able to merge openjdk again
Comment 11 Alex Parker 2020-01-28 05:54:48 UTC
This happens because the behavior of the macro DependOnVariable, defined in make/common/MakeBase.gmk, is different in Make 4.2 vs 4.3.

The intent of the macro is to rebuild things if Make variables are changed. Since Make primarily compares file timestamps to determine what needs to be built, the macro actually writes a file with the variable contents if and only if the variable value has changed. The content of the file is a Makefile snippet, so the macro uses $(eval -include FOO.vardeps) to read in the file. The .vardeps file ends up being a prerequisite to a target akin to this:

bar.o: bar.cpp $(call DependOnVariable,FOO)

which will write FOO.vardeps and evalute to:

bar.o: bar.cpp FOO.vardeps

So, in short, the macro does this:

1. Include FOO.vardeps as a Makefile if it exists. This will define a variable FOO_old.
2. Write a new FOO.vardeps if FOO_old is not equal to FOO.
3. Return the filename FOO.vardeps for use in a prerequisites list.

In Make 4.2, this works fine. foo.vardeps will exist by the time the prerequisites for bar.o are evaluated; the macro guarantees this since it writes that file and produces the filename for the prerequisites list.

In Make 4.3, the $(eval -include FOO.vardeps) will fail just as in 4.2 since FOO.vardeps doesn't exist yet, but Make 4.3 seems to remember that "the makefile FOO.vardeps didn't exist", so when it comes time to evaluate the prerequisites of bar.o, it doesn't bother checking again. Instead, it goes looking for a recipe to make the file.

I don't know if Make is behaving correctly here; I don't know enough about when it chooses to rebuild Makefiles. I do know that the patch I'm attaching allows it to build for me with Make 4.3. All the patch does is synthesize a rule for the .vardeps file that does nothing; this seems enough to convince Make 4.3 to check the file again.
Comment 12 Alex Parker 2020-01-28 05:56:58 UTC
Created attachment 605874 [details, diff]
Convinces make 4.3 to try looking for the .vardeps file again
Comment 13 Georgy Yakovlev gentoo-dev 2020-01-28 09:20:16 UTC
thanks for such detailed explanation!

I see upstream came to similar workaround  and conclusions

https://bugs.openjdk.java.net/browse/JDK-8237879


and they suspect it's a make bug

https://savannah.gnu.org/bugs/index.php?57676
Comment 14 Larry the Git Cow gentoo-dev 2020-01-28 09:22:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1ef64c6d48de6bb0e3bd1155ace461ed17d0893

commit b1ef64c6d48de6bb0e3bd1155ace461ed17d0893
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-01-28 09:21:36 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-01-28 09:21:36 +0000

    dev-java/openjdk: add patch to fix build with make-4.3
    
    Bug: https://bugs.gentoo.org/706012
    Thanks-to: Alex Parker <alex.iris.parker@gmail.com>
    Package-Manager: Portage-2.3.86, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-java/openjdk/files/openjdk-11-make43.patch | 12 ++++++++++++
 dev-java/openjdk/openjdk-11.0.6.ebuild         |  2 ++
 2 files changed, 14 insertions(+)
Comment 15 Georgy Yakovlev gentoo-dev 2020-02-01 07:04:27 UTC
upstream've merged fix

https://hg.openjdk.java.net/jdk/jdk/rev/0743e1d49930
Comment 16 Larry the Git Cow gentoo-dev 2020-08-04 21:58:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2e262024d4c564b29a7da88732e2c422234549e

commit b2e262024d4c564b29a7da88732e2c422234549e
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-04 21:44:55 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-04 21:58:23 +0000

    dev-java/openjdk: drop old
    
    Bug: https://bugs.gentoo.org/732624
    Closes: https://bugs.gentoo.org/734320
    Closes: https://bugs.gentoo.org/706012
    Closes: https://bugs.gentoo.org/713180
    Closes: https://bugs.gentoo.org/706638
    Package-Manager: Portage-3.0.1, Repoman-2.3.23
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-java/openjdk/Manifest                          |  17 --
 .../openjdk/files/openjdk-11.0.7_p10-sigsegv.patch |  55 ----
 .../openjdk/files/openjdk-8-detect-gcc10.patch     |  49 ----
 dev-java/openjdk/openjdk-11.0.7_p10.ebuild         | 280 ---------------------
 dev-java/openjdk/openjdk-8.252_p09.ebuild          | 231 -----------------
 dev-java/openjdk/openjdk-8.262_p10.ebuild          | 226 -----------------
 6 files changed, 858 deletions(-)