Building OpenJDK on Windows

Max (Weijun) Wang Weijun.Wang at Sun.COM
Tue Jul 22 12:18:21 UTC 2008


This is a conflict between link.exe of CYGWIN and MSVC.

The formal process seems to suggest that you define environment  
variables to inform make to locate the correct find.exe (the MSVC  
one). I haven't tried it. I simply rename the link.exe in CYGWIN to  
something else.

-Max

On Jul 22, 2008, at 8:13 PM, Ingo Proetel wrote:

> Thanks that helped.
>
> Until I got here:
> 	link.exe  bufferoverflowU.lib kernel32.lib user32.lib gdi32.lib  
> winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib  
> oleaut32.lib  uuid.lib Wsock32.lib winmm.lib /nologo /machine:I386 / 
> opt:REF  /opt:ICF,8 /map /debug /subsystem:console /out:adlc.exe  
> main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj  
> filebuff.obj forms.obj formsopt.obj formssel.obj opcodes.obj  
> output_c.obj output_h.obj
> /usr/bin/link: extra operand `user32.lib'
> Try `/usr/bin/link --help' for more information.
> NMAKE : fatal error U1077: 'C:\cygwin\bin\link.exe' : return code  
> '0x1'
>
> Apparently the make does not use ALT_DEVTOOLS_PATH to prefix  
> link.exe. Is there another environment variable that I should set  
> for that?
> Or do I have to adjust the PATH variable?
>
> Ingo
>
> Max (Weijun) Wang wrote:
>> The file is moved to somewhere else. Please apply this patch:
>> diff --git a/make/windows/makefiles/defs.make b/make/windows/ 
>> makefiles/defs.make
>> --- a/make/windows/makefiles/defs.make
>> +++ b/make/windows/makefiles/defs.make
>> @@ -107,7 +107,7 @@
>>    ABS_OUTPUTDIR   := $(subst /,\\,$(shell /bin/cygpath -m -a "$ 
>> (OUTPUTDIR)"))
>>    ABS_BOOTDIR     := $(subst /,\\,$(shell /bin/cygpath -m -a "$ 
>> (BOOTDIR)"))
>>    ABS_GAMMADIR    := $(subst /,\\,$(shell /bin/cygpath -m -a "$ 
>> (GAMMADIR)"))
>> -  ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_BUILD_DIR)/$ 
>> (OSNAME)")/build.make
>> +  ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$ 
>> (OSNAME)")/build.make
>>  else
>>    ABS_OUTPUTDIR   := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$ 
>> (PWD)))
>>    ABS_BOOTDIR     := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
>> Hope this helps
>> -Max
>> On Jul 22, 2008, at 7:21 PM, Ingo Proetel wrote:
>>> Hi,
>>>
>>> I'm currently trying to setup an OpenJDK build on Windows.
>>>
>>> It works until it tries to compile hotspot. It misses 'hotspot/ 
>>> build/windows/build.make'.
>>> The build process creates some directories but not the 'hotspot/ 
>>> build'.
>>>
>>> Can somebody help me with this?
>>>
>>> Cheers,
>>> Ingo
>>>
>>> This is the output I get:
>>> /usr/bin/mkdir -p s:/Users/proetel/projects/openjdk/jdk7/tl/build/ 
>>> windows-i586/hotspot/outputdir
>>> /usr/bin/mkdir -p s:/Users/proetel/projects/openjdk/jdk7/tl/build/ 
>>> windows-i586/hotspot/import
>>> cd  ./hotspot/make && \
>>>     make JDK_TOPDIR=s:/Users/proetel/projects/openjdk/jdk7/tl/jdk  
>>> JDK_MAKE_SHARED_DIR=s:/Users/proetel/projects/openjdk/jdk7/tl/jdk/ 
>>> make/common/shared EXTERNALSANITYCONTROL=true  
>>> TARGET_CLASS_VERSION=5 MILESTONE=internal BUILD_NUMBER=b00  
>>> JDK_BUILD_NUMBER=b00 FULL_VERSION=1.7.0-internal- 
>>> proetel_2008_07_22_13_07-b00 PREVIOUS_JDK_VERSION=1.6.0  
>>> JDK_VERSION=1.7.0 JDK_MKTG_VERSION=7 JDK_MAJOR_VERSION=1  
>>> JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 PREVIOUS_MAJOR_VERSION=1  
>>> PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0  
>>> ARCH_DATA_MODEL=32 COOKED_BUILD_NUMBER=0 ANT_HOME="c:/Programme/ 
>>> apache-ant-1.7.0" ALT_OUTPUTDIR=s:/Users/proetel/projects/openjdk/ 
>>> jdk7/tl/build/windows-i586/hotspot/outputdir ALT_EXPORT_PATH=s:/ 
>>> Users/proetel/projects/openjdk/jdk7/tl/build/windows-i586/hotspot/ 
>>> import ALT_SLASH_JAVA=J: ALT_BOOTDIR=c:/Programme/Java/ 
>>> jdk1.6.0_03 ALT_LANGTOOLS_DIST=s:/Users/proetel/projects/openjdk/ 
>>> jdk7/tl/build/windows-i586/langtools/dist all_product
>>> make[1]: Entering directory `/cygdrive/s/Users/proetel/projects/ 
>>> openjdk/jdk7/tl/hotspot/make'
>>> cd /cygdrive/s/Users/proetel/projects/openjdk/jdk7/tl/hotspot/ 
>>> make; \
>>> make VM_TARGET=product generic_build2 ALT_OUTPUTDIR=s:/Users/ 
>>> proetel/projects/openjdk/jdk7/tl/build/windows-i586/hotspot/ 
>>> outputdir
>>> make[2]: Entering directory `/cygdrive/s/Users/proetel/projects/ 
>>> openjdk/jdk7/tl/hotspot/make'
>>> mkdir -p s:/Users/proetel/projects/openjdk/jdk7/tl/build/windows- 
>>> i586/hotspot/outputdir
>>> cd s:/Users/proetel/projects/openjdk/jdk7/tl/build/windows-i586/ 
>>> hotspot/outputdir; \
>>>     MAKEFLAGS= MFLAGS= nmake /NOLOGO -f s:/Users/proetel/projects/ 
>>> openjdk/jdk7/tl/hotspot/build/windows/build.make \
>>>           Variant=compiler2 \
>>>                       WorkSpace=s:\\Users\\proetel\\projects\ 
>>> \openjdk\\jdk7\\tl\\hotspot \
>>>           BootStrapDir=c:\\Programme\\Java\\jdk1.6.0_03 \
>>>                       BuildUser=proetel \
>>>            ARCH=x86 BUILDARCH=i486 Platform_arch=x86  
>>> Platform_arch_model=x86_32 JDK_MKTG_VERSION=7 JDK_MAJOR_VER=1  
>>> JDK_MINOR_VER=7 JDK_MICRO_VER=0 JDK_BUILD_NUMBER=0 JAVA_HOME=c:\ 
>>> \Programme\\Java\\jdk1.6.0_03 GAMMADIR=s:\\Users\\proetel\ 
>>> \projects\\openjdk\\jdk7\\tl\\hotspot MAKE_VERBOSE=y  
>>> HOTSPOT_RELEASE_VERSION=13.0-b02 JRE_RELEASE_VERSION=1.7.0- 
>>> internal-proetel_2008_07_22_13_07-b00 HOTSPOT_BUILD_VERSION= product
>>> NMAKE : fatal error U1052: file 's:/Users/proetel/projects/ 
>>> openjdk/jdk7/tl/hotspot/build/windows/build.make' not found
>>> Stop.
>>> make[2]: *** [generic_build2] Error 2
>>> make[2]: Leaving directory `/cygdrive/s/Users/proetel/projects/ 
>>> openjdk/jdk7/tl/hotspot/make'
>>> make[1]: *** [product] Error 2
>>> make[1]: Leaving directory `/cygdrive/s/Users/proetel/projects/ 
>>> openjdk/jdk7/tl/hotspot/make'
>>> make: *** [hotspot-build] Error 2
>>> -- 
>>> aicas Allerton Interworks Computer Automated Systems GmbH
>>> Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
>>> http://www.aicas.com   * Tel: +49-721-663 968-0
>>>
>>> USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
>>> Geschäftsführer: Dr. James J. Hunt
>
>
> -- 
> aicas Allerton Interworks Computer Automated Systems GmbH
> Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
> http://www.aicas.com   * Tel: +49-721-663 968-0
>
> USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
> Geschäftsführer: Dr. James J. Hunt




More information about the build-dev mailing list