Access denied on Windows7 64bit

Oti ohumbel at gmail.com
Wed Dec 5 06:26:58 PST 2012


Success!

The --with-msvcr-dll=/cygdrive/c/Java/jdk1.7.0_09/bin/msvcr100.dll flag did
it.

Reini's and my idea for http://bugs.sun.com/view_bug.do?bug_id=8001912:
If configure is able to detect a valid boot JDK (in my case
/cygdrive/c/Java/jdk1.7.0_09/bin), then this JDK can be used as fallback
for msvcr100.dll, instead of the /Windows/System32 one which obviously does
not work.
This way the build would succeed no matter where other versions of the .dll
are installed.

What we did not think through though: How to proceed if someone wants to
build the 32 bit version on a 64 bit system, using a 64 bit boot JDK...

Erik, Kelly: Many thanks for all your help an patience, that's awesome!
Oti.



P.S.
And if you are still interested, here is the proof:

:
utils.cpp
zip.cpp
main.c
make[3]: Leaving directory `/cygdrive/c/OpenJDK/jdk8_tl/jdk/makefiles'
make[3]: Entering directory `/cygdrive/c/OpenJDK/jdk8_tl/jdk/makefiles'
make[3]: Leaving directory `/cygdrive/c/OpenJDK/jdk8_tl/jdk/makefiles'
make[2]: Leaving directory `/cygdrive/c/OpenJDK/jdk8_tl/jdk/makefiles'
## Finished jdk (build time 00:14:36)

