Summary: | dev-libs/icu-64.1 fails to build on big-endian architectures: make[1]: *** No rule to make target 'out', needed by 'out/icudt64b.dat'. Stop. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeroen Roovers (RETIRED) <jer> |
Component: | Current packages | Assignee: | Gentoo Office Team <office> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://unicode-org.atlassian.net/browse/ICU-20533 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=682444 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 685288 | ||
Attachments: |
dev-libs:icu-64.1:20190331-170013.log
icu-64.1-data_archive_generation.patch |
Description
Jeroen Roovers (RETIRED)
2019-03-31 20:18:03 UTC
> make[1]: *** No rule to make target 'out', needed by 'out/icudt64b.dat'. Stop.
'out' is value of $(OUTDIR) set in source/data/Makefile.in:
OUTDIR=./out
icudt${version}b.dat is used on big-endian architectures.
icudt${version}l.dat is used on little-endian architectures.
In both ICU 63.1 and 64.1, pre-generated .dat file is provided only for little-endian architectures:
ICU 63.1 tarball contains source/data/in/icudt63l.dat
ICU 64.1 tarball contains source/data/in/icudt64l.dat
source/data/Makefile.in later contains:
[[[
# Find out if we have a source archive.
# If we have that, then use that instead of building everything from scratch.
ICUDATA_SOURCE_ARCHIVE = $(wildcard $(srcdir)/in/$(ICUDATA_PLATFORM_NAME).dat)
ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION)*.dat))
# We don't have the data in the current endianess or charset.
# See if we can find data of any archive type,
# and convert it to the current type.
ifneq ($(ICUDATA_ARCHIVE),)
ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat
$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR)
$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE)
endif
else
...
endif
]]]
So on big-endian architectures, icupkg tool is used to create icudt64b.dat ($(ICUDATA_SOURCE_ARCHIVE)) from icudt64l.dat ($(ICUDATA_ARCHIVE)).
The same behavior is in ICU 63.1.
In both ICU 63.1 and 64.1, source/data/Makefile.in contains this line:
$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR)
^^^^^^^^^
The problem probably started to occur due to this change between ICU 63.1 and 64.1:
[[[
-BUILD_DIRS=$(OUTDIR) $(MAINBUILDDIR) $(BUILDDIR) $(CURRBLDDIR) $(LANGBLDDIR) $(REGIONBLDDIR) $(ZONEBLDDIR) $(UNITBLDDIR) $(BRKBLDDIR) $(COLBLDDIR) $(RBNFBLDDIR) $(TRANSLITBLDDIR) $(OUTTMPDIR) $(OUTTMPDIR_390STUB) $(OUTTMPDIR)/$(CURR_TREE) $(OUTTMPDIR)/$(LANG_TREE) $(OUTTMPDIR)/$(REGION_TREE) $(OUTTMPDIR)/$(ZONE_TREE) $(OUTTMPDIR)/$(UNIT_TREE) $(OUTTMPDIR)/$(COLLATION_TREE) $(OUTTMPDIR)/$(RBNF_TREE) $(OUTTMPDIR)/$(TRANSLIT_TREE) $(OUTTMPDIR)/$(BREAK_TREE)
...
-$(BUILD_DIRS): build-dir
-
-build-dir:
- @-$(RMV) $@
- echo timestamp > $@.tmp
- @list='$(BUILD_DIRS)'; \
- for dir in $$list; do \
- if ! test -d $$dir; then \
- echo $(MKINSTALLDIRS) $(BUILD_DIRS); \
- $(MKINSTALLDIRS) $(BUILD_DIRS); \
- fi; \
- done
- mv $@.tmp $@
]]]
Directory $(OUTDIR) gets created for me on little-endian architecture, but by a target run later.
There seem to be 2 alternative fixes:
1. Defining target $(OUTDIR) somewhere:
+$(OUTDIR):
+ @$(MKINSTALLDIRS) $(OUTDIR)
2. Dropping dependency on target $(OUTDIR) and creating directory $(OUTDIR) directly:
ifneq ($(ICUDATA_ARCHIVE),)
ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat
-$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR)
+$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE)
+ $(MKINSTALLDIRS) $(OUTDIR)
$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE)
endif
There are no other dependencies on target $(OUTDIR), so the second fix might be preferred.
($(MKINSTALLDIRS) refers to script source/mkinstalldirs which already checks for existence of directory before creating it and has parallel-safe behavior.)
Created attachment 571552 [details, diff]
icu-64.1-data_archive_generation.patch
Please test this patch. If it works, I will send it to upstream.
It works. icu-64.1-data_archive_generation.patch added in commit 69ff75e390a563e731c8e124d557d1513fba31d1: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69ff75e390a563e731c8e124d557d1513fba31d1 commit 69ff75e390a563e731c8e124d557d1513fba31d1 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-04-21 11:32:00 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-04-21 11:35:18 +0000 dev-libs/icu: Bump to version 64.2 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> |