Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on Mac #13

Open
liang7878 opened this issue Dec 23, 2020 · 6 comments
Open

Build on Mac #13

liang7878 opened this issue Dec 23, 2020 · 6 comments
Labels
compile Software compilation problem

Comments

@liang7878
Copy link

cmake failed on macOS 11 when it tried to check gcc configuration. I have installed gcc-10 and cmake with homebrew. But it seems that it cannot work well when it tried to read the variable CMAKE_COMPILER_IS_GNUCC, could you please share some ideas about this error? Thanks.

$ cmake ..
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
#define TENDISPLUS_GIT_SHA1 "b4e8bbe8"
#define TENDISPLUS_GIT_DIRTY "      36"
/Library/Developer/CommandLineTools/usr/bin/c++
CMake Error at CMakeLists.txt:34 (message):
  gcc or vs2015(update 2)+ is required
@TendisDev
Copy link
Collaborator

We have never build tendis in macOS before.
We would check it later.

Thanks for issue.

@mingjliu9
Copy link

This problem could be resolved by brew installed gcc, take a look at Build and run.

@liang7878
Copy link
Author

This problem could be resolved by brew installed gcc, take a look at Build and run.

Hi @mingjliu9 , many thanks for your quick response. Here is my environment. As you can see below, I cannot see any evidence that it doesn't meet the requirements you mentioned in the document. Thanks.

# Apple @ pingdeMacBook-Air in ~/Source/repos/tendis/build on git:master x [21:20:45]
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++-10
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/10.2.0/libexec/gcc/x86_64-apple-darwin20/10.2.0/lto-wrapper
Target: x86_64-apple-darwin20
Configured with: ../configure --build=x86_64-apple-darwin20 --prefix=/usr/local/Cellar/gcc/10.2.0 --libdir=/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-10 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 10.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk SED=/usr/bin/sed
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (Homebrew GCC 10.2.0)

# Apple @ pingdeMacBook-Air in ~/Source/repos/tendis/build on git:master x [21:20:58]
$ cmake --version
cmake version 3.19.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

# Apple @ pingdeMacBook-Air in ~/Source/repos/tendis/build on git:master x [21:21:02]
$ cmake ..
#define TENDISPLUS_GIT_SHA1 "b4e8bbe8"
#define TENDISPLUS_GIT_DIRTY "      36"
/Library/Developer/CommandLineTools/usr/bin/c++
CMake Error at CMakeLists.txt:34 (message):
  gcc or vs2015(update 2)+ is required


-- Configuring incomplete, errors occurred!
See also "/Users/Apple/Source/repos/tendis/build/CMakeFiles/CMakeOutput.log".
See also "/Users/Apple/Source/repos/tendis/build/CMakeFiles/CMakeError.log".

@jingjunLi
Copy link
Collaborator

You should link c++ to the path installed of g++, you can execute ln -s Path/To/g++ /Library/Developer/CommandLineTools/usr/bin/c++. We recommend that you use GCC 5.5 or GCC 7.3 version, because we tests tendis can be successfully compiled.
You can refer to @mingjliu9 's suggestions, take a look at our compilation document.

@huawux huawux added the compile Software compilation problem label Mar 5, 2021
@TendisDev TendisDev changed the title cmake failed due to gcc configuration Build on Mac Mar 16, 2021
@yinghonghui
Copy link

We have never build tendis in macOS before.
We would check it later.

Thanks for issue.

我这边也遇到这个克服,mac 编译Tendis 现在能克服这个问题吗

@truongakevin
Copy link

I have this error also I think it can be ignored though. I tested this on a computer I know has a proper function c and c++ compiler it still said those tasks were skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile Software compilation problem
Projects
None yet
Development

No branches or pull requests

7 participants