Azure-Kinect-Sensor-SDK icon indicating copy to clipboard operation
Azure-Kinect-Sensor-SDK copied to clipboard

Clean build not working. Error with libjpeg-turbo and NASM.

Open stevekiene opened this issue 7 years ago • 3 comments

VS 2019, latest NASM, build in VS doesn't work. Command line to nasm is buggered with cl.exe parameters /MTd /ZH:SHA_256 /D_CRT_SECURE_NO_WARNINGS and with an incorrectly parsed output directory (extern\libjpeg-turbo\src\simd\CMakeFiles\simd.dir\x86_64\jsimdcpu.asm.obj) which confuse NASM. I can build libjpeg-turbo separately just fine. I am pretty stupid on cmake so trying to get myself up to speed to provide better info. But if this is a known issue please close this one and I'll move on to other things.

stevekiene avatar Mar 23 '19 17:03 stevekiene

Thanks for reporting this issue. @williampMSFT was looking into this on Friday to try and fix this problem.

schultetwin1 avatar Mar 25 '19 16:03 schultetwin1

EDIT: Just re-read your message and realized you're reporting this issue for VS2019, not Ninja, which is a little different from what I was seeing. Will investigate.

@stevekiene the current mitigation for this is to use MSBuild instead of Ninja when building on Windows. It looks like the libjpeg-turbo code has MSBuild special-cased, which is why MSBuild works but not Ninja, and we're setting some compiler flags at the top level of the project in Windows (but not Linux) that CMake for some reason is passing to the assembler.

My CMake-fu is a bit weak, so I'm still trying to figure out what the magic incantation is to get it to not propagate C/C++ compiler flags to the assembler in Ninja, but still propagate those flags to the C/C++ compiler. I'm not entirely certain that it's possible to do this without patching libjpeg-turbo, but I'm hoping to avoid that if possible.

williampMSFT avatar Mar 26 '19 01:03 williampMSFT

@stevekiene this should now be fixed under both VS2017 and VS019.

schultetwin1 avatar Mar 26 '19 18:03 schultetwin1