mojohaus / maven-native

https://www.mojohaus.org/maven-native/
MIT License
18 stars 12 forks source link

master@maven-native does not build on Windows 10 with VS2017: 8 failed tests #29

Closed zosrothko closed 2 years ago

zosrothko commented 5 years ago

Hello

Just cloned the master branch of maven-native on Windows10 and it does not build

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.codehaus.mojo.natives.c.CCompilerClassicTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.044 sec <<< FAILURE! - in org.codehaus.mojo.natives.c.CCompilerClassicTest
testSimpleCompilation(org.codehaus.mojo.natives.c.CCompilerClassicTest)  Time elapsed: 0.021 sec  <<< FAILURE!
org.junit.internal.ArrayComparisonFailure: arrays first differed at element [0]; expected:<[gcc]> but was:<[cmd.exe]>
        at org.codehaus.mojo.natives.c.CCompilerClassicTest.testSimpleCompilation(CCompilerClassicTest.java:25)
Caused by: org.junit.ComparisonFailure: expected:<[gcc]> but was:<[cmd.exe]>
        at org.codehaus.mojo.natives.c.CCompilerClassicTest.testSimpleCompilation(CCompilerClassicTest.java:25)

Running org.codehaus.mojo.natives.c.CCompilerTest
Tests run: 7, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE! - in org.codehaus.mojo.natives.c.CCompilerTest
testEndOptions(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=13 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testEndOptions(CCompilerTest.java:124)

testSystemIncludePaths(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=9 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testSystemIncludePaths(CCompilerTest.java:88)

testSimpleCompilation(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=5 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testSimpleCompilation(CCompilerTest.java:35)

testStartOptions(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=7 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testStartOptions(CCompilerTest.java:56)

testNonDefaultExecutable(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=5 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testNonDefaultExecutable(CCompilerTest.java:44)

testIncludePaths(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=7 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testIncludePaths(CCompilerTest.java:70)

testMiddleOptions(org.codehaus.mojo.natives.c.CCompilerTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: array lengths differed, expected.length=11 actual.length=4
        at org.codehaus.mojo.natives.c.CCompilerTest.testMiddleOptions(CCompilerTest.java:105)

Running org.codehaus.mojo.natives.c.CLinkerTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.codehaus.mojo.natives.c.CLinkerTest

Results :

Failed tests:
  CCompilerClassicTest.testSimpleCompilation:25 arrays first differed at element [0]; expected:<[gcc]> but was:<[cmd.exe]>
  CCompilerTest.testEndOptions:124 array lengths differed, expected.length=13 actual.length=4
  CCompilerTest.testIncludePaths:70 array lengths differed, expected.length=7 actual.length=4
  CCompilerTest.testMiddleOptions:105 array lengths differed, expected.length=11 actual.length=4
  CCompilerTest.testNonDefaultExecutable:44 array lengths differed, expected.length=5 actual.length=4
  CCompilerTest.testSimpleCompilation:35 array lengths differed, expected.length=5 actual.length=4
  CCompilerTest.testStartOptions:56 array lengths differed, expected.length=7 actual.length=4
  CCompilerTest.testSystemIncludePaths:88 array lengths differed, expected.length=9 actual.length=4

Tests run: 15, Failures: 8, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Maven Native 1.0-alpha-11-SNAPSHOT ................. SUCCESS [  4.901 s]
[INFO] Maven Native API ................................... SUCCESS [  5.760 s]
[INFO] Maven Native Components ............................ SUCCESS [  1.463 s]
[INFO] Maven Native Components Manager .................... SUCCESS [  0.535 s]
[INFO] Maven Native Javah ................................. SUCCESS [  0.977 s]
[INFO] Maven Native C/C++ ................................. FAILURE [  1.038 s]
[INFO] Maven Native BCC ................................... SKIPPED
[INFO] Maven Native MSVC .................................. SKIPPED
[INFO] Maven Native MinGW ................................. SKIPPED
[INFO] Native Maven Plugin 1.0-alpha-11-SNAPSHOT .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.554 s
[INFO] Finished at: 2019-03-15T09:51:55+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project maven-native-generic-c: There are test failures.
[ERROR]
[ERROR] Please refer to Z:\MXW\TOOL\maven-native\maven-native-components\maven-native-generic-c\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :maven-native-generic-c
buzz3791 commented 2 years ago

Getting the same problem. Did anyone resolve this issue already?

Since I'm running this maven build on a Windows machine, seems like maven-native-generic-c shouldn't be looking for gcc or is maven-native-generic-c even expected to build on Windows?

buzz3791 commented 2 years ago

Pull request #38 fixes the JUnit tests failures breaking the build on Windows.