Comments (16)
Hi, to fix "Bad file permissions" problem you can either run the build as Administrator, or do a chmod -R 777
from Cygwin shell inside the lookaside\java-1.8.0-openjdk
directory.
from ojdkbuild.
@ojdkbuild Reviving the "Bad file permissions" issue. I'm getting the same error as @Draiget (this log contains some debug output I inserted to see what test/file exactly produces the issue):
checking if elliptic curve crypto implementation is present... yes
checking for memory size... 3928 MB
checking for appropriate number of jobs to run in parallel... 1
checking whether to use sjavac... no
checking for ccache... no
file to test: /cygdrive/c/javaws-alt/ojdkbuild/lookaside/java-1.8.0-openjdk/LICENSE from /cygdrive/c/javaws-alt/ojdkbuild/build/java-1.8.0-openjdk
/usr/bin/stat -c '%a' /cygdrive/c/javaws-alt/ojdkbuild/lookaside/java-1.8.0-openjdk/LICENSE :
0
configure: error: Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.
configure exiting with result code 1
+ '[' OFF == OFF ']'
+ make images JAVAC_FLAGS=-g LOG=info
make: *** No rule to make target `images'. Stop.
+ exit 2
C:\javaws-alt\ojdkbuild\build>if 0 NEQ 1 exit /b 1
NMAKE : fatal error U1077: 'C:/WINDOWS/System32\cmd.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\javaws-alt\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\javaws-alt\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\javaws-alt\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
These are the lines I inserted into generated-config.sh to find out what actually is tested:
echo "file to test: $SRC_ROOT/LICENSE from $(pwd)"
echo "$STAT -c '%a' $file_to_test :"
$STAT -c '%a' "$file_to_test"
No matter how much I chmod in lookaside, I get the same error at this stage, whether I run run.bat from mingw shell, cygwin shell or CMD. No matter which shell I use, stat -c '%a' lookaside/java-1.8.0-openjdk/LICENSE
produces 644 -- except in the environment created by run.bat, where it produces 0, according to my test output above.
When I disable that test (by commenting it out), further down the line an "Access denied" happens (which almost is to be expected given that I disabled the preemptive test for such things, but I don't see how these files should not be accessible...?):
+ make images JAVAC_FLAGS=-g LOG=info
Running make as '/cygdrive/c/javaws-alt/ojdkbuild/tools/make/make -s VERBOSE=-s LOG_LEVEL=info -R -I /cygdrive/c/javaws-alt/ojdkbuild/lookaside/java-1.8.0-openjdk/make/common SPEC=/cygdrive/c/javaws-alt/ojdkbuild/build/java-1.8.0-openjdk/spec.gmk -j1'
Building OpenJDK for target 'images' in configuration '/cygdrive/c/javaws-alt/ojdkbuild/build/java-1.8.0-openjdk'
## Starting langtools
Compiling 2 files for BUILD_TOOLS
Compiling 32 properties into resource bundles
Compiling 782 files for BUILD_BOOTSTRAP_LANGTOOLS
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Creating langtools/dist/bootstrap/lib/javac.jar
java.io.FileNotFoundException: com\sun\tools\doclets\internal\toolkit\resources\doclet.xml (Zugriff verweigert)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at sun.tools.jar.Main.copy(Main.java:835)
at sun.tools.jar.Main.addFile(Main.java:784)
at sun.tools.jar.Main.update(Main.java:596)
at sun.tools.jar.Main.run(Main.java:224)
at sun.tools.jar.Main.main(Main.java:1231)
make[1]: *** No rule to make target `all', needed by `default'. Stop.
make: *** [langtools-only] Error 2
+ exit 2
C:\javaws-alt\ojdkbuild\build>if 0 NEQ 1 exit /b 1
NMAKE : fatal error U1077: 'C:/WINDOWS/System32\cmd.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\javaws-alt\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\javaws-alt\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\javaws-alt\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
I'm running this on Win10 as user, checked it out after git config --global core.autocrlf false
. Using Local Admin privileges produces the same error.
from ojdkbuild.
Hi,
I see the following output locally:
+ make images JAVAC_FLAGS=-g LOG=info
Running make as '/cygdrive/c/ojdkbuild/tools/make/make -s VERBOSE=-s ...
Can you write a full sequence how to reproduce the problem (starting with repo checkout)?
from ojdkbuild.
I have a similar problem.
bash: C:/ojdk/ojdkbuild/src/java-1.8.0-openjdk/../../lookaside/java-1.8.0-openjdk /common/autoconf/configure: No such file or directory make: *** No rule to make target
images'. Stop.`
log-cwd.txt
from ojdkbuild.
Thanks for the log, still cannot reproduce locally with clean checkout and run.bat
.
This bit looks wrong:
bash: C:/ojdk/ojdkbuild/src/java-1.8.0-openjdk/../../lookaside/java-1.8.0-openjdk
/common/autoconf/configure: No such file or directory
It should be something like this:
+ bash C:/tmp/ojdkbuild/src/java-1.8.0-openjdk/../../lookaside/java-1.8.0-openjdk/configure --enable-unlimited-crypto=yes ...
Ran it with:
run.bat > out.txt 2>&1
Attaching out.txt.
from ojdkbuild.
On a second thought, can you post your git line endings settings? This is my local output:
> git config core.autocrlf
input
from ojdkbuild.
git config core.autocrlf
true
from ojdkbuild.
So you have all local files checked out with CRLF
endings. Changing core.autocrlf
to input
or false
should solve it. But true
is also supposed to work, at least to not break on configure-and-make.sh
file as this file should always be converted to LF
endings during the build. Let me re-check this.
BTW this also uncovers another issue that top-level build ignores jdk build return status and proceeds with creating ZIP/MSI. Going to fix this.
from ojdkbuild.
I deleted all files and reinstall(git clone). I'm not sure, but I executed this command:
git config --global core.autocrlf input
Successful build!
from ojdkbuild.
Re-checked this, scripts in jdk will be broken with core.autocrlf=true
. Workaround is not easy to add without touching global user git settings. Even if core.autocrlf
will be set in parent repo (ojdkbuild
) submodules will ignore it and will use global value. Workaround is probably possible with .gitattributes
, but I don't want to add attributes to modules repos. Added note about core.autocrlf
to readme instead.
Also fixed the bash exit code checking, now run.bat
will print OJDKBUILD_FINISH_SUCCESS
only on successful build. And if cmake
+ nmake
are used directly - nmake
should return correct non-zero exit code on error.
Closing the issue.
from ojdkbuild.
Getting similar error while try to build this on windows 10 x64. Setting git core.autocrlf
and re-clone repo (with re-download all stuff) doesn't help. Command line is running from administrator user.
Full error:
checking if we should bundle freetype... yes
checking for main in -ljpeg... yes
checking for which giflib to use... bundled
checking for compress in -lz... no
checking for which zlib to use... bundled
checking for cos in -lm... yes
checking for dlopen in -ldl... no
checking if elliptic curve crypto implementation is present... yes
checking for memory size... 24514 MB
checking for appropriate number of jobs to run in parallel... 1
checking whether to use sjavac... no
checking for ccache... no
configure: error: Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.
configure exiting with result code 1
+ '[' OFF == OFF ']'
+ make images JAVAC_FLAGS=-g LOG=info
make: *** No rule to make target `images'. Stop.
+ exit 2
C:\mc_cl\runtime\ojdkbuild\build>if 0 NEQ 1 exit /b 1
NMAKE : fatal error U1077: 'C:/WINDOWS/System32\cmd.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\mc_cl\runtime\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\mc_cl\runtime\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\mc_cl\runtime\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
from ojdkbuild.
Thanks, chmod
helps a lot, now the compilation is successful.
P.S. Last time I already run PowerShell or even tested with default CMD with administrator privileges.
from ojdkbuild.
Update to my last comment: We now tried to reset Windows10 to a "clean" environment in that we performed the following steps:
- Uninstalling old, unrelated CMake and MSYS2 installations from the system.
- Moving the build directory from
C:\javaws-alt\ojdkbuild
to the user home:C:\Users\username\ojdkbuild
and cloning the ojdkbuild repo again (with core.autocrlf still being set to false). - Rebooting the machine (which conincidentally also installed Windows updates).
Now the build works (or at least: it builds way further than on the last try; at the time of writing this, it is still building). We still don't know which of the above actions led to success, but our best guess about why it did not work is: the company-wide mandatory virus scanner (McAffe) was hindering us, blocking file access outside the user home in some circumstances. So, if this indeed was the root problem, the solution would be moving the build directory into the user home.
from ojdkbuild.
Hi, yes, these Cygwin files permissions are quite brittle.
What usually works for me about them:
-
Build using Administrator account
-
On non-Administrator -
chmod -R 777
in Cygwin shell may help -
Don't touch jdk file with from any Unix-like shells or tools (MSYS, Cygwin etc) except the version of Cygwin that is included with ojdkbuild
-
Do not use any Cygwin tools (especially git) except the ones included with ojdkbuild (that are neccessary for build to run)
PS: if you are building jdk8 - there is a major change to build files (dropping all bash and batch scripting and some other changes) that is going to be integrated in some days (it should not affect resulting bits).
from ojdkbuild.
This is not fixing the problem.
I have entered
D:\test\ojdkbuild\tools\cygwin\Cygwin.bat
D:\test\ojdkbuild\tools\cygwin64\Cygwin.bat
on both i did:
kadir@DESKTOP-BNO1KE2:/mnt/d/test$ sudo chmod -R 777 ojdkbuild
kadir@DESKTOP-BNO1KE2:/mnt/d/test$ cd /mnt/d/test/ojdkbuild/lookaside/java-1.8.0-openjdk
kadir@DESKTOP-BNO1KE2:/mnt/d/test/ojdkbuild/lookaside/java-1.8.0-openjdk$ stat -c '%a' LICENSE
777
kadir@DESKTOP-BNO1KE2:/mnt/d/test/ojdkbuild/lookaside/java-1.8.0-openjdk$
it says 777 for all files
kadir@DESKTOP-BNO1KE2:/mnt/d/test/ojdkbuild/lookaside/java-1.8.0-openjdk$ stat -c '%a' *
777
777
777
777
777
777
777
777
777
777
777
777
777
777
777
777
777
777
kadir@DESKTOP-BNO1KE2:/mnt/d/test/ojdkbuild/lookaside/java-1.8.0-openjdk$
But i entered x64 Native Tools Command Prompt ( Run as Administrator )
hecking for cos in -lm... yes
checking for dlopen in -ldl... no
configure: Found msvcr100.dll at D:/test/ojdkbuild/src/java-1.8.0-openjdk/../../tools/toolchain/msvcr100/amd64/msvcr100.dll using --with-msvcr-dll
checking found msvcr100.dll architecture... ok
configure: Rewriting MSVC_DLL to "/cygdrive/d/test/ojdkbuild/tools/toolchain/msvcr100/amd64/msvcr100.dll"
checking for msvcr100.dll... /cygdrive/d/test/ojdkbuild/tools/toolchain/msvcr100/amd64/msvcr100.dll
checking if elliptic curve crypto implementation is present... yes
checking for memory size... 130979 MB
checking for appropriate number of jobs to run in parallel... 1
checking whether to use sjavac... no
checking is ccache enabled... no
configure: error: Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.
configure exiting with result code 1
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'D:\test\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'D:\test\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'D:\test\ojdkbuild\tools\toolchain\vs2010e\VC\Bin\nmake.exe' : return code '0x2'
Stop.
from ojdkbuild.
If you want just to build OpenJDK 8 for windows and don't need OpenJFX and installer, the following should be the easiest way:
-
Install MSVS 2013 - direct download link
-
install Cygwin including
binutils
,make
,m4
,cpio
,awk
,file
,zip
,unzip
,procps
-
get FreeType sources (2.8.1 works for sure)
-
get jdk8u sources (with all subrepos)
-
run from plain
cmd.exe
:
cd jdk8u
set PATH=path/to/cygwin/bin;%PATH%
bash configure --with-boot-jdk=path/to/jdk8bin --with-freetype-src=path/to/freetype2
bash -c "make images LOG=info"
Binaries will go into build/windows-x86_64-normal-server-release/images/j2sdk-image
.
For customization options see configure call here.
Hope this helps.
from ojdkbuild.
Related Issues (20)
- Automatically link Jar file accociation in installer HOT 2
- When will jdk8u282 be released? HOT 7
- OpenJDK 8 fatal error on building HOT 7
- Proxy (WPAD) with Java Web Start (iced tea web) HOT 3
- Build JRE HOT 5
- JavaFX webkit error with version 610.1 HOT 2
- Unable to install latest version in W10 HOT 3
- java-1.8.0-openjdk-1.8.0.302-1.b08 --> x64 version is missing HOT 3
- OpenSSL 1.1 support for Java 1.8.0? HOT 3
- Unable to compile HOT 4
- OpenJDK 8u312 (question) HOT 3
- Failure when building OpenJDK17 HOT 2
- OpenJDK 8u322-GA Question HOT 4
- 深入理解java虚拟机第三版有问 HOT 1
- ojdkbuild OpenJDK Latest Version? HOT 1
- Java Floating Point Arithmetic and StrictMath Method Denormal and Pronormal Error Correction HOT 1
- Important Java Questions, and Active Reply!
- Active Reply to Java Serious Bug Problem? HOT 4
- Where the build project under openjdk offical organize? HOT 2
- When 8u342 will be released? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ojdkbuild.