Bug 158304 - java/openjdk6 does not build on a machine without CMOV
Summary: java/openjdk6 does not build on a machine without CMOV
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-26 08:20 UTC by Oli Kron
Modified: 2011-08-10 20:48 UTC (History)
0 users

See Also:


Attachments
file.diff (6.87 KB, patch)
2011-06-26 08:20 UTC, Oli Kron
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oli Kron 2011-06-26 08:20:03 UTC
I have a machine with this CPU:

CPU: VIA Samuel 2 (532.64-MHz 686-class CPU)
  Origin = "CentaurHauls"  Id = 0x673  Family = 6  Model = 7  Stepping = 3
  Features=0x803035<FPU,DE,TSC,MSR,MTRR,PGE,MMX>

Although it is a 686-class CPU it doesn't have the CMOV instruction.

I could not build /usr/ports/java/openjdk6/ (openjdk6-b22_6):

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (assembler_x86.cpp:1042), pid=91688, tid=686821696
#  guarantee(VM_Version::supports_cmov()) failed: illegal instruction
#
# JRE version: 6.0-b20
# Java VM: OpenJDK Server VM (19.0-b09 mixed mode, sharing bsd-x86 )
# An error report file with more information is saved as:
# /usr/ports/java/openjdk6/work/build/bsd-i586/hotspot/outputdir/bsd_i486_compiler2/product/hs_err_pid91688.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Abort trap (core dumped)
gmake[4]: *** [product] Error 134
gmake[4]: Leaving directory `/usr/ports/java/openjdk6/work/build/bsd-i586/hotspot/outputdir'
gmake[3]: *** [generic_build2] Error 2
gmake[3]: Leaving directory `/usr/ports/java/openjdk6/work/hotspot/make'
gmake[2]: *** [product] Error 2
gmake[2]: Leaving directory `/usr/ports/java/openjdk6/work/hotspot/make'
gmake[1]: *** [hotspot-build] Error 2
gmake[1]: Leaving directory `/usr/ports/java/openjdk6/work'
gmake: *** [build_product_image] Error 2
*** Error code 1

Using hs_err_pid91688.log (I'm sorry I've deleted the file) I did some
googling and found the cause: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7032388

Fix: I've managed my problem using a bugfix from IcedTea:

cd
wget http://icedtea.classpath.org/download/source/icedtea6-1.10.2.tar.gz
tar xf icedtea6-1.10.2.tar.gz

cd /usr/ports/java/openjdk6
make patch
cd work
patch -p1 <~/icedtea6-1.10.2/patches/hotspot/original/7032388-work_without_cmov_instruction.patch
cd ..
make build install

I'm attaching thefix 7032388-work_without_cmov_instruction.patch


Patch attached with submission follows:
How-To-Repeat: Try build java/openjdk6 on a machine without CMOV (i586 or some i686
like VIA Samuel 2)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-06-27 23:20:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-java

Fix synopsis and assign.
Comment 2 vaclav.kadlcik 2011-07-14 04:17:04 UTC
The issue is still valid in openjdk6-b23. I fixed it for me
the same way - using the icedtea's patch.

Oli
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-08-10 00:03:58 UTC
jkim        2011-08-09 22:56:40 UTC

  FreeBSD ports repository

  Modified files:
    java/openjdk6        Makefile 
    java/openjdk6/files  fontconfig.properties 
  Added files:
    java/openjdk6/files/icedtea 
                                7032388-work_without_cmov_instruction.patch 
  Log:
  - Add an additional patch to support i386 CPUs without CMOV instruction
  under ICEDTEA option. [1]
  - Chase default Korean font directory change.
  
  PR:             ports/158304 [1]
  Obtained from:  IcedTea Project [1]
  
  Revision  Changes    Path
  1.52      +3 -1      ports/java/openjdk6/Makefile
  1.3       +4 -4      ports/java/openjdk6/files/fontconfig.properties
  1.1       +178 -0    ports/java/openjdk6/files/icedtea/7032388-work_without_cmov_instruction.patch (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Oli Kron 2011-08-10 19:24:49 UTC
Verified on VIA Samuel 2. The new version of the port
compiles fine. Please close this PR.

jkim, many thanks to you!
Oli
Comment 5 Jung-uk Kim freebsd_committer freebsd_triage 2011-08-10 20:47:53 UTC
State Changed
From-To: open->closed

Committed and verified.