----- Build times -------
Start 2012-12-05 14:02:20
End   2012-12-05 14:27:31
00:01:16 corba
00:05:18 hotspot
00:01:13 jaxp
00:01:23 jaxws
00:14:36 jdk
00:01:20 langtools
00:25:11 TOTAL
-------------------------
Finished building OpenJDK for target 'all'
make[1]: Leaving directory
`/cygdrive/c/OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release'


ohumbel at WIN-B8PK3J3J70Q/cygdrive/c/OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin
$ ./java -version
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build
1.8.0-internal-ohumbel_2012_12_05_13_47-b00)
OpenJDK 64-Bit Server VM (build 25.0-b10, mixed mode)

ohumbel at WIN-B8PK3J3J70Q/cygdrive/c/OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin
$








On Tue, Dec 4, 2012 at 3:40 PM, Erik Joelsson <erik.joelsson at oracle.com>wrote:

> **
> I stumbled over this bug that my college filed:
>
> http://bugs.sun.com/view_bug.do?bug_id=8001912
>
> It seems that the behavior you are seeing, trying to copy the file from
> $SYSTEMROOT/system32, is currently intended. Why it won't work I don't know
> however. As a workaround you could try using --with-msvcr-dll to point to
> the some other version of the file that you have.
>
> /Erik
>
>
> On 2012-12-04 13:40, Oti wrote:
>
> Erik,
>
> thanks - this sounds like hope again!
> Please let me know if I can help testing out stuff. I believe my
> environment is now at least as stable as to produce consistent results.
> Oti.
>
>
> On Tue, Dec 4, 2012 at 10:28 AM, Erik Joelsson <erik.joelsson at oracle.com>wrote:
>
>>  Oh, my bad. I thought the SDK would include this dll, but checking my
>> other machine (where I installed the sdk) it clearly didn't. It seems that
>> using visual studio express, msvcr100.dll is only available in the debugger
>> dir. Configure, however, currently avoids this location, because the old
>> build preferred the other location, and they don't match.
>>
>> I will need to investigate some more and actually try a windows system
>> with just VS express and see how it works.
>>
>> /Erik
>>
>>
>> On 2012-12-04 10:08, Oti wrote:
>>
>> Yes, you are right - no difference.
>>
>>  I followed
>> http://weblogs.java.net/blog/simonis/archive/2011/10/28/yaojowbi-yet-another-openjdk-windows-build-instructionto install the free versions,
>> eg. Windows SDK 7.1 (
>> http://www.microsoft.com/en-us/download/details.aspx?id=8279):
>>  Version: 7.1 Date published: 5/19/2010
>> Language: English
>> File name Size
>> winsdk_web.exe 498 KB
>>
>>  You can find all the latest download links here:
>> http://java.net/projects/adoptopenjdk/pages/BuildWindows
>>
>>  Below is the copied info from inside Visual C++ 2010 Express:
>>
>>  ----
>>  Microsoft Visual Studio 2010
>> Version 10.0.40219.1 SP1Rel
>> Microsoft .NET Framework
>> Version 4.0.30319 SP1Rel
>>
>>  Installed Version: VC Express
>>
>>  Microsoft Visual C++ 2010   01013-532-2002287-70009
>> Microsoft Visual C++ 2010
>>
>>  Hotfix for Microsoft Visual C++ 2010 Express - ENU (KB2542054)
>> KB2542054
>> This hotfix is for Microsoft Visual C++ 2010 Express - ENU.
>> If you later install a more recent service pack, this hotfix will be
>> uninstalled automatically.
>> For more information, visit http://support.microsoft.com/kb/2542054.
>>
>>  Hotfix for Microsoft Visual C++ 2010 Express - ENU (KB2635973)
>> KB2635973
>> This hotfix is for Microsoft Visual C++ 2010 Express - ENU.
>> If you later install a more recent service pack, this hotfix will be
>> uninstalled automatically.
>> For more information, visit http://support.microsoft.com/kb/2635973.
>>
>>  Microsoft Visual C++ 2010 Express - ENU Service Pack 1 (KB983509)
>> KB983509
>> This service pack is for Microsoft Visual C++ 2010 Express - ENU.
>> If you later install a more recent service pack, this service pack will
>> be uninstalled automatically.
>> For more information, visit http://support.microsoft.com/kb/983509.
>>  ----
>>
>>
>>  Now consider me a complete Visual* Newbie, there is a good chance that
>> I am missing something.
>> The description in
>> http://java.net/projects/adoptopenjdk/pages/BuildWindows is the result
>> of many trials to adapt
>> http://weblogs.java.net/blog/simonis/archive/2011/10/28/yaojowbi-yet-another-openjdk-windows-build-instructionto the new build and the newest free Visual* versions.
>>
>>
>>  Best wishes,
>> Oti.
>>
>>
>> On Tue, Dec 4, 2012 at 9:22 AM, Erik Joelsson <erik.joelsson at oracle.com>wrote:
>>
>>>  I doubt the updated files will do any difference. This looks like a
>>> problem in your environment. Which version of visual studio did you
>>> install? Did you install all of it? In my installation (which I think is
>>> "premium"), it looks like this:
>>>
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/Common7/IDE/Remote Debugger/ia64/msvcr100.dll
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/Common7/IDE/Remote Debugger/x64/msvcr100.dll
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/Common7/IDE/Remote Debugger/x86/msvcr100.dll
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/VC/redist/x64/Microsoft.VC100.CRT/msvcr100.dll
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/VC/redist/x86/Microsoft.VC100.CRT/msvcr100.dll
>>>
>>> And the correct msvcr100.dll are the ones in:
>>>
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/VC/redist/x64/Microsoft.VC100.CRT/msvcr100.dll
>>> /cygdrive/c/Program Files (x86)/Microsoft Visual Studio
>>> 10.0/VC/redist/x86/Microsoft.VC100.CRT/msvcr100.dll
>>>
>>> At one point (long ago), we accidentally picked up the ones in Remote
>>> Debugger and got into problems.
>>>
>>> Another way to get a working environment is to install the Windows SDK
>>> version 7.1, which I understand is free to use. Configure will pick up the
>>> compilers and libraries from that automatically too.
>>>
>>> /Erik
>>>
>>>
>>> On 2012-12-04 08:13, Oti wrote:
>>>
>>> Hi Erik,
>>>
>>>  this was with make files older than 3rd December.
>>> I'll try again, with
>>>   hg: build-infra/jdk8: 8001942: build-infra: General permission
>>> problems on Windows/cygwin
>>>  included.
>>> Assuming hg.openjdk.java.net/jdk8/tl
>>>
>>>
>>> tis the right repo to clone?
>>> Stay tuned.
>>>
>>>  Oti.
>>>
>>>
>>>
>>> On Tue, Dec 4, 2012 at 7:49 AM, Oti <ohumbel at gmail.com> wrote:
>>>
>>>> Hi Erik,
>>>>
>>>>  to verify that I am not doing something wrong (or messing up by
>>>> hand), I always delete the old directory and then create a new one as
>>>> follows:
>>>> $ cd /cygdrive/c/OpenJDK
>>>> $ mkdir jdk8_tl
>>>> $ hg clone http://hg.openjdk.java.net/jdk8/tl jdk8_tl
>>>> $ cd jdk8_tl
>>>> $ bash get_source.sh
>>>> $ bash configure
>>>> --with-freetype=/cygdrive/c/OpenJDK/freetype-2.4.10/win64
>>>> $ make NEWBUILD=true
>>>>
>>>>  The reference in spec.gmk looks like this:
>>>> ARFLAGS:=-nologo -NODEFAULTLIB:MSVCRT
>>>> MSVCR_DLL:=/cygdrive/c/Windows/system32/msvcr100.dll
>>>>
>>>>  There are the following msvcr100.dll files around:
>>>> $ find . -name msvcr100.dll
>>>> ./Java/jdk1.7.0_09/bin/msvcr100.dll
>>>> ./Java/jdk1.7.0_09/jre/bin/msvcr100.dll
>>>> ./Java/jdk1.7.0_09/jre/bin/plugin2/msvcr100.dll
>>>> ./Java/jre7/bin/msvcr100.dll
>>>> ./Java/jre7/bin/plugin2/msvcr100.dll
>>>> ./OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin/msvcr100.dl
>>>>                                                              l
>>>> ./Program Files (x86)/Microsoft Visual Studio
>>>> 10.0/Common7/Packages/Debugger/X64/msvcr100.dll
>>>> ./Program Files (x86)/Mozilla Firefox/msvcr100.dll
>>>> ./Windows/System32/msvcr100.dll
>>>> ./Windows/SysWOW64/msvcr100.dll
>>>>
>>>>  My suspicion was that maybe the 32 bit and 64 bit 'versions' could be
>>>> different, but diff can spot no difference:
>>>> $ diff ./Windows/SysWOW64/msvcr100.dll ./Windows/System32/msvcr100.dll
>>>>
>>>>  $ diff ./Windows/SysWOW64/msvcr100.dll
>>>> ./OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin/msvcr100.dll
>>>>
>>>>
>>>>  Using Windows Explorer and running as Administrator, I gave the
>>>> msvcr100.dll in the System32 folder full control.
>>>> The cygwin permissions now look like this:
>>>> $ ls -la ./Windows/System32/msvcr100.dll
>>>> -rwxrw-rw-+ 1 SYSTEM SYSTEM 773968 Jun 11  2011
>>>> ./Windows/System32/msvcr100.dll
>>>> $ ls -la
>>>> ./OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin/msvcr100.dll
>>>> -rwxr--r-- 1 ohumbel None 773968 Nov 30 07:01
>>>> ./OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin/msvcr100.dll
>>>>
>>>>  This is after the build, with no manual interaction.
>>>>  And - at the end of the build - I still got:
>>>> utils.cpp
>>>> zip.cpp
>>>> main.c
>>>> Error: loading:
>>>> c:\OpenJDK\jdk8_tl\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>> Error: loading:
>>>> c:\OpenJDK\jdk8_tl\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>> Error: loading:
>>>> c:\OpenJDK\jdk8_tl\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>> Error: loading:
>>>> c:\OpenJDK\jdk8_tl\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>  Error: loading:
>>>> c:\OpenJDK\jdk8_tl\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>> ## Finished jdk (build time 00:14:33)
>>>>
>>>>  ----- Build times -------
>>>> Start 2012-11-22 10:53:04
>>>> End   2012-11-22 11:18:01
>>>> 00:01:09 corba
>>>> 00:05:13 hotspot
>>>> 00:01:08 jaxp
>>>> 00:01:21 jaxws
>>>> 00:14:33 jdk
>>>> 00:01:26 langtools
>>>> 00:24:57 TOTAL
>>>>  -------------------------
>>>> Finished building OpenJDK for target 'all'
>>>>  The build.log file can be found here:
>>>> http://jython.extreme.st/sharedfiles/build.log
>>>>
>>>>
>>>>  And when trying to start java:
>>>> ohumbel at WIN-B8PK3J3J70Q/cygdrive/c/OpenJDK/jdk8_tl/build/windows-x86_64-normal-server-release/jdk/bin
>>>>  $ ./java -version
>>>> openjdk version "1.8.0-internal"
>>>>  OpenJDK Runtime Environment (build
>>>> 1.8.0-internal-ohumbel_2012_11_29_21_56-b00)
>>>>  OpenJDK 64-Bit Server VM (build 25.0-b09, mixed mode)
>>>>  Error: loading:
>>>> C:\OpenJDK\jdk8_tl\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>
>>>>  This does not change if I chmod msvcr100.dll in the bin folder.
>>>>
>>>>  The sad thing is that Reini, a colleague of mine
>>>>  - installed Windows7 64 bit from scratch
>>>>   - followed the instructions on
>>>> http://java.net/projects/adoptopenjdk/pages/BuildWindows
>>>> and now has **exactly** the problems described above.
>>>>
>>>>  We are running out of ideas now...
>>>> I'd appreciate if anyone has advice what to try further.
>>>>
>>>>  Thanks a lot!
>>>>  Oti.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Nov 21, 2012 at 9:54 AM, Erik Joelsson <
>>>> erik.joelsson at oracle.com> wrote:
>>>>
>>>>> Hello Oti,
>>>>>
>>>>> It could be that. I know one of my colleges has an issue that is at
>>>>> least similar. Something with permissions getting messed up after copying
>>>>> that file into the build directory. It could also be that the wrong
>>>>> msvcr100.dll has been picked up. We had a bug at some point where that
>>>>> could happen and I'm not sure how up to date the source base you are
>>>>> building from is. To check, find the reference to that file in spec.gmk in
>>>>> the root of your build dir.
>>>>>
>>>>> To see if it's a permissions issue, you could try chmod, checking the
>>>>> permissions using explorer or manually copying the file using explorer and
>>>>> see if anything makes a difference.
>>>>>
>>>>> /Erik
>>>>>
>>>>>
>>>>> On 2012-11-20 22:48, Oti wrote:
>>>>>
>>>>>> Sorry for the poor formatting in the last message. The text below
>>>>>> should be
>>>>>> a lot easier to read.
>>>>>>
>>>>>> Hi again,
>>>>>> how cool is that:
>>>>>>
>>>>>> ----- Build times -------
>>>>>> Start 2012-11-20 20:39:50
>>>>>> End   2012-11-20 21:05:26
>>>>>> 00:01:11 corba
>>>>>> 00:05:17 hotspot
>>>>>> 00:01:04 jaxp
>>>>>> 00:01:15 jaxws
>>>>>> 00:15:22 jdk
>>>>>> 00:01:22 langtools
>>>>>> 00:25:36 TOTAL
>>>>>> -------------------------
>>>>>> Finished building OpenJDK for target 'all'
>>>>>>
>>>>>>
>>>>>> However, a few lines above:
>>>>>>
>>>>>> utils.cpp
>>>>>> zip.cpp
>>>>>> main.c
>>>>>> Error: loading:
>>>>>>
>>>>>> c:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>> Error: loading:
>>>>>>
>>>>>> c:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>> Error: loading:
>>>>>>
>>>>>> c:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>> Error: loading:
>>>>>>
>>>>>> c:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>> Error: loading:
>>>>>>
>>>>>> c:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>> ## Finished jdk (build time 00:15:22)
>>>>>>
>>>>>> And the same error appears when trying to start the just built java:
>>>>>>
>>>>>> ohumbel at WIN-B8PK3J3J70Q
>>>>>> /cygdrive/c/OpenJDK/jdk8_tl_2/build/windows-x86_64-normal-server-release/jdk/bin
>>>>>> $ ./java -version
>>>>>> openjdk version "1.8.0-internal"
>>>>>> OpenJDK Runtime Environment (build
>>>>>> 1.8.0-internal-ohumbel_2012_11_20_20_38-b00)
>>>>>> OpenJDK 64-Bit Server VM (build 25.0-b09, mixed mode)
>>>>>> Error: loading:
>>>>>>
>>>>>> C:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>>
>>>>>> But the msvcr100.dll is present:
>>>>>>
>>>>>> ohumbel at WIN-B8PK3J3J70Q
>>>>>> /cygdrive/c/OpenJDK/jdk8_tl_2/build/windows-x86_64-normal-server-release/jdk/bin
>>>>>> $ ls -la
>>>>>> total 14160
>>>>>> drwxr-xr-x+ 1 ohumbel None       0 Nov 20 21:05 .
>>>>>> drwxr-xr-x+ 1 ohumbel None       0 Nov 20 21:05 ..
>>>>>> -rw-r--r--  1 ohumbel None   32492 Nov 20 21:04 appletviewer.diz
>>>>>> -rwxr-xr-x  1 ohumbel None    9728 Nov 20 21:04 appletviewer.exe
>>>>>> -rw-r--r--  1 ohumbel None   54444 Nov 20 21:02 attach.diz
>>>>>> -rwxr-xr-x  1 ohumbel None   14848 Nov 20 21:02 attach.dll
>>>>>> :
>>>>>> -rw-r--r--  1 ohumbel None  204307 Nov 20 21:03 lcms.diz
>>>>>> -rwxr-xr-x  1 ohumbel None  179200 Nov 20 21:03 lcms.dll
>>>>>> -rw-r--r--  1 ohumbel None   90728 Nov 20 21:03 management.diz
>>>>>> -rwxr-xr-x  1 ohumbel None   28160 Nov 20 21:03 management.dll
>>>>>> -rw-r--r--  1 ohumbel None  135997 Nov 20 21:00 mlib_image.diz
>>>>>> -rwxr-xr-x  1 ohumbel None  646656 Nov 20 21:00 mlib_image.dll
>>>>>> -rwx------  1 ohumbel None  773968 Nov 20 20:55 msvcr100.dll
>>>>>> :
>>>>>>
>>>>>> Could it be that another path should be converted to cygwin?
>>>>>>
>>>>>>
>>>>>> Reini,
>>>>>> changing the file permission has no effect for running java:
>>>>>>
>>>>>> ohumbel at WIN-B8PK3J3J70Q
>>>>>> /cygdrive/c/OpenJDK/jdk8_tl_2/build/windows-x86_64-normal-server-release/jdk/bin
>>>>>> $ ls -la msv*
>>>>>> -rwxr-xr-x 1 ohumbel None 773968 Nov 20 20:55 msvcr100.dll
>>>>>> $ ./java -version
>>>>>> openjdk version "1.8.0-internal"
>>>>>> OpenJDK Runtime Environment (build
>>>>>> 1.8.0-internal-ohumbel_2012_11_20_20_38-b00)
>>>>>> OpenJDK 64-Bit Server VM (build 25.0-b09, mixed mode)
>>>>>> Error: loading:
>>>>>>
>>>>>> C:\OpenJDK\jdk8_tl_2\build\windows-x86_64-normal-server-release\jdk\bin\msvcr100.dll
>>>>>>
>>>>>> , and during the build I have no control over it.
>>>>>>
>>>>>> Thanks, and best wishes
>>>>>> Oti.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Nov 20, 2012 at 9:40 PM, Patrick Reinhart<patrick at reini.net>
>>>>>>  wrote:
>>>>>>
>>>>>>  Hi Oti,
>>>>>>>
>>>>>>> Could it be that msvcr100.dll should be executable?
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>> Patrick 'Reini' Reinhart
>>>>>>>
>>>>>>>
>>>>
>>>
>>
>



More information about the build-infra-dev mailing list