RFR: 7113349 JDK8 port to macosx

John Rose john.r.rose at oracle.com
Tue Feb 28 00:14:12 PST 2012


On Feb 22, 2012, at 1:50 PM, Michael McMahon wrote:

> This is the webrev for the Mac OS changes for JDK8. It is pretty much
> a straight merge of the current jdk7u-dev changes. It builds and passes most
> JCK and regression tests with only a small number of failures.
> 
> http://cr.openjdk.java.net/~michaelm/7113349/jdk8/webrev.1/

Here's a quick comment (or bug report) on one makefile, make/tools/freetypecheck/Makefile.

I'm trying out your patches on my macbook (Lion) with the late Xcode-supplied version of gcc.
  $ uname -a
  Darwin Sword2.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
  $ /Developer/usr/bin/gcc --version
  i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

That version of gcc fails to parse this command line from the jdk makefiles:
  $ /Developer/usr/bin/gcc … freetypecheck.c -L/usr/X11R6/lib -R /usr/X11R6/lib -lz -lfreetype

The error report indicates that the directory /usr/X11R6/lib gets treated as an ld input file:
  ld: in /usr/X11R6/lib, can't map file, errno=22 for architecture x86_64
  collect2: ld returned 1 exit status

By removing the space after "-R" in the makefile, I can pass the sanity checks and (apparently) build the real stuff:
  /Developer/usr/bin/gcc … freetypecheck.c -L/usr/X11R6/lib -R/usr/X11R6/lib -lz -lfreetype

Here is an updated diff hunk that works for me:

--- old/make/tools/freetypecheck/Makefile	2012-02-27 17:21:24.000000000 +0000
+++ new/make/tools/freetypecheck/Makefile	2012-02-27 17:21:24.000000000 +0000
@@ -51,6 +51,9 @@
     FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH)
   else # other unix
-    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH)
+    FT_LD_OPTIONS += -R$(FREETYPE_LIB_PATH)
+    ifeq ($(PLATFORM),macosx)
+      FT_LD_OPTIONS += -lz
+    endif
   endif
   FT_LD_OPTIONS += -lfreetype
 endif

Is this only a problem for people who make builds with OPENJDK=true?

After fixing the freetypecheck problem, my build completes fine.  This is the farthest I've seen a jdk8 build go on my mac in several weeks.  Thanks!

— John



More information about the jdk8-dev mailing list