Today as I was to change the default compiler at Oracle to VS2019, I discovered this rather new compiler error in jpackage.
[2020-04-30T23:20:09,367Z] cl : Command line warning D9025 : overriding '/MD' with '/MT'
[2020-04-30T23:24:34,758Z] make[2]: INTERNAL: Exiting with 12 jobserver tokens available; should be 16!
[2020-04-30T23:24:34,805Z]
[2020-04-30T23:24:34,805Z] ERROR: Build failed for target 'default (product-bundles test-bundles static-libs-bundles)' in configuration 'windows-x64-open' (exit code 2)
[2020-04-30T23:24:35,414Z]
[2020-04-30T23:24:35,414Z] === Output from failing command(s) repeated here ===
[2020-04-30T23:24:35,461Z] * For target support_native_jdk.incubator.jpackage_libjpackage_JniUtils.obj:
[2020-04-30T23:24:35,539Z] JniUtils.cpp
[2020-04-30T23:24:35,539Z] c:\ade\mesos\work_dir\jib-ma~1\install\jpg\infra\buildd~1\devkit~1\vs2019~1.0\devkit~1.gz\vc\include\memory(1872): error C2451: conditional expression of type '_Ty2' is illegal
[2020-04-30T23:24:35,539Z] with
[2020-04-30T23:24:35,539Z] [
[2020-04-30T23:24:35,539Z] _Ty2=jni::JniObjWithEnv
[2020-04-30T23:24:35,539Z] ]
[2020-04-30T23:24:35,539Z] c:\ade\mesos\work_dir\jib-ma~1\install\jpg\infra\buildd~1\devkit~1\vs2019~1.0\devkit~1.gz\vc\include\memory(1872): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
[2020-04-30T23:24:35,539Z] c:\ade\mesos\work_dir\jib-ma~1\install\jpg\infra\buildd~1\devkit~1\vs2019~1.0\devkit~1.gz\vc\include\memory(1871): note: while compiling class template member function 'std::unique_ptr<jni::JniObjWithEnv,jni::JniObjWithEnv::LocalRefDeleter>::~unique_ptr(void) noexcept'
[2020-04-30T23:24:35,539Z] ./open/src/jdk.incubator.jpackage/windows/native/libjpackage/JniUtils.cpp(74): note: see reference to function template instantiation 'std::unique_ptr<jni::JniObjWithEnv,jni::JniObjWithEnv::LocalRefDeleter>::~unique_ptr(void) noexcept' being compiled
[2020-04-30T23:24:35,539Z] ./open/src/jdk.incubator.jpackage/windows/native/libjpackage/JniUtils.cpp(74): note: see reference to class template instantiation 'std::unique_ptr<jni::JniObjWithEnv,jni::JniObjWithEnv::LocalRefDeleter>' being compiled
[2020-04-30T23:20:09,367Z] cl : Command line warning D9025 : overriding '/MD' with '/MT'
[2020-04-30T23:24:34,758Z] make[2]: INTERNAL: Exiting with 12 jobserver tokens available; should be 16!
[2020-04-30T23:24:34,805Z]
[2020-04-30T23:24:34,805Z] ERROR: Build failed for target 'default (product-bundles test-bundles static-libs-bundles)' in configuration 'windows-x64-open' (exit code 2)
[2020-04-30T23:24:35,414Z]
[2020-04-30T23:24:35,414Z] === Output from failing command(s) repeated here ===
[2020-04-30T23:24:35,461Z] * For target support_native_jdk.incubator.jpackage_libjpackage_JniUtils.obj:
[2020-04-30T23:24:35,539Z] JniUtils.cpp
[2020-04-30T23:24:35,539Z] c:\ade\mesos\work_dir\jib-ma~1\install\jpg\infra\buildd~1\devkit~1\vs2019~1.0\devkit~1.gz\vc\include\memory(1872): error C2451: conditional expression of type '_Ty2' is illegal
[2020-04-30T23:24:35,539Z] with
[2020-04-30T23:24:35,539Z] [
[2020-04-30T23:24:35,539Z] _Ty2=jni::JniObjWithEnv
[2020-04-30T23:24:35,539Z] ]
[2020-04-30T23:24:35,539Z] c:\ade\mesos\work_dir\jib-ma~1\install\jpg\infra\buildd~1\devkit~1\vs2019~1.0\devkit~1.gz\vc\include\memory(1872): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
[2020-04-30T23:24:35,539Z] c:\ade\mesos\work_dir\jib-ma~1\install\jpg\infra\buildd~1\devkit~1\vs2019~1.0\devkit~1.gz\vc\include\memory(1871): note: while compiling class template member function 'std::unique_ptr<jni::JniObjWithEnv,jni::JniObjWithEnv::LocalRefDeleter>::~unique_ptr(void) noexcept'
[2020-04-30T23:24:35,539Z] ./open/src/jdk.incubator.jpackage/windows/native/libjpackage/JniUtils.cpp(74): note: see reference to function template instantiation 'std::unique_ptr<jni::JniObjWithEnv,jni::JniObjWithEnv::LocalRefDeleter>::~unique_ptr(void) noexcept' being compiled
[2020-04-30T23:24:35,539Z] ./open/src/jdk.incubator.jpackage/windows/native/libjpackage/JniUtils.cpp(74): note: see reference to class template instantiation 'std::unique_ptr<jni::JniObjWithEnv,jni::JniObjWithEnv::LocalRefDeleter>' being compiled
- blocks
-
JDK-8244214 Change to VS2019 for building on Windows at Oracle
- Resolved
- relates to
-
JDK-8236129 Exe installers have wrong properties
- Resolved
-
JDK-8303227 JniObjWithEnv should be NullablePointer compliant
- Resolved