Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compile fails for openjdk && system on Windows #342

Open
j-braley opened this issue Aug 9, 2022 · 2 comments
Open

make compile fails for openjdk && system on Windows #342

j-braley opened this issue Aug 9, 2022 · 2 comments

Comments

@j-braley
Copy link

j-braley commented Aug 9, 2022

After installing aqa-tests and running ./compile.sh or make compile (in TKG/) make exits with Error 2.
The specific stage where I am observing these failures is the call to /TKG/scripts/getFileWithRetry.sh and the error is No such file or directory

Steps to reproduce:

  1. Launch up Cygwin
  2. Export env vars
  3. Clone aqa-tests
  4. Run ./get.sh
  5. Run ./compile.sh

Expected that make completes with no error.
Actual make exits with error code 2.
Output below from running BUILD_LIST=openjdk but I have seen failures for system as well.


$ export TEST_JDK_HOME=/path/to/my/test/jdk
$ export TESTIMAGE_PATH=/path/to/test/image
$ export JDK_VERSION=11
$ export USE_TESTENV_PROPERTIES=true
$ export BUILD_LIST=openjdk

$ ./get.sh
TESTDIR: /home/joebraley/test-breakage/aqa-tests
load ./testenv/testenv.properties
get testKitGen...
git clone -q https://github.com/adoptium/TKG.git
git rev-parse v0.9.3
git checkout -q -f f614fc5ebe681000911571945fe59f85665ef40c
check adoptium repo and TKG repo SHA
/home/joebraley/test-breakage/aqa-tests/TKG/scripts/getSHA.sh --repo_dir /home/joebraley/test-breakage/aqa-tests --output_file /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
Check sha in /home/joebraley/test-breakage/aqa-tests and store the info in /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
touch /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
================================================
timestamp: 20220809-164630
repo dir: /home/joebraley/test-breakage/aqa-tests
git repo:
  Fetch URL: https://github.com/adoptium/aqa-tests.git
sha:
fdc28ada41889a73adf8bb5eabcd15d9c058df06
/home/joebraley/test-breakage/aqa-tests/TKG/scripts/getTestenvProperties.sh --repo_dir /home/joebraley/test-breakage/aqa-tests --output_file /home/joebraley/test-breakage/aqa-tests/testenv/testenv.properties --repo_name ADOPTOPENJDK
USE_TESTENV_PROPERTIES was set, not writing to testenv.properties
/home/joebraley/test-breakage/aqa-tests/TKG/scripts/getSHA.sh --repo_dir /home/joebraley/test-breakage/aqa-tests/TKG --output_file /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
Check sha in /home/joebraley/test-breakage/aqa-tests/TKG and store the info in /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
================================================
timestamp: 20220809-164630
repo dir: /home/joebraley/test-breakage/aqa-tests/TKG
git repo:
  Fetch URL: https://github.com/adoptium/TKG.git
sha:
e0f44a36e8633d8324d70ad5e939e80a42c32d7e
/home/joebraley/test-breakage/aqa-tests/TKG/scripts/getTestenvProperties.sh --repo_dir /home/joebraley/test-breakage/aqa-tests/TKG --output_file /home/joebraley/test-breakage/aqa-tests/testenv/testenv.properties --repo_name TKG
USE_TESTENV_PROPERTIES was set, not writing to testenv.properties
get functional test material...
git clone --depth 1 -b v0.33.0-release https://github.com/eclipse-openj9/openj9.git
Cloning into 'openj9'...
remote: Enumerating objects: 11985, done.
remote: Counting objects: 100% (11985/11985), done.
remote: Compressing objects: 100% (7146/7146), done.
remote: Total 11985 (delta 5795), reused 5931 (delta 3922), pack-reused 0
Receiving objects: 100% (11985/11985), 19.45 MiB | 7.38 MiB/s, done.
Resolving deltas: 100% (5795/5795), done.
Updating files: 100% (10047/10047), done.
check OpenJ9 Repo sha
/home/joebraley/test-breakage/aqa-tests/TKG/scripts/getSHA.sh --repo_dir /home/joebraley/test-breakage/aqa-tests/openj9 --output_file /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
Check sha in /home/joebraley/test-breakage/aqa-tests/openj9 and store the info in /home/joebraley/test-breakage/aqa-tests/TKG/SHA.txt
================================================
timestamp: 20220809-164644
repo dir: /home/joebraley/test-breakage/aqa-tests/openj9
git repo:
  Fetch URL: https://github.com/eclipse-openj9/openj9.git
sha:
04a55b45b3a0d75813335fda0fb8703819690ee7
/home/joebraley/test-breakage/aqa-tests/TKG/scripts/getTestenvProperties.sh --repo_dir /home/joebraley/test-breakage/aqa-tests/openj9 --output_file /home/joebraley/test-breakage/aqa-tests/testenv/testenv.properties --repo_name OPENJ9
USE_TESTENV_PROPERTIES was set, not writing to testenv.properties


$ ./compile.sh
./compile.sh: line 22: [: ==: unary operator expected
./compile.sh: line 22: [: ==: unary operator expected
Set values based on ./testenv/testenv.properties:
TKG_REPO=https://github.com/adoptium/TKG.git
TKG_BRANCH=v0.9.3
OPENJ9_REPO=https://github.com/eclipse-openj9/openj9.git
OPENJ9_BRANCH=v0.33.0-release
STF_REPO=https://github.com/adoptium/STF.git
STF_BRANCH=v0.9.3
OPENJ9_SYSTEMTEST_REPO=https://github.com/eclipse-openj9/openj9-systemtest.git
OPENJ9_SYSTEMTEST_BRANCH=openj9-0.33.0
ADOPTOPENJDK_SYSTEMTEST_REPO=https://github.com/adoptium/aqa-systemtest.git
ADOPTOPENJDK_SYSTEMTEST_BRANCH=v0.9.3
JDK8_REPO=https://github.com/adoptium/jdk8u.git
JDK8_BRANCH=jdk8u342-b07
JDK11_REPO=https://github.com/adoptium/jdk11u.git
JDK11_BRANCH=jdk-11.0.16+8
JDK17_REPO=https://github.com/adoptium/jdk17u.git
JDK17_BRANCH=jdk-17.0.4+8
JDK18_REPO=https://github.com/adoptium/jdk18u.git
JDK18_BRANCH=jdk-18.0.2+9
JDK8_OPENJ9_REPO=https://github.com/ibmruntimes/openj9-openjdk-jdk8.git
JDK8_OPENJ9_BRANCH=v0.33.0-release
JDK11_OPENJ9_REPO=https://github.com/ibmruntimes/openj9-openjdk-jdk11.git
JDK11_OPENJ9_BRANCH=v0.33.0-release
JDK17_OPENJ9_REPO=https://github.com/ibmruntimes/openj9-openjdk-jdk17.git
JDK17_OPENJ9_BRANCH=v0.33.0-release
JDK18_OPENJ9_REPO=https://github.com/ibmruntimes/openj9-openjdk-jdk18.git
JDK18_OPENJ9_BRANCH=v0.33.0-release
AQA_REQUIRED_TARGETS=sanity.functional,extended.functional,special.functional,sanity.openjdk,extended.openjdk,sanity.system,extended.system,sanity.perf,extended.perf

JDK_REPO=https://github.com/adoptium/jdk11u.git
JDK_BRANCH=jdk-11.0.16+8
JAVA_HOME is set to C:/Users/joebraley/Artifacts/AQABinaries-July2022PSU/JDK11/Windows/windows_binaries/windows_binaries/microsoft-jdk-11.0.16-windows-x64/jdk-11.0.16+8
rm -f -r /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/output_compilation; \
mkdir -p /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/output_compilation; \
(ant -f ./scripts/build_tools.xml -DTEST_JDK_HOME=C:/Users/joebraley/Artifacts/AQABinaries-July2022PSU/JDK11/Windows/windows_binaries/windows_binaries/microsoft-jdk-11.0.16-windows-x64/jdk-11.0.16+8 -DTEST_ROOT=/home/joebraley/test-breakage/aqa-tests/TKG/.. 2>&1; echo $? ) | tee "/home/joebraley/test-breakage/aqa-tests/TKG/../TKG/output_compilation/compilation.log"; \
if [ -z "$(tail -1 /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/output_compilation/compilation.log | grep 0)" ]; then perl scripts/moveDmp.pl --compileLogPath="/home/joebraley/test-breakage/aqa-tests/TKG/../TKG/output_compilation/compilation.log" --testRoot="/home/joebraley/test-breakage/aqa-tests/TKG/.."; false; else rm -f -r "/home/joebraley/test-breakage/aqa-tests/TKG/../TKG/output_compilation"; fi
Buildfile: C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\scripts\build_tools.xml

build:

clean:

init:
    [mkdir] Created dir: C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\bin

getDependentLibs:
     [exec] /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/lib does not exist, creating one.
     [exec] mkdir /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/lib
     [exec] --------------------------------------------
     [exec] path is set to /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/lib
     [exec] task is set to default
     [exec] dependencyList is set to json_simple
     [exec] --------------------------------------------
     [exec] Starting download third party dependent jars
     [exec] --------------------------------------------
     [exec] downloading dependent third party jars to /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/lib
     [exec] downloading https://repo1.maven.org/maven2/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
     [exec] --> file downloaded to /home/joebraley/test-breakage/aqa-tests/TKG/../TKG/lib/json-simple.jar
     [exec] downloaded dependent third party jars successfully

compile:
     [echo] Ant version is Apache Ant(TM) version 1.10.12 compiled on October 13 2021
     [echo] ============COMPILER SETTINGS============
     [echo] ===fork:                         yes
     [echo] ===debug:                        on
    [javac] Compiling 27 source files to C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\bin

dist:
      [jar] Building jar: C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\bin\TestKitGen.jar

BUILD SUCCESSFUL
Total time: 3 seconds
0
C:/Users/joebraley/Artifacts/AQABinaries-July2022PSU/JDK11/Windows/windows_binaries/windows_binaries/microsoft-jdk-11.0.16-windows-x64/jdk-11.0.16+8/bin/java -cp ./bin/TestKitGen.jar org.openj9.envInfo.EnvDetector
System.getProperty('java.vm.name')=OpenJDK 64-Bit Server VM

System.getProperty('java.vendor')=Microsoft

Warning: cannot determine vendor, use System.getProperty('java.vendor')=Microsoft directly.

System.getProperty('os.name')=Windows 11

System.getProperty('os.arch')=amd64

System.getProperty('java.fullversion')=null

System.getProperty('sun.arch.data.model')=64

****************************** MACHINE INFO ******************************
uname : CYGWIN_NT-10.0-22000 joebraley-work 3.3.5-341.x86_64 2022-05-13 12:27 UTC x86_64 Cygwin
cpuCores : 16
sysArch : x86_64
procArch : unknown
sysOS : CYGWIN_NT-10.0-22000
ulimit :
        core file size          (blocks, -c) 0
        data seg size           (kbytes, -d) unlimited
        scheduling priority             (-e) 0
        file size               (blocks, -f) unlimited
        pending signals                 (-i) 63393
        max locked memory       (kbytes, -l) 64
        max memory size         (kbytes, -m) unlimited
        open files                      (-n) 1024
        pipe size            (512 bytes, -p) 8
        POSIX message queues     (bytes, -q) 819200
        real-time priority              (-r) 0
        stack size              (kbytes, -s) 8192
        cpu time               (seconds, -t) unlimited
        max user processes              (-u) 63393
        virtual memory          (kbytes, -v) unlimited
        file locks                      (-x) unlimited
antVersion : Apache Ant(TM) version 1.10.12 compiled on October 13 2021
makeVersion :
        GNU Make 4.2.1
        Built for x86_64-pc-linux-gnu
        Copyright (C) 1988-2016 Free Software Foundation, Inc.
        License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
        This is free software: you are free to change and redistribute it.
        There is NO WARRANTY, to the extent permitted by law.
perlVersion :

        This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
        (with 50 registered patches, see perl -V for more detail)

        Copyright 1987-2019, Larry Wall

        Perl may be copied only under the terms of either the Artistic License or the
        GNU General Public License, which may be found in the Perl 5 source kit.

        Complete documentation for Perl, including FAQ lists, should be found on
        this system using "man perl" or "perldoc perl".  If you have access to the
        Internet, point your browser at http://www.perl.org/, the Perl Home Page.

curlVersion :
        curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
        Release-Date: 2020-01-08
        Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
        Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
vmVendor : Oracle Corporation
vmVersion : 11.0.16+8-LTS
Total Physical Memory Size : 34052562944
Free Physical Memory Size : 14279131136
File path : C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG
Total space (bytes) : 509722226688
Free space (bytes) : 219668635648
Usable space (bytes) : 219668635648
**************************************************************************

make -f clean.mk cleanBuild
make[1]: Entering directory '/home/joebraley/test-breakage/aqa-tests/TKG'
rm -f -r C:/cygwin64/home/joebraley/test-breakage/aqa-tests///..//jvmtest
make[1]: Leaving directory '/home/joebraley/test-breakage/aqa-tests/TKG'
make -f compile.mk compile
make[1]: Entering directory '/home/joebraley/test-breakage/aqa-tests/TKG'
rm -f -r C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/output_compilation; \
mkdir -p C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/output_compilation; \
(ant -f scripts/build_test.xml -DTEST_ROOT=C:/cygwin64/home/joebraley/test-breakage/aqa-tests/ -DBUILD_ROOT=C:/cygwin64/home/joebraley/test-breakage/aqa-tests///..//jvmtest -DJDK_VERSION=11 -DJDK_IMPL=hotspot -DJCL_VERSION=latest -DBUILD_LIST=openjdk -DRESOURCES_DIR=C:/cygwin64/home/joebraley/test-breakage/aqa-tests///..//jvmtest/TestConfig/resources -DSPEC=win_x86-64 -DTEST_JDK_HOME=C:/Users/joebraley/Artifacts/AQABinaries-July2022PSU/JDK11/Windows/windows_binaries/windows_binaries/microsoft-jdk-11.0.16-windows-x64/jdk-11.0.16+8 -DJVM_VERSION=openjdk11 -DLIB_DIR=C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/lib  2>&1; echo $? ) | tee "C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/output_compilation/compilation.log"; \
if [ -z "$(tail -1 C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/output_compilation/compilation.log | grep 0)" ]; then perl scripts/moveDmp.pl --compileLogPath="C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/output_compilation/compilation.log" --testRoot="C:/cygwin64/home/joebraley/test-breakage/aqa-tests/"; false; else rm -f -r "C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/output_compilation"; fi
Buildfile: C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\scripts\build_test.xml
     [echo]  build.list is TestConfig/build.xml,openjdk/build.xml

-create_test_directory:
    [mkdir] Created dir: C:\cygwin64\home\joebraley\test-breakage\jvmtest

stage_test_material:
     [copy] Copying 107 files to C:\cygwin64\home\joebraley\test-breakage\jvmtest

build:

init:
    [mkdir] Created dir: C:\cygwin64\home\joebraley\test-breakage\jvmtest\TestConfig

build:
     [copy] Copying 11 files to C:\cygwin64\home\joebraley\test-breakage\jvmtest\TestConfig
     [copy] Copied 4 empty directories to 2 empty directories under C:\cygwin64\home\joebraley\test-breakage\jvmtest\TestConfig
     [copy] Copying 1 file to C:\cygwin64\home\joebraley\test-breakage\jvmtest\TestConfig

build:

getDependentLibs:
     [exec] --------------------------------------------
     [exec] path is set to C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/lib
     [exec] task is set to default
     [exec] dependencyList is set to jtreg_5_1_b01
     [exec] --------------------------------------------
     [exec] Starting download third party dependent jars
     [exec] --------------------------------------------
     [exec] downloading dependent third party jars to C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/lib
     [exec] downloading https://ci.adoptopenjdk.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg5.1-b01.tar.gz.sha256sum.txt
     [exec] --> file downloaded to C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/lib/jtreg_5_1_b01.tar.gz.sha256sum.txt
     [exec] downloading https://ci.adoptopenjdk.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg5.1-b01.tar.gz
     [exec] --> file downloaded to C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/lib/jtreg_5_1_b01.tar.gz
     [exec] downloading https://ci.adoptopenjdk.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg5.1-b01.tar.gz.sha256sum.txt
     [exec] --> file downloaded to C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/lib/jtreg_5_1_b01.tar.gz.sha256sum.txt
     [exec] downloaded dependent third party jars successfully

getJtreg:
    [mkdir] Created dir: C:\cygwin64\home\joebraley\test-breakage\jvmtest\openjdk
     [copy] Copying 1 file to C:\cygwin64\home\joebraley\test-breakage\aqa-tests\openjdk

openjdk-jdk.check:

getOpenjdk:
     [echo]  Using user specified repo and branch
     [exec] /bin/bash: C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/scripts/getFileWithRetry.sh: No such file or directory

BUILD FAILED
C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\scripts\build_test.xml:95: The following error occurred while executing this line:
C:\cygwin64\home\joebraley\test-breakage\aqa-tests\openjdk\build.xml:315: The following error occurred while executing this line:
C:\cygwin64\home\joebraley\test-breakage\aqa-tests\openjdk\build.xml:148: The following error occurred while executing this line:
C:\cygwin64\home\joebraley\test-breakage\aqa-tests\TKG\scripts\build_test.xml:128: exec returned: 127

Total time: 7 seconds
1
make[1]: *** [compile.mk:45: compile] Error 1
make[1]: Leaving directory '/home/joebraley/test-breakage/aqa-tests/TKG'
make: *** [makefile:67: compile] Error 2

Let me know if more information is needed! Or if I missed a step somewhere.

@zdtsw
Copy link
Contributor

zdtsw commented Aug 12, 2022

I think this is one related to adoptium/run-aqa#133 (not sure it should be reported in run-aqa repo or not, can move it here) .
Mainly, my guess is the windows version cause cygwin did not take cygpath to cover C:/cygwin64/home/joebraley/test-breakage/aqa-tests//TKG/scripts/getFileWithRetry.sh (did a bit test, it is not only this getFileWithRetry.sh but all other shell script swhich are used as macro have exactly the same problem)

@joe-braley
Copy link

Issue here might stem from WSL and Cygwin being installed on the agent/machine. I seem to notice that when certain bash commands are ran they are using wsl pathing and not cygwin pathing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants