Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2022 12:54:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 267690] java/openjdk*: build fails silently (and hard in poudriere) due to bad usage of printf in bash
Message-ID:  <bug-267690-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267690

            Bug ID: 267690
           Summary: java/openjdk*: build fails silently (and hard in
                    poudriere) due to bad usage of printf in bash
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: java@FreeBSD.org
          Reporter: michael.osipov@siemens.com
          Assignee: java@FreeBSD.org
             Flags: maintainer-feedback?(java@FreeBSD.org)

This was found during: https://github.com/freebsd/poudriere/issues/883

When trying to build java/openjdk8 with poudriere-devel I get the following
failure:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
A new configuration has been successfully created in
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1/build/bsd-x86_64=
-normal-server-release
using configure arguments '--with-boot-jdk=3D/usr/local/bootstrap-openjdk8
--with-build-number=3Db07 --with-update-version=3D342 --with-vendor-name=3D=
'OpenJDK
BSD Porting Team' --with-vendor-url=3Dhttps://github.com/battleblow/jdk8u/
--with-vendor-bug-url=3Dmumu --with-vendor-vm-bug-url=3Dmumu
--disable-freetype-bundling --disable-zip-debug-info
--with-cacerts-file=3D/usr/ports/java/openjdk8/files/cacerts
--with-cups=3D/usr/local --with-debug-level=3Drelease --with-freetype=3D/us=
r/local
--with-freetype-include=3D/usr/local/include/freetype2 --with-jobs=3D20
--with-jvm-variants=3Dserver --with-milestone=3Dfcs --with-package-path=3D/=
usr/local
--with-zlib=3Dsystem --enable-unlimited-crypto --disable-debug-symbols
--with-giflib=3Dsystem --x-includes=3D/usr/local/include
--x-libraries=3D/usr/local/lib --x-libraries=3D/usr/local/lib
--x-includes=3D/usr/local/include --prefix=3D/usr/local --localstatedir=3D/=
var
--mandir=3D/usr/local/man --infodir=3D/usr/local/share/info/
--build=3Damd64-portbld-freebsd12.3'.

Configuration summary:
* Debug level:    release
* JDK variant:    normal
* JVM variants:   server
* OpenJDK target: OS: bsd, CPU architecture: x86, address length: 64

Tools summary:
* Boot JDK:       openjdk version "1.8.0_144" OpenJDK Runtime Environment
(build 1.8.0_144-b01) OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mod=
e)=20
(at /usr/local/bootstrap-openjdk8)
* Toolchain:      clang (clang/LLVM)
* C Compiler:     Version 10.0.1 (at /usr/bin/cc)
* C++ Compiler:   Version 10.0.1 (at /usr/bin/c++)

Build performance summary:
* Cores to use:   20
* Memory limit:   32601 MB

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<phase=
: build          >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D env: NO_DEPENDS=3Dyes USER=3Dnobody UID=3D65534 GID=3D65534
=3D=3D=3D>  Building for openjdk8-8.342.07.1_1
gmake[1]: Entering directory
'/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1'
(cd /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1/make &&
/usr/local/bin/gmake 3 VERBOSE=3D"3" LOG_LEVEL=3D"warn" -R -I
/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1/make/common
"SPEC=3D/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1/build/bs=
d-x86_64-normal-server-release/spec.gmk"
-j20 -f SourceRevision.gmk create-source-revision-tracker)
gmake[2]: Entering directory
'/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1/make'
gmake[2]: *** No rule to make target '3'.  Stop.
gmake[2]: Leaving directory
'/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1/make'
gmake[1]: ***
[/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1//make/Main.gmk:=
207:
create-source-revision-tracker] Error 2
gmake[1]: Leaving directory
'/wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u342-b07.1'
=3D=3D=3D> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the failure =
to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/java/openjdk8
=3D>> Cleaning up wrkdir
=3D=3D=3D>  Cleaning for openjdk8-8.342.07.1_1
build of java/openjdk8 | openjdk8-8.342.07.1_1 ended at Wed Nov  9 23:47:04=
 CET
