Closed binghe closed 2 weeks ago
I suggest at least changing the Holmakefile
inside zc2hs
folder to the following:
# this assumes minisat's already been built in ../minisat
all: zc2hs
CXX = $(or $(MINISAT_CXX),c++)
zc2hs:
ln -fs ../minisat/Proof.o
ln -fs ../minisat/File.o
ln -fs ../minisat/File.h
ln -fs ../minisat/Proof.h
ln -fs ../minisat/Global.h
ln -fs ../minisat/Sort.h
ln -fs ../minisat/SolverTypes.h
@$(CXX) -O3 Proof.o File.o zc2hs.cpp -o zc2hs
clean:
@rm -f zc2hs *.h *.o
So that manually calling make MINISAT_CXX=g++-mp-13
could work.
The error comes from these: https://github.com/HOL-Theorem-Prover/HOL/blob/develop/src/HolSat/sat_solvers/minisat/Global.h#L264.
I don't know what this nonsense is and I suspect you could safely delete the definitions within the #ifdef, but you could try to pass -D__SGI_STL_INTERNAL_RELOPS
and see if it actually improves the situation first.
The error comes from these: https://github.com/HOL-Theorem-Prover/HOL/blob/develop/src/HolSat/sat_solvers/minisat/Global.h#L264.
I don't know what this nonsense is and I suspect you could safely delete the definitions within the #ifdef, but you could try to pass
-D__SGI_STL_INTERNAL_RELOPS
and see if it actually improves the situation first.
Thanks for your investigations. Completely commenting all the 4 definitions doesn't work (even Minisat itself cannot be compiled then). But now I found that it's actually the first one - overloaded !=
causing problems. Just commenting out that one, and manually change two expressions from a != b
to ~(a == b)
, will fix the building issue with Apple's latest clang++.
I will submit a PR soon.
See #1254
I think this issue is new on macOS 14 (Sonoma) with latest Xcode (I'm using version 15.3). Apple's
c++
(clang++
) cannot compilesrc/HolSat/sat_solvers/zc2hs/zc2hs.cpp
:The failure of building this
zc2hs
(what is it?) doesn't break the entire HOL builds (it seems not used when building core theories), but if you rebuild HOL (even without modifying any code), the building process will restart from generatingnumheap
(a huge waste of time).Using MacPorts's
gcc13
(/opt/local/bin/g++-mp-13
), this code can still be compiled without any modification.I'm no expert to solve this C++ standard compatibility issue.