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

Build failed on Windows #105

Closed
Intelligent2013 opened this issue Jan 31, 2022 · 5 comments
Closed

Build failed on Windows #105

Intelligent2013 opened this issue Jan 31, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Intelligent2013
Copy link
Contributor

From https://github.com/metanorma/mnconvert/runs/5005153987?check_suite_focus=true:

D:\a\mnconvert\mnconvert>mvn -DinputMNXML=tests/mn-samples-iso/documents/international-standard/rice-en.cd.xml --settings settings.xml test surefire-report:report
'ice-en.cd.xml' is not recognized as an internal or external command,
operable program or batch file.
make: *** [Makefile:66: testMN2STS] Error 1
@Intelligent2013 Intelligent2013 added the bug Something isn't working label Jan 31, 2022
@Intelligent2013 Intelligent2013 self-assigned this Jan 31, 2022
@Intelligent2013 Intelligent2013 moved this to Triage in Metanorma Jan 31, 2022
@Intelligent2013 Intelligent2013 moved this from Triage to In Progress in Metanorma Feb 1, 2022
@Intelligent2013
Copy link
Contributor Author

Locally on Windows 7 64-bit:

Makefile:36: *** multiple target patterns.  Stop.
where make
C:\ProgramData\chocolatey\bin\make.exe

@Intelligent2013
Copy link
Contributor Author

Very strange bug. Two month ago the stage 'testMN2STS' ended successfully on Windows:
https://github.com/metanorma/mnconvert/runs/4322412904?check_suite_focus=true

And ended successfully if jar pre-builded at standalone step:
https://github.com/metanorma/mnconvert/runs/5024741700?check_suite_focus=true

@Intelligent2013
Copy link
Contributor Author

The differences in make output:
from https://github.com/metanorma/mnconvert/runs/5024741700?check_suite_focus=true:

make
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    JAVA_HOME_8.0.322_x64: C:\hostedtoolcache\windows\jdk\8.0.322\x64
    JAVA_HOME: C:\hostedtoolcache\windows\jdk\8.0.322\x64
    JAVA_HOME_8_0_322_X64: C:\hostedtoolcache\windows\jdk\8.0.322\x64

from https://github.com/metanorma/mnconvert/runs/5025752781?check_suite_focus=true

 make createJar
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    JAVA_HOME_8.0.322_x64: C:\hostedtoolcache\windows\jdk\8.0.322\x64
    JAVA_HOME: C:\hostedtoolcache\windows\jdk\8.0.322\x64
    JAVA_HOME_8_0_322_X64: C:\hostedtoolcache\windows\jdk\8.0.322\x64
    TMPDIR: D:\a\_temp
    HOME: C:\Users\runneradmin
    MSYS2_PATH_TYPE: inherit
    MAKE: make.exe
    Path: C:\hostedtoolcache\windows\jdk\8.0.322\x64\bin;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS\;C:\tools\zstd;C:\Program Files\Mercurial\;C:\hostedtoolcache\windows\stack\2.7.3\x64;C:\cabal\bin;C:\\ghcup\bin;C:\tools\ghc-9.2.1\bin;C:\Program Files\dotnet;C:\mysql\bin;C:\Program Files\R\R-4.1.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\go\1.15.15\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.312-7\x64\bin;C:\npm\prefix;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\7\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.4\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;c:\tools\php;C:\Program Files (x86)\sbt\bin;C:\SeleniumWebDrivers\ChromeDriver\;C:\SeleniumWebDrivers\EdgeDriver\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Amazon\SessionManagerPlugin\bin\;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server\;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps
    ACLOCAL_PATH: /mingw64/share/aclocal:/usr/share/aclocal
    LANG: en_US.UTF-8
    MANPATH: /mingw64/share/man
    MINGW_CHOST: x86_64-w64-mingw32
    MINGW_PACKAGE_PREFIX: mingw-w64-x86_64
    MINGW_PREFIX: /mingw64
    MSYSTEM: MINGW64
    MSYSTEM_CARCH: x86_64
    MSYSTEM_CHOST: x86_64-w64-mingw32
    MSYSTEM_PREFIX: /mingw64
    PKG_CONFIG_PATH: /mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
    PROMPT: $P$G
    RI_DEVKIT: c:\msys64

It seems the different versions of the tool 'make' are using...

@Intelligent2013
Copy link
Contributor Author

Without Ruby installation:

where make
C:\ProgramData\Chocolatey\bin\make.exe

make -v
GNU Make 4.3
Built for Windows32
Copyright (C) 1988-2020 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.

With Ruby installation

      - if: matrix.os == 'windows-latest'
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
where make
Microsoft Windows [Version 10.0.17763.2458]
(c) 2018 Microsoft Corporation. All rights reserved.

D:\a\mnconvert\mnconvert>make -v
Microsoft Windows [Version 10.0.17763.2458]
(c) 2018 Microsoft Corporation. All rights reserved.

Notice on https://github.com/ruby/setup-ruby:

The PATH contains multiple compiler toolchains. Use where.exe to debug which tool is used

The similar issue ruby/setup-ruby#19 fixed two years ago.
Will investigate how to fix it...

Intelligent2013 added a commit that referenced this issue Feb 2, 2022
@Intelligent2013
Copy link
Contributor Author

Looks like Ruby installer replaces shell for Windows. Issue fixed by commenting

#SHELL := cmd

and not need conditions for Win:

ifeq ($(OS),Windows_NT)
	for /r %%f in ($(SRCRFCDIR)/*.xml) do java -jar target/$(JAR_FILE) $(SRCRFCDIR)/%%~nxf --output $(DESTDIR)/%%~nf.adoc
...

and

ifeq ($(OS),Windows_NT)
	xcopy documents $@\ /E
...

Repository owner moved this from In Progress to Done in Metanorma Feb 2, 2022
@ronaldtse ronaldtse removed this from Metanorma Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant