Closed XuesongHu closed 4 years ago
Hi @XuesongHu thanks for pointing out the need for checking whether the command line tools are installed or not. In the forthcoming v1.0.2 release, that whole section of the INSTALL.md file has been redrafted and addresses additional requirements for both macOS and Linuxes. Bear with us for a couple of more weeks (or less) and the new release will be out. In the meantime if you have not yet opened an issue to raise the problem, can I ask you to do so, please?
Thank you Flavio
@XuesongHu we are closing this PR for the following reason: For the package build, it was/is a design choice that the same compiler, i.e the one specified CC and CXX, has to be used for the HElib, NTL and GMP compilation. This is done to guarantee that the full software stack that is packaged together has been compiled with the same compiler.
As far as issue #363 is concerned, it is caused by an idiosyncrasy introduced in macOS >= 10.14.x where Command Line Tools package installs the macOS system headers inside the macOS SDK itself. CMake correctly identifies CC and CXX and the location of the header files which it passes to the compilation it controls. But, as GMP and NTL run their own "configure", passing CC and CCX is not enough it also requires -isysroot
flag as additional CFLAGS options. This is a bug that we will be fixing.
The easiest workarounds when building HElib package on macOS >= 10.14.x is to invoke cmake
with the the options -DCMAKE_CXX_COMPILER=/usr/bin/c++
and -DCMAKE_C_COMPILER=/usr/bin/cc
cmake -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc -DPACKAGE_BUILD=ON ..
We will issue a bug fix for issue #363 shortly.
Adding notes on using XCode and warning against Command Line Tools.