Re: RFR (S): 7178667: ALT_EXPORT_PATH does not export server jvm on macosx

2012-06-21 Thread Scott Kovatch
  54 # Package built libraries in a universal binary
  55 $(UNIVERSAL_LIPO_LIST):
  56 BUILT_LIPO_FILES=`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst 
$(EXPORT_JRE_LIB_DIR)/,,$@) 2/dev/null`; \
  57 if [ -n $${BUILT_LIPO_FILES} ]; then \
  58   $(MKDIR) -p $(shell dirname $@); \
  59   lipo -create -output $@ $${BUILT_LIPO_FILES}; \
  60 fi  
  61 
  62 
  63 # Copy built non-universal binaries in place
  64 $(UNIVERSAL_COPY_LIST):
  65 BUILT_COPY_FILES=`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst 
$(EXPORT_JRE_LIB_DIR)/,,$@) 2/dev/null`; \
  66 if [ -n $${BUILT_COPY_FILES} ]; then \
  67   for i in $${BUILT_COPY_FILES}; do \
  68 if [ -f $${i} ]; then \
  69   $(MKDIR) -p $(shell dirname $@); \
  70   $(CP) $${i} $@; \
  71 fi; \
  72   done; \
  73 fi
  74 

This first item will find all object files that were built separately for i386 
and amd64 architectures, and then use 'lipo -create -output …' to create a 
single universal binary.  

The next phase copies those combined, universal binaries into 
EXPORT_JRE_LIB_DIR, since the Mac has never had/needed to break out libraries 
by architecture.

So, it sounds like when you rebuilt, everything was built into jre/lib/i386 and 
jre/lib/amd64, but never combined (or, in this case, just copied) into jre/lib, 
and therefore not found. 

Since we only build x86_64 the lipo command is effectively a cp.

-- Scott


On Jun 21, 2012, at 9:54 AM, Staffan Larsen staffan.lar...@oracle.com wrote:

 At least for me, MACOSX_UNIVERSAL ends up being set to true in 
 hotspot/make/bsd/makefiles/defs.make. 
 
 Line 186 and forward:
 
 # Universal build settings
 ifeq ($(OS_VENDOR), Darwin)
  # Build universal binaries by default on Mac OS X
  MACOSX_UNIVERSAL = true
 
 If this isn't intentional, then the fix for my problem is something else.
 
 /Staffan
 
 On 21 jun 2012, at 17:53, Henri Gomez wrote:
 
 universal build, on OSX ? Happy to see that some works/fixes around it :)
 
 BTW, how did you get in trouble since universal build is disabled for
 now unless some code is added to :
 
 There was an old thread on jdk7u-dev list and a proposed patch for
 review 
 (http://openjdk-osx-build.googlecode.com/svn/trunk/patches-jdk7u-osx/universal-build.patch)
 
 
 
 
 
 2012/6/21 Staffan Larsen staffan.lar...@oracle.com:
 [adding build-dev and macosx-port-dev]
 
 On 21 jun 2012, at 14:43, David Holmes wrote:
 
 On 21/06/2012 10:30 PM, Staffan Larsen wrote:
 Do you mean:
 
 .PHONY: $(UNIVERSAL_LIPO_LIST) $(UNIVERSAL_COPY_LIST)
 
 Yes. Now they will always be rebuilt.
 
 Yes, that seems to have the same effect. Probably a better solution.
 
 I think both of these simply mask the real problem. I still don't 
 understand how only some of the list items get rebuilt. The CR says
 
 These targets will only be run for the last item in the xxx_LIST 
 variables (which happens to be the client jvm)
 
 but I don't understand why that is?
 
 Neither do I. Makefiles is black magic to me. I only discovered that 
 building the complete JDK from the top-level directory did not update the 
 hotspot bits in the j2sdk-image and this was the ultimate cause.
 
 Here is an updated webrev: 
 http://cr.openjdk.java.net/~sla/7178667/webrev.02/
 
 Thanks,
 /Staffan
 
 
 But I also don't understand this universalization process.
 
 BTW you might want to run this past the bsd-port folks (don't recall the 
 exact alias) and/or build-dev. I seem to recall that last time we changed 
 something to do with universal builds it actually broke something.
 
 David
 
 Thanks,
 /Staffan
 
 On 21 jun 2012, at 14:12, David Holmes wrote:
 
 Hi Staffan,
 
 On 21/06/2012 6:33 PM, Staffan Larsen wrote:
 Please review the following fix to makefiles for universal binaries on
 max os x. The idea is to force the target to be executed for all items
 in the list.
 
 Fix contributed by Rickard Bäckman (rbackman).
 
 webrev: http://cr.openjdk.java.net/~sla/7178667/webrev.01/
 
 I don't understand the problem that this addresses but wouldn't you get 
 the same affect by declaring those targets as PHONY ?
 
 David
 
 PS. Unrelated but I was astounded to see that bsd/Makefile and 
 linux/Makefile both have a chunk of code conditional on ifeq 
 ($(OSNAME),solaris) Huh!
 
 
 



Re: Request for Review: Add Mac OS X Instructions to README-builds.html

2012-04-25 Thread Scott Kovatch

On Apr 25, 2012, at 6:02 AM, Edvard Wendelin wrote:

 Hi,
 
 I'm working on some updates in the README-builds.html [1]. The first step is 
 to add the Mac OS X platform. I have gathered the requirements from the Mac 
 OS X port wiki [2][3].  It seems like Apple has dropped the Mac part of 
 Mac OS X and now only call the product OS X Lion [4].  Question is if 
 this is only a marketing term or if it's now the official name. In this 
 webrev I've used Mac OS X. 

I don't think anyone will be confused if you continue to use Mac OS X. Until we 
hear otherwise, I think it's safe to leave it that way.

Instead of indicating 'JDK 6u18' at line 231, we should put Java for OS X Lion 
Update 1. Someone will invariably ask which OS X Java Update 6u18 corresponds 
to, so it's best to just spell it out explicitly. That update corresponds to 
6u31, if the JDK 6 version is important.

Looks fine otherwise.

-- Scott K.


Scott Kovatch
scott.kova...@oracle.com
Santa Clara/Pleasanton, CA




Re: RFR 7142950: jdk7u cannot bootstrap Mac OS build [macosx]

2012-02-08 Thread Scott Kovatch
On Feb 6, 2012, at 2:31 PM, Michael McMahon wrote:

 There are a few problems with the Mac build at the moment.
 
 1. If SKIP_BOOT_CYCLE=false then the build fails, due to two problems:-
1) top level Makefile doesn't know about Mac OS image directory structure
2) it also fails due to problem 2. below

 2. General bootstrapping problem. The build currently cannot use itself as
the bootstrap JDK due to an assumption in the framework classes that
os.arch is x86_64, whereas we currently set it to amd64. The change is to
fix that code to expect amd64. There is a related question then about what 
 the
correct value for os.arch should be. I'd like to raise this in a separate 
 discussion
and hopefully fix these build problems independently of that.

I was going to propose that we fix the image directory issues by building into 
the image directories the same way on all platforms and have the mac build copy 
the image directories into j2sdk-bundle. (7133768) I'm pretty sure that even 
with this change you can't build rt.jar because the jar tool gets moved out 
from underneath the running build when the bundle is constructed.

I don't think your changes would interfere with my proposed fix for 7133768, 
though. And, the other changes for generating the folder name dynamically are 
very much welcome.

-- Scott K.


Scott Kovatch
scott.kova...@oracle.com
Santa Clara/Pleasanton, CA