2022
build time: 00:00:38
!!! build failure encountered !!!
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

This failure cannot be reproduced when you are INSIDE of the poudriere jail=
 or
running on any other host. This silently fails for 8, 11, 17, 18:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
A new configuration has been successfully created in
/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.16-8-1/build/bsd-x86_64-norm=
al-server-release
using configure arguments '--with-boot-jdk=3D/usr/local/bootstrap-openjdk11
--disable-ccache --disable-javac-server --disable-hotspot-gtest
--with-jvm-features=3Dshenandoahgc --with-alsa=3D/usr/local --with-cups=3D/=
usr/local
--with-fontconfig=3D/usr/local --with-freetype=3Dsystem
--with-freetype-include=3D/usr/local/include/freetype2
--with-freetype-lib=3D/usr/local/lib --with-libjpeg=3Dsystem --with-giflib=
=3Dsystem
--with-giflib-include=3D/usr/local/include --with-giflib-lib=3D/usr/local/l=
ib
--with-libpng=3Dsystem --with-zlib=3Dsystem --with-lcms=3Dsystem
--x-includes=3D/usr/local/include --x-libraries=3D/usr/local/lib
--with-cacerts-file=3D/usr/ports/java/openjdk11/files/cacerts
--with-version-string=3D11.0.16+8-1 --with-native-debug-symbols=3Dnone
--with-debug-level=3Drelease --with-vendor-name=3D'OpenJDK BSD Porting Team'
--with-vendor-url=3Dhttps://github.com/battleblow/jdk11u/
--with-vendor-bug-url=3D'https://bugs.freebsd.org/bugzilla/enter_bug.cgi?pr=
oduct=3DPorts/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.16-8-1/build/.c=
onfigure-support/generated-configure.sh:
line 73037: printf: `%': invalid format character
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
A new configuration has been successfully created in
/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.4-8-1/build/bsd-x86_64-serve=
r-release
using configure arguments '--with-boot-jdk=3D/usr/local/bootstrap-openjdk17
--disable-ccache --disable-javac-server --disable-hotspot-gtest
--with-alsa=3D/usr/local --with-cups=3D/usr/local --with-fontconfig=3D/usr/=
local
--with-freetype=3Dsystem --with-freetype-include=3D/usr/local/include/freet=
ype2
--with-freetype-lib=3D/usr/local/lib --with-libjpeg=3Dsystem --with-giflib=
=3Dsystem
--with-giflib-include=3D/usr/local/include --with-giflib-lib=3D/usr/local/l=
ib
--with-harfbuzz=3Dsystem --with-libpng=3Dsystem --with-zlib=3Dsystem
--with-lcms=3Dsystem --x-includes=3D/usr/local/include --x-libraries=3D/usr=
/local/lib
--with-cacerts-file=3D/usr/ports/java/openjdk17/files/cacerts
--with-version-string=3D17.0.4+8-1 --with-native-debug-symbols=3Dnone
--with-debug-level=3Drelease --with-vendor-name=3D'OpenJDK BSD Porting Team'
--with-vendor-url=3Dhttps://github.com/battleblow/jdk17u/
--with-vendor-bug-url=3D'https://bugs.freebsd.org/bugzilla/enter_bug.cgi?pr=
oduct=3DPorts/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.4-8-1/build/.co=
nfigure-support/generated-configure.sh:
line 140713: printf: `%': invalid format character
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
but build continues

Failure is:
> /build/.configure-support/generated-configure.sh: line 140713: printf: `%=
': invalid format character

These failures are caused by incorrect usage of printf. Instead of doing
'printf "%s\n" "$URL"' they do 'printf "$URL\n"'.

Affected files:
8:
common/autoconf/generated-configure.sh
common/autoconf/help.m4
11,17:
./make/autoconf/help.m4
./build/.configure-support/generated-configure.sh

Attached are two patches made with "make makepatch" for OpenJDK 8.

Build then works on host, in jail and with poudriere bulk/testport. Then ra=
n a
simple program in the poudiere jail and all system properties are fine.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267690-7788>