Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

No rule to make target `images'. Stop. #12

Closed
3-keys opened this issue Feb 26, 2017 · 16 comments
Closed

No rule to make target `images'. Stop. #12

3-keys opened this issue Feb 26, 2017 · 16 comments

Comments

@3-keys
Copy link

3-keys commented Feb 26, 2017

When run the step "make images JAVAC_FLAGS=-g LOG=info."

It shows make: *** No rule to make target `images'. Stop.

How to fix it?

@ojdkbuild
Copy link
Owner

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)?

@1061911
Copy link

1061911 commented Feb 26, 2017

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

@ojdkbuild
Copy link
Owner

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.

@ojdkbuild
Copy link
Owner

On a second thought, can you post your git line endings settings? This is my local output:

> git config core.autocrlf
input

@1061911
Copy link

1061911 commented Feb 26, 2017

git config core.autocrlf
true

@ojdkbuild
Copy link
Owner

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.

@1061911
Copy link

1061911 commented Feb 26, 2017

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!

@ojdkbuild
Copy link
Owner

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.

@Draiget
Copy link

Draiget commented Jan 21, 2018

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.

@ojdkbuild
Copy link
Owner

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.

@Draiget
Copy link

Draiget commented Jan 21, 2018

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.

@orithena
Copy link

@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.

@orithena
Copy link

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.

@ojdkbuild
Copy link
Owner

Hi, yes, these Cygwin files permissions are quite brittle.

What usually works for me about them:

  1. Build using Administrator account

  2. On non-Administrator - chmod -R 777 in Cygwin shell may help

  3. 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

  4. 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).

@eix128
Copy link

eix128 commented Mar 23, 2020

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.

@ojdkbuild
Copy link
Owner

If you want just to build OpenJDK 8 for windows and don't need OpenJFX and installer, the following should be the easiest way:

  1. Install MSVS 2013 - direct download link

  2. install Cygwin including binutils, make, m4, cpio, awk, file, zip, unzip, procps

  3. get FreeType sources (2.8.1 works for sure)

  4. get jdk8u sources (with all subrepos)

  5. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants