Build failure with coreutils 8.12

Bug #876997 reported by Bernhard Rosenkraenzer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Fix Released
Medium
Bernhard Rosenkraenzer

Bug Description

On a box with coreutils 8.12 installed, Linaro Android fails to build:

javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999 -encoding ascii -bootclasspath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar -
encoding UTF-8 -g -extdirs "" -d out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes \@out/target/common/obj/JAVA_LIBRARIES/core_interm
ediates//java-source-list-uniq || ( rm -rf out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes ; exit 41 )
libcore/luni/src/main/java/java/security/CodeSource.java:33: cannot find symbol
symbol : class X509Certificate
location: package java.security.cert
import java.security.cert.X509Certificate;
                         ^

Looking into this a bit, the problem seems to be with coreutils 8.12.
java-source-list-uniq (input file) is indeed missing an entry for java/security/cert/X509Certificate.java

java-source-list (from which it is generated) looks right.

java-source-list-uniq is built from java-source-list in build/core/definitions.mk, lines 1827 and following.

Looking at what's going wrong there shows what looks like we're triggering a coreutils bug:

[bero@matterhorn WORK-iMX53]$ tr ' ' '\n' <out/target/common/obj/JAVA_LIBRARIES/core_intermediates/java-source-list |grep X509Certificatelibcore/luni/src/main/java/java/security/cert/X509Certificate.java
libcore/luni/src/main/java/javax/security/cert/X509Certificate.java
[bero@matterhorn WORK-iMX53]$ tr ' ' '\n' <out/target/common/obj/JAVA_LIBRARIES/core_intermediates/java-source-list |sort |grep X509Certificate
libcore/luni/src/main/java/java/security/cert/X509Certificate.java
libcore/luni/src/main/java/javax/security/cert/X509Certificate.java
[bero@matterhorn WORK-iMX53]$ tr ' ' '\n' <out/target/common/obj/JAVA_LIBRARIES/core_intermediates/java-source-list |sort -u |grep X509Certificate
libcore/luni/src/main/java/javax/security/cert/X509Certificate.java
[bero@matterhorn WORK-iMX53]$

Revision history for this message
Bernhard Rosenkraenzer (berolinux) wrote :

Changing the "sort -u" to "sort | uniq" produces the expected results, so that may be an ok workaround

Revision history for this message
Bernhard Rosenkraenzer (berolinux) wrote :

Also affects coreutils 8.14

Revision history for this message
Bernhard Rosenkraenzer (berolinux) wrote :

Another possible (and better) workaround is to make sure "sort -u" is called in the C locale -- that works around the bug, and also fixes odd locales where 2 filenames actually might be interpreted as the same.

Changed in linaro-android:
assignee: nobody → Bernhard Rosenkraenzer (berolinux)
Revision history for this message
Bernhard Rosenkraenzer (berolinux) wrote :

Will submit a LANG=C patch once my test build has completed

Changed in linaro-android:
milestone: none → 11.10
Changed in linaro-android:
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
Tony Mansson (tony-mansson) wrote :

Fix available in release 11.10 Linaro Android.

Changed in linaro-android:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.