SRI-CSL / yices2

The Yices SMT Solver
https://yices.csl.sri.com/
GNU General Public License v3.0
368 stars 46 forks source link

Cannot build per-thread-state branch with mingw64 #418

Closed isanych closed 11 months ago

isanych commented 1 year ago
make[2]: Entering directory '/tmp/yices2-per-thread-state/src'
gcc -I. -Iinclude -DPER_THREAD_STATE -I/opt/vcpkg/installed/x64-windows/include -DTHREAD_SAFE -DMINGW -D__USE_MINGW_ANSI_STDIO -DNDEBUG -flto -march=core2 -mtune=corei7 -Wall -Wredundant-decls -Wno-format -O3 -fomit-frame-pointer   -c api/context_config.c -o ../build/x86_64-pc-mingw64-release/obj/api/context_config.o
In file included from C:/tools/msys64/mingw64/include/minwindef.h:163,
                 from C:/tools/msys64/mingw64/include/synchapi.h:10,
                 from ./mt/yices_locks.h:32,
                 from ./utils/object_stores.h:29,
                 from ./terms/bvarith64_buffers.h:48,
                 from ./terms/terms.h:187,
                 from ./context/assumption_stack.h:48,
                 from ./context/context_types.h:31,
                 from ./api/context_config.h:50,
                 from api/context_config.c:26:
include/yices_types.h:83:3: error: expected identifier before '(' token
   83 |   STATUS_INTERRUPTED,
      |   ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1012: ../build/x86_64-pc-mingw64-release/obj/api/context_config.o] Error 1

which caused by conflict with STATUS_INTERRUPTED macro

# grep STATUS_INTERRUPTED /mingw64/include/winnt.h
#define STATUS_INTERRUPTED ((DWORD)0xC0000515)

I'm renaming STATUS_INTERRUPTED locally, but maybe somebody else would have similar issue

ianamason commented 1 year ago

Yes we have seen these sorts of clashes before. And without some large scale systematic renaming, we will see more. I doubt this is unique to the per-thread-state branch.

ahmed-irfan commented 11 months ago

fixed in 789e1a5b54d78e8c55c804e49c47dd001ff1b895