Re: [7u]: help on jdk/make/common/shared/Defs-windows.gmk

2013-11-20 Thread Erik Joelsson
The way I understand it $(if $(word 2,$1) is a check for whitespace in 
the input parameter. It's an optimization to avoid executing cygpath 
when it's not needed. The MixedPath macro cannot be used if the path 
contains a space. It also doesn't convert to an absolute path, just 
replacing cygwin specific paths with driveletter paths. The unfortunate 
effect of this is that FullPath behaves differently depending on if the 
path contains a space.


How are you invoking the build to cause this error? Are you explicitly 
setting ALT_OUTPUTDIR? What is the path to your workspace?


/Erik

On 2013-11-15 18:37, Francis ANDRE wrote:

Hi

I am trying to fix the following error

$ make sanity
jdk/make/common/shared/Defs.gmk:563: *** ERROR: Trouble with the 
absolute path for OUTPUTDIR './bui

ld/windows-i586'.  Stop.

and found the following code in 
jdk/make/common/shared/Defs-windows.gmk, line 109


define FullPath
$(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2 $(DEV_NULL)),$(call 
MixedPath,$(realpath $(subst ,,$1

endef

Can someone explain me what use case is covered by the $(word 2,$1) in 
the previous statement?


The error ERROR: Trouble with the absolute path for OUTPUTDIR can be 
fixed by replacing $(word 2,$1) by $(word 1,$1) but I cannot find a 
usage for the $(word 2,$1)


Francis




Re: RFR: JDK-8028645: [infra] purge applet demos from the Solaris distros

2013-11-20 Thread Erik Joelsson

Looks good, but one style nit.

 195   $(JDK_OUTPUTDIR)/demo/nbproject/%: 
$(JDK_TOPDIR)/src/closed/share/demo/nbproject/%

 196 $(call install-file)
 197 $(CHMOD) -f ug+w $@
 198 ifeq ($(OPENJDK_TARGET_OS), solaris)
 199 $(RM) -r $(JDK_OUTPUTDIR)/demo/nbproject/jfc/SwingApplet
 200 endif

Make conditionals in recipes should be indented the same as the recipe, 
but with spaces so not to confuse make:


195   $(JDK_OUTPUTDIR)/demo/nbproject/%: 
$(JDK_TOPDIR)/src/closed/share/demo/nbproject/%

 196 $(call install-file)
 197 $(CHMOD) -f ug+w $@
 198 ifeq ($(OPENJDK_TARGET_OS), solaris)
 199   $(RM) -r $(JDK_OUTPUTDIR)/demo/nbproject/jfc/SwingApplet
 200 endif

/Erik

On 2013-11-20 00:36, Kumar Srinivasan wrote:

Hello,

Please review these changes to remove applet related demos from the 
images and thereby
from the Solaris distributions. Note: at this time appletviewer is 
still available in the distros,

as there are tests dependent on it.

http://cr.openjdk.java.net/~ksrini/8028645/webrev.0/

Thanks
Kumar





Re: [7u]: help on jdk/make/common/shared/Defs-windows.gmk

2013-11-20 Thread Francis ANDRE

Erik

How are you invoking the build to cause this error? Are you explicitly 
setting ALT_OUTPUTDIR?

I am invoking just: make sanity without explicitly setting ALT_OUTPUTDIR.


What is the path to your workspace?
FrancisANDRE@idefix /cygdrive/Z/JDK/jdk7u
$ hg path
default = http://hg.openjdk.java.net/jdk7u/jdk7u

FrancisANDRE@idefix /cygdrive/Z/JDK/jdk7u
$ hg root
/cygdrive/Z/JDK/jdk7u



I  extracted the relevant commands from the 
jdk/make/common/shared/Defs-windows.gmk into the joined test.mk file


if one runs make -f test.mk with $(if $(word 2,$1) at line 72, one gets
$ make -f test.mk
*OUTPUTDIR=./build/windows-i586**
**ABS_OUTPUTDIR=*
ALT_HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/windows-i586/hotspot/import
_HOTSPOT_IMPORT_PATH2=
_HOTSPOT_IMPORT_PATH3=
HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/windows-i586/hotspot/import
SYSTEMROOT=C:WINDOWS
xSYSTEMROOT=C:/WINDOWS
_system_root=C:/WINDOWS
FOO=Z:/JDK/jdk7u/build/windows-i586
BAR=C:/WINDOWS


if one runs make -f test.mk with $(if $(word 1,$1) at line 72, one gets
$ make -f test.mk
*OUTPUTDIR=./build/windows-i586**
**ABS_OUTPUTDIR=Z:/JDK/jdk7u/build/WINDOW~1*
ALT_HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/windows-i586/hotspot/import
_HOTSPOT_IMPORT_PATH2=
_HOTSPOT_IMPORT_PATH3=
HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/WINDOW~1/hotspot/import
SYSTEMROOT=C:WINDOWS
xSYSTEMROOT=C:/WINDOWS
_system_root=C:/WINDOWS
FOO=Z:/JDK/jdk7u/build/WINDOW~1
BAR=C:/WINDOWS


in both case, OUTPUTDIR is a relative path as ./build/windows-i586, but only 
the second computes properly the ABS_OUTPUTDIR as Z:/JDK/jdk7u/build/WINDOW~1. 
In the first case, ABS_OUTPUTDIR is empty with leads to the error ERROR: 
Trouble with the absolute path for OUTPUTDIR




Le 20/11/2013 10:47, Erik Joelsson a écrit :
The way I understand it $(if $(word 2,$1) is a check for whitespace in the 
input parameter. It's an optimization to avoid executing cygpath when it's not 
needed. The MixedPath macro cannot be used if the path contains a space. It 
also doesn't convert to an absolute path, just replacing cygwin specific paths 
with driveletter paths. The unfortunate effect of this is that FullPath 
behaves differently depending on if the path contains a space.


How are you invoking the build to cause this error? Are you explicitly setting 
ALT_OUTPUTDIR? What is the path to your workspace?


/Erik

On 2013-11-15 18:37, Francis ANDRE wrote:

Hi

I am trying to fix the following error

$ make sanity
jdk/make/common/shared/Defs.gmk:563: *** ERROR: Trouble with the absolute 
path for OUTPUTDIR './bui

ld/windows-i586'.  Stop.

and found the following code in jdk/make/common/shared/Defs-windows.gmk, line 
109


define FullPath
$(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2 $(DEV_NULL)),$(call 
MixedPath,$(realpath $(subst ,,$1

endef

Can someone explain me what use case is covered by the $(word 2,$1) in the 
previous statement?


The error ERROR: Trouble with the absolute path for OUTPUTDIR can be fixed 
by replacing $(word 2,$1) by $(word 1,$1) but I cannot find a usage for the 
$(word 2,$1)


Francis





CYGWIN_HOME := C:/Cygwin
DEV_NULL = /dev/null
CYGPATH_CMD = cygpath -a -s -m
define PwdPath
$(shell cd $1 2 $(DEV_NULL)  pwd)
endef
define AbsPwdPathCheck
$(shell cd .. 2 $(DEV_NULL)  cd $1 2 $(DEV_NULL)  pwd)
endef

# Checks an ALT value for spaces (should be one word), 
#   warns and returns Check_ALT_$1 if spaces
define AltCheckSpaces
$(if $(word 2,$($1)),$(warning WARNING: Value of $1 contains a space: '$($1)', 
check or set ALT_$1)Check_ALT_$1,$($1))
endef

# Checks an ALT value for empty, warns and returns Check_ALT_$1 if empty
define AltCheckValue
$(if $($1),$($1),$(warning WARNING: Value of $1 cannot be empty, check or set 
ALT_$1)Check_ALT_$1)
endef

# Checks any value for empty, warns and returns $2 if empty
define CheckValue
$(if $($1),$($1),$(warning WARNING: Value of $1 cannot be empty, will use 
'$2')$2)
endef

# Prefix for a utility prefix path, if empty leave alone, otherwise end with a /
define PrefixPath
$(if $1,$(subst //,/,$1/),)
endef
define DirExists
$(shell if [ -d $1 ]; then echo $1; elif [ -d $2 ]; then  echo $2;  
else  echo $3;  fi)
endef

# Select a directory if it exists, or the alternate 2, or the alternate 3, or 
the alternate 4
define DirExists4
$(shell \
  if [ -d $1 ]; then  \
echo $1; \
  elif [ -d $2 ]; then \
echo $2; \
  elif [ -d $3 ]; then \
echo $3; \
  else \
echo $4; \
  fi)
endef


define ToUpper
$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,\
$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,\
$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,\
$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,\
$(subst y,Y,$(subst z,Z,$1))
endef

# All possible drive letters
drives=a b c d e f g h i j k l m n o p q r s t u v w x y z
#drives=A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

# Convert /cygdrive/ paths to the mixed style 

Re: [7u]: help on jdk/make/common/shared/Defs-windows.gmk

2013-11-20 Thread Kelly O'Hair
I remember cygwin having some goofy behaviors with upper case, e.g. for Z:/.  
/cygdrive/Z/  vs. /cygdrive/z/

just a thought...

-kto

On Nov 20, 2013, at 12:11 PM, Francis ANDRE wrote:

 Erik
 
 How are you invoking the build to cause this error? Are you explicitly 
 setting ALT_OUTPUTDIR?
 I am invoking just: make sanity without explicitly setting ALT_OUTPUTDIR.
 
 
 What is the path to your workspace?
 FrancisANDRE@idefix /cygdrive/Z/JDK/jdk7u
 $ hg path
 default = http://hg.openjdk.java.net/jdk7u/jdk7u
 
 FrancisANDRE@idefix /cygdrive/Z/JDK/jdk7u
 $ hg root
 /cygdrive/Z/JDK/jdk7u
 
 
 
 I  extracted the relevant commands from the 
 jdk/make/common/shared/Defs-windows.gmk into the joined test.mk file
 
 if one runs make -f test.mk with $(if $(word 2,$1) at line 72, one gets
 $ make -f test.mk
 *OUTPUTDIR=./build/windows-i586**
 **ABS_OUTPUTDIR=*
 ALT_HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/windows-i586/hotspot/import
 _HOTSPOT_IMPORT_PATH2=
 _HOTSPOT_IMPORT_PATH3=
 HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/windows-i586/hotspot/import
 SYSTEMROOT=C:WINDOWS
 xSYSTEMROOT=C:/WINDOWS
 _system_root=C:/WINDOWS
 FOO=Z:/JDK/jdk7u/build/windows-i586
 BAR=C:/WINDOWS
 
 
 if one runs make -f test.mk with $(if $(word 1,$1) at line 72, one gets
 $ make -f test.mk
 *OUTPUTDIR=./build/windows-i586**
 **ABS_OUTPUTDIR=Z:/JDK/jdk7u/build/WINDOW~1*
 ALT_HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/windows-i586/hotspot/import
 _HOTSPOT_IMPORT_PATH2=
 _HOTSPOT_IMPORT_PATH3=
 HOTSPOT_IMPORT_PATH=Z:/JDK/jdk7u/build/WINDOW~1/hotspot/import
 SYSTEMROOT=C:WINDOWS
 xSYSTEMROOT=C:/WINDOWS
 _system_root=C:/WINDOWS
 FOO=Z:/JDK/jdk7u/build/WINDOW~1
 BAR=C:/WINDOWS
 
 
 in both case, OUTPUTDIR is a relative path as ./build/windows-i586, but 
 only the second computes properly the ABS_OUTPUTDIR as 
 Z:/JDK/jdk7u/build/WINDOW~1. In the first case, ABS_OUTPUTDIR is empty with 
 leads to the error ERROR: Trouble with the absolute path for OUTPUTDIR
 
 
 
 Le 20/11/2013 10:47, Erik Joelsson a écrit :
 The way I understand it $(if $(word 2,$1) is a check for whitespace in the 
 input parameter. It's an optimization to avoid executing cygpath when it's 
 not needed. The MixedPath macro cannot be used if the path contains a space. 
 It also doesn't convert to an absolute path, just replacing cygwin specific 
 paths with driveletter paths. The unfortunate effect of this is that 
 FullPath behaves differently depending on if the path contains a space.
 
 How are you invoking the build to cause this error? Are you explicitly 
 setting ALT_OUTPUTDIR? What is the path to your workspace?
 
 /Erik
 
 On 2013-11-15 18:37, Francis ANDRE wrote:
 Hi
 
 I am trying to fix the following error
 
 $ make sanity
 jdk/make/common/shared/Defs.gmk:563: *** ERROR: Trouble with the absolute 
 path for OUTPUTDIR './bui
 ld/windows-i586'.  Stop.
 
 and found the following code in jdk/make/common/shared/Defs-windows.gmk, 
 line 109
 
 define FullPath
 $(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2 $(DEV_NULL)),$(call 
 MixedPath,$(realpath $(subst ,,$1
 endef
 
 Can someone explain me what use case is covered by the $(word 2,$1) in the 
 previous statement?
 
 The error ERROR: Trouble with the absolute path for OUTPUTDIR can be 
 fixed by replacing $(word 2,$1) by $(word 1,$1) but I cannot find a usage 
 for the $(word 2,$1)
 
 Francis
 
 
 
 test.mk



Re: RFR: Bug ID: 9007227: - make/sanity-rules.gmk:61: *** multiple target patterns. Stop

2013-11-20 Thread Francis ANDRE


Le 20/11/2013 08:37, Ivan Krylov a écrit :
I went through the exercise of building openjdk 7-8 on Windows and concur it 
isn't trivial. But google helps and I found very the helpful Volker's blogpost 
very quickly.
A build system should be ideally self contained, including its documentation. 
This means that there should be no need to gogol for finding out additional 
help. There is already the problem of non proprietary additional software for 
building OpenJDK and centralizing all pieces in a single place seems to me a 
good idea. Moreover, the day the Simonis'blog is removed for any reason, one 
looses this Window's focused paper...
This problem should not be solved by adding extra pointer to workarounds. The 
build system on Windows should work with the latest Cygwin's make. I think 
that the openjdk community is big enough to influence and push through all 
necessary fixes into make.
I already exchange with the Cygwin guys for making ksh recognizing windows path 
for the webrev.ksh script...they said clearly no way...


Francis


Ivan

On 11/19/13 11:05 AM, Francis ANDRE wrote:

Hi Dalibor

Everybody at Oracle and may be elsewhere knows how difficult is the task of 
building OpenJDK on WXP/W7. There was even in a previous OpenJDK contest a 
proposal for making this windows build smoother... Thus, the blog of Volker 
SIMONIS is really of a great help to avoid loosing time, energy and aspirine 
for building OpenJDK on Windows. I was specially redevable to Volker on the 
chapter about the specific version of Make 3.82 which in the standard cygwin 
delivery does not understand the Windows Letter based path. Without his guide 
on compiling and running the latest Make out of cygwin, NO ONE, and I repeat, 
NO ONE can make the OpenJDK because it fails without a clear and 
understandable errors. Moreover, when asking the build list about those 
errors, no one answers because no one can imagine that the Cygwin make cannot 
manage Windows letter based path.


So, yes, adding the blog of Wolker SIMONIS or may be a reformatted text*is a 
major help for building OpenJDK on windows*.


Please, reconsider your position on adding this blog post as a README file.

Francis



Le 18/11/2013 20:11, Dalibor Topic a écrit :

On 10/6/13 8:37 PM, Francis ANDRE wrote:

Hi

I submit this patch for review for this Bug ID: 9007227: - 
make/sanity-rules.gmk:61: *** multiple target patterns. Stop


The webrev.ksh is broken on WXP/Cygwin. So I am providing here the hg 
outgoing report as well as the new file README-Windows-Cygwin-VS2010
I don't think that it's necessary to include blog posts in the source code 
archives. ;)


cheers,
dalibor topic









Re: RFR: Bug ID: 9007227: - make/sanity-rules.gmk:61: *** multiple target patterns. Stop

2013-11-20 Thread Francis ANDRE

Hi Erik

Le 20/11/2013 11:06, Erik Joelsson a écrit :
We identified cygwin make's inability to handle driveletter paths as one of 
the big problems with the old build system when starting the build-infra work 
for jdk8. So we designed the new build system to not use any mixed paths to 
avoid this problem.
Yes, you are right for the building of the jdk but that's only a part of the 
whole job. When talking about tests -- jtreg in particular --, you need to go 
back to the path handled by Java on windows and in that case, cygwin path does 
not work at all, only windows path with letter and '/' are working... So mixed 
path is a good compromise on windows for building, testing and delivering the 
full product


The problem with driveletter paths is also stated in the current 
README-builds.html and a number of workarounds are mentioned.
True, but all specific turn arounds for windows and cygwin and dependent third 
party software builds are disseminated all along the README-builds.html, which 
are making the build not so obvious. Even if one dislikes Windows, it is a so 
important platform for the Java ecosystem that it would make sense, from my 
point of view, to have a specific, Windows focused README...
I agree that documentation can always be improved however, and would encourage 
suggesting improvements to the current documentation rather than duplicating 
and making it redundant.

Ok..got the point


/Erik

On 2013-11-20 08:37, Ivan Krylov wrote:
I went through the exercise of building openjdk 7-8 on Windows and concur it 
isn't trivial. But google helps and I found very the helpful Volker's 
blogpost very quickly.
This problem should not be solved by adding extra pointer to workarounds. The 
build system on Windows should work with the latest Cygwin's make. I think 
that the openjdk community is big enough to influence and push through all 
necessary fixes into make.


Ivan

On 11/19/13 11:05 AM, Francis ANDRE wrote:

Hi Dalibor

Everybody at Oracle and may be elsewhere knows how difficult is the task of 
building OpenJDK on WXP/W7. There was even in a previous OpenJDK contest a 
proposal for making this windows build smoother... Thus, the blog of Volker 
SIMONIS is really of a great help to avoid loosing time, energy and aspirine 
for building OpenJDK on Windows. I was specially redevable to Volker on the 
chapter about the specific version of Make 3.82 which in the standard cygwin 
delivery does not understand the Windows Letter based path. Without his 
guide on compiling and running the latest Make out of cygwin, NO ONE, and I 
repeat, NO ONE can make the OpenJDK because it fails without a clear and 
understandable errors. Moreover, when asking the build list about those 
errors, no one answers because no one can imagine that the Cygwin make 
cannot manage Windows letter based path.


So, yes, adding the blog of Wolker SIMONIS or may be a reformatted text*is a 
major help for building OpenJDK on windows*.


Please, reconsider your position on adding this blog post as a README file.

Francis



Le 18/11/2013 20:11, Dalibor Topic a écrit :

On 10/6/13 8:37 PM, Francis ANDRE wrote:

Hi

I submit this patch for review for this Bug ID: 9007227: - 
make/sanity-rules.gmk:61: *** multiple target patterns. Stop


The webrev.ksh is broken on WXP/Cygwin. So I am providing here the hg 
outgoing report as well as the new file README-Windows-Cygwin-VS2010
I don't think that it's necessary to include blog posts in the source code 
archives. ;)


cheers,
dalibor topic