This happens when the locale is set to some non UTF8 locale like en_US or en_US.iso88591 It doesn't happen with locale set to C.utf8 or it_IT.UTF8 # ACCEPT_LICENSE="tau OSGi-Specification-2.0" USE="threads X dot -python_single_target_pypy3 python_single_target_python3_8 -python_single_target_python3_9 -python_single_target_python3_10 python unsupported cups" emerge -1v --jobs cpptasks These are the packages that would be merged, in order: Calculating dependencies * IMPORTANT: 1 news items need reading for repository 'science'. * IMPORTANT: 1 news items need reading for repository 'sage-on-gentoo'. * Use eselect news read to view new items. ... done! [ebuild N ] dev-java/cpptasks-1.0_beta5-r1::gentoo USE="-doc -examples -source -test" 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB >>> Verifying ebuild manifests >>> Jobs: 0 of 1 complete, 1 running Load avg: 4.75, 3.20, 2.88 >>> Emerging (1 of 1) dev-java/cpptasks-1.0_beta5-r1::gentoo >>> Jobs: 0 of 1 complete, 1 running Load avg: 4.75, 3.20, 2.88 >>> Failed to emerge dev-java/cpptasks-1.0_beta5-r1, Log file: >>> Jobs: 0 of 1 complete, 1 running Load avg: 4.61, 3.20, 2.88 >>> '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/temp/build.log' >>> Jobs: 0 of 1 complete, 1 running Load avg: 4.61, 3.20, 2.88 >>> Jobs: 0 of 1 complete, 1 running, 1 failed Load avg: 4.61, 3.20, 2.88 >>> Jobs: 0 of 1 complete, 1 failed Load avg: 4.61, 3.20, 2.88 * Package: dev-java/cpptasks-1.0_beta5-r1 * Repository: gentoo * Maintainer: java@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU * FEATURES: fakeroot network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox * Using: openjdk-8 >>> Unpacking source... >>> Unpacking cpptasks-1.0b5.tar.gz to /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work tar: A lone zero block at 25805 >>> Source unpacked in /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work >>> Preparing source in /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5 ... Rewriting attributes Rewriting ./src/samples/hello/build.xml Rewriting ./build.xml >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5 ... * Disabling all optional ANT_TASKS Buildfile: /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5/build.xml BUILD FAILED Error reading project file /var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5/build.xml: Invalid byte 1 of 1-byte UTF-8 sequence. Total time: 0 seconds * ERROR: dev-java/cpptasks-1.0_beta5-r1::gentoo failed (compile phase): * eant failed * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 3035: Called java-pkg-2_src_compile * environment, line 1384: Called eant 'jars' '-f' 'build.xml' * environment, line 552: Called die * The specific snippet of code: * ant ${antflags} "${@}" || die "eant failed" * * If you need support, post the output of `emerge --info '=dev-java/cpptasks-1.0_beta5-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-java/cpptasks-1.0_beta5-r1::gentoo'`. !!! When you file a bug report, please include the following information: GENTOO_VM=openjdk-8 CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8" JAVACFLAGS="-source 1.8 -target 1.8" COMPILER="javac" and of course, the output of emerge --info =cpptasks-1.0_beta5 * The complete build log is located at '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5' * S: '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5' * Messages for package dev-java/cpptasks-1.0_beta5-r1: * ERROR: dev-java/cpptasks-1.0_beta5-r1::gentoo failed (compile phase): * eant failed * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 3035: Called java-pkg-2_src_compile * environment, line 1384: Called eant 'jars' '-f' 'build.xml' * environment, line 552: Called die * The specific snippet of code: * ant ${antflags} "${@}" || die "eant failed" * * If you need support, post the output of `emerge --info '=dev-java/cpptasks-1.0_beta5-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-java/cpptasks-1.0_beta5-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5' * S: '/var/tmp/portage/dev-java/cpptasks-1.0_beta5-r1/work/cpptasks-1.0b5'
The build.xml xml header is saying that the file encoding is utf8 but 'file' say that the encoding is actually iso 88591