Source: openjdk-13 Version: 13.0.1+9-2 Tags: patch User: [email protected] Usertags: ftcbfs
openjdk-13 fails to cross build from source. The package looks well prepared for cross building, but it seems to have two bugs. The immediate failure is a linker error failing to find -lz from the native linker. When cross building, openjdk has a native pass and that one also needs zlib1g-dev, so it should depend on zlib1g-dev:native. The next failure comes after the build, when debian/rules invokes the build architecture objcopy and strip. These tools should be prefixed with the host architecture triplet. And that's all to make it cross build. Good work. Please consider applying the attached patch. Helmut
diff --minimal -Nru openjdk-13-13.0.1+9/debian/changelog openjdk-13-13.0.1+9/debian/changelog --- openjdk-13-13.0.1+9/debian/changelog 2019-10-19 19:32:03.000000000 +0200 +++ openjdk-13-13.0.1+9/debian/changelog 2019-11-06 23:45:11.000000000 +0100 @@ -1,3 +1,12 @@ +openjdk-13 (13.0.1+9-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Missing Build-Depends: zlib1g-dev:native. + + Use triplet-prefixed objcopy and strip. + + -- Helmut Grohne <[email protected]> Wed, 06 Nov 2019 23:45:11 +0100 + openjdk-13 (13.0.1+9-2) unstable; urgency=medium * Fix the jtreg consistency check when building without jtreg. diff --minimal -Nru openjdk-13-13.0.1+9/debian/control openjdk-13-13.0.1+9/debian/control --- openjdk-13-13.0.1+9/debian/control 2019-10-18 14:45:39.000000000 +0200 +++ openjdk-13-13.0.1+9/debian/control 2019-11-06 23:43:17.000000000 +0100 @@ -12,7 +12,7 @@ openjdk-13-jdk-headless:native | openjdk-12-jdk-headless:native, libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libxinerama-dev, libkrb5-dev, xsltproc, libpcsclite-dev, libxrandr-dev, libelf-dev, libfontconfig1-dev, libgtk2.0-0 | libgtk-3-0, libffi-dev, - zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, + zlib1g-dev, zlib1g-dev:native, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, libnss3-dev (>= 2:3.17.1), openjdk-13-jdk-headless <cross>, Build-Depends-Indep: graphviz, pandoc, diff --minimal -Nru openjdk-13-13.0.1+9/debian/rules openjdk-13-13.0.1+9/debian/rules --- openjdk-13-13.0.1+9/debian/rules 2019-10-18 14:45:36.000000000 +0200 +++ openjdk-13-13.0.1+9/debian/rules 2019-11-06 23:45:10.000000000 +0100 @@ -607,7 +607,7 @@ else bd_gcc = g++-9 <!cross>, endif -bd_syslibs = zlib1g-dev, libattr1-dev, +bd_syslibs = zlib1g-dev, zlib1g-dev:native, libattr1-dev, ifneq (,$(filter $(distrel),squeeze lucid)) bd_syslibs += libpng12-dev, libjpeg62-dev, else ifneq (,$(filter $(distrel),wheezy precise quantal raring saucy)) @@ -1774,18 +1774,18 @@ id=$$(echo $$i | sed -r 's,debian/[^/]+,$(d_dbg)/usr/lib/debug,'); \ echo strip $$i; \ mkdir -p $$(dirname $$id); \ - objcopy --only-keep-debug $$i $$id; \ + $(DEB_HOST_GNU_TYPE)-objcopy --only-keep-debug $$i $$id; \ chmod 644 $$id; \ - strip --remove-section=.comment --remove-section=.note \ + $(DEB_HOST_GNU_TYPE)-strip --remove-section=.comment --remove-section=.note \ --strip-debug $$i; \ - objcopy --add-gnu-debuglink $$id $$i; \ + $(DEB_HOST_GNU_TYPE)-objcopy --add-gnu-debuglink $$id $$i; \ else \ d=usr/lib/debug/.build-id/$${b_id:0:2}; \ f=$${b_id:2}.debug; \ mkdir -p $(d_dbg)/$$d; \ - objcopy --only-keep-debug --compress-debug-sections $$i $(d_dbg)/$$d/$$f; \ + $(DEB_HOST_GNU_TYPE)-objcopy --only-keep-debug --compress-debug-sections $$i $(d_dbg)/$$d/$$f; \ chmod 644 $(d_dbg)/$$d/$$f; \ - strip --remove-section=.comment --remove-section=.note $$i; \ + $(DEB_HOST_GNU_TYPE)-strip --remove-section=.comment --remove-section=.note $$i; \ fi; \ done endif
_______________________________________________ Mailing list: https://launchpad.net/~openjdk Post to : [email protected] Unsubscribe : https://launchpad.net/~openjdk More help : https://help.launchpad.net/ListHelp

