Skip to content

Unable to compile in release mode in MSVC #74

@danielmda

Description

@danielmda

Description

Following the instructions for building with Visual Studio, MSVC produces an exception when compiling in Release mode.

Environment

  1. OS: Windows 11
  2. Compiler: MSVC (19.44.35217)
  3. SAF performance library being used: SAF_USE_INTEL_MKL_LP64
  4. Any optional SAF flags enabled: None
  5. Other environment details: Visual Studio 2022 17.14.16 + bundled CMake

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. cmake -S . -B build -G "Visual Studio 17" -A x64 -DSAF_PERFORMANCE_LIB=SAF_USE_INTEL_MKL_LP64
  2. cd build, msbuild ALL_BUILD.vcxproj /p:Configuration=Release /m
  3. Build fails: CL produces an exception when compiling saf_utility_filters.c

Expected Output

It should build successfully.

Actual Output

CL!RaiseException()+0x8a
CL!RaiseException()+0x8a
CL!CloseTypeServerPDB()+0x1093a7
CL!CloseTypeServerPDB()+0x1d71ed

cl : command line  error D8040: error creating or communicating with child process [saf.vcxproj]

Additional Information

  • It compiles successfully in Debug mode.
  • Disabling compiler optimisations on saf_utility_filters.c (/O2 to /Od) also fixes the problem.
  • This could be a compiler bug. I tried rolling back Visual Studio by one version with the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions