-
Notifications
You must be signed in to change notification settings - Fork 108
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
Windows build - warning treated as error, causing the build to fail #2884
Comments
I don't see this on my system. What does
|
This is my cl output:
|
That's VS 2015. What happens if you use For another issue, in CI/CD we only test with VS2019. It should at least be 2022. I'll file a separate issue for that. |
I went ahead and updated to using VS 2022. Now the build gets to 97%, but I'm seeing what looks like a separate issue. Is it possible this is a path/filename length problem? (please see https://stackoverflow.com/questions/34074925/vs-2015-cannot-open-compiler-generated-file-invalid-argument): [ 97%] Building C object unit_test/fuzzing/test_requester/test_spdm_requester_get_measurement_extension_log/CMakeFiles/test_spdm_requester_get_measurement_extension_log.dir///spdm_unit_fuzzing_common/common.c.obj |
Reducing the number of levels in my directory hierarchy fixed this. I'll close this issue. Thanks for your help with the earlier issue, Steven; I really appreciate your responsiveness. |
I'm building with the following commands in a batch script:
git clone https://github.com/DMTF/libspdm.git libspdm
cd libspdm
git submodule update --init
git submodule update
mkdir build
cd build
cmake -G"NMake Makefiles" -DARCH=x64 -DTOOLCHAIN=VS2022 -DTARGET=Debug -DCRYPTO=openssl ..
nmake copy_sample_key
nmake
...
[ 53%] Building C object library/spdm_requester_lib/CMakeFiles/spdm_requester_lib.dir/libspdm_req_encap_request.c.obj
libspdm_req_encap_request.c
E:\dheinen\libspdm\library\spdm_requester_lib\libspdm_req_encap_request.c(23): error C2220: warning treated as error - no 'object' file generated
E:\dheinen\libspdm\library\spdm_requester_lib\libspdm_req_encap_request.c(23): warning C4054: 'type cast': from function pointer 'const libspdm_get_encap_response_func' to data pointer 'void *'
E:\dheinen\libspdm\library\spdm_requester_lib\libspdm_req_encap_request.c(96): warning C4055: 'type cast': from data pointer 'void *' to function pointer 'libspdm_get_encap_response_func'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
I've tried passing --compile-no-warning-as-error to the cmake command, but this doesn't fix the issue. Is there a best known method for turning off this warning -> error behavior? My apologies if I missed something in the documentation.
The text was updated successfully, but these errors were encountered: