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 system broken again #1630

Closed
silviucpp opened this issue Dec 13, 2017 · 10 comments
Closed

build system broken again #1630

silviucpp opened this issue Dec 13, 2017 · 10 comments
Labels
comp-darwin Darwin-related builds and cross-builds

Comments

@silviucpp
Copy link
Contributor

Hello guys,

The build system breaks too offen for such a project. Anytime you want to contribute with improvements first you need to fight to fix the build (I'm talking about OSX).

Right now master stopped working with both Clang and GCC-7 even if looking to documentation I have everything I need:

  1. OS: OSX Sierra 10.12.6
  2. Xcode: Version 9.2 (9C40b)
  3. GCC-7
  4. All brew deps up to date: brew install cmake gcc icu4c mysql openssl unixodbc libtool gettext homebrew/dupes/zlib readline boost --cc=gcc-7
Warning: Use zlib instead of deprecated homebrew/dupes/zlib
Warning: cmake 3.10.0 is already installed
Warning: gcc 7.2.0 is already installed
Warning: icu4c 60.1 is already installed
Warning: mysql 5.7.20 is already installed
Warning: openssl 1.0.2n is already installed
Warning: unixodbc 2.3.4 is already installed
Warning: libtool 2.4.6_1 is already installed
Warning: gettext 0.19.8.1 is already installed
Warning: zlib 1.2.11 is already installed
Warning: readline 7.0.3_1 is already installed
Warning: boost 1.65.1 is already installed

Compiling with Xcode:

cmake .. 
make -j 12 clickhouse
[ 51%] Building CXX object contrib/poco/NetSSL_OpenSSL/CMakeFiles/NetSSL.dir/src/SecureSMTPClientSession.cpp.o
In file included from /Users/silviu.caragea/Desktop/ClickHouse/libs/libcommon/src/iostream_debug_helpers.cpp:2:
/Users/silviu.caragea/Desktop/ClickHouse/libs/libcommon/include/common/iostream_debug_helpers.h:169:10: fatal error: 'optional' file not found
#include <optional>
         ^~~~~~~~~~
1 error generated.
make[3]: *** [libs/libcommon/CMakeFiles/common.dir/src/iostream_debug_helpers.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 51%] Building CXX object contrib/poco/NetSSL_OpenSSL/CMakeFiles/NetSSL.dir/src/SecureServerSocket.cpp.o
[ 51%] Building CXX object contrib/poco/NetSSL_OpenSSL/CMakeFiles/NetSSL.dir/src/SecureServerSocketImpl.cpp.o

This was broken in : 01e8adbfff697bb41fa53b729164a77601fe72a5
Seems in last stable Xcode this is still under experimental namespace.

Using GCC-7:

cmake .. -DCMAKE_CXX_COMPILER=`which g++-7` -DCMAKE_C_COMPILER=`which gcc-7` -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-7
-- Check for working C compiler: /usr/local/bin/gcc-7 -- broken
CMake Error at /usr/local/Cellar/cmake/3.10.0/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/usr/local/bin/gcc-7"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/silviu.caragea/Desktop/ClickHouse/build/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/make" "cmTC_654ab/fast"
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_654ab.dir/build.make CMakeFiles/cmTC_654ab.dir/build
    Building C object CMakeFiles/cmTC_654ab.dir/testCCompiler.c.o
    /usr/local/bin/gcc-7    -o CMakeFiles/cmTC_654ab.dir/testCCompiler.c.o   -c /Users/silviu.caragea/Desktop/ClickHouse/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_654ab
    /usr/local/Cellar/cmake/3.10.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_654ab.dir/link.txt --verbose=1
    /usr/local/bin/gcc-7   -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_654ab.dir/testCCompiler.c.o  -o cmTC_654ab 
    ld: library not found for -lSystem
    collect2: error: ld returned 1 exit status
    make[1]: *** [cmTC_654ab] Error 1
    make: *** [cmTC_654ab/fast] Error 2
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


-- Configuring incomplete, errors occurred!
See also "/Users/silviu.caragea/Desktop/ClickHouse/build/CMakeFiles/CMakeOutput.log".
See also "/Users/silviu.caragea/Desktop/ClickHouse/build/CMakeFiles/CMakeError.log".

This is pretty annoying that time to time you need to spend time to fix the build system.

@silviucpp
Copy link
Contributor Author

Problem with building with gcc-7 can be solved by brew remove gcc-6 if it's installed as well. for some reason this is the problem.

Clang still not sure how can be fixed

@vavrusa
Copy link
Contributor

vavrusa commented Dec 14, 2017

There's no reason to be rude about it, it's not like the authors owe you a working OS X build. That being said, don't upgrade to High Sierra, there's a bug with gcc-7 and some headers in High Sierra: #1474

I've been trying to fix the clang build to work on some stuff today, so I'll push a PR later.

@silviucpp
Copy link
Contributor Author

silviucpp commented Dec 14, 2017 via email

@vavrusa
Copy link
Contributor

vavrusa commented Dec 14, 2017

I suggested Travis since it's free and supports OS X, maybe you can contribute a .travis.yml if @proller or someone with access to the repo is willing to enable it on the repo?

@silviucpp
Copy link
Contributor Author

yes travis is a very good idea. This brings lot of benefits.

@silviucpp
Copy link
Contributor Author

oh btw I don't use High Sierra the project is not compiling with clang even on Sierra because optional is still under experimental namespace and this was reverted in : 01e8adb

@alexey-milovidov
Copy link
Member

Travis is non-free if the build takes more than half an hour on single core.

because optional is still under experimental namespace

Try to install clang with libc++.

@alexey-milovidov
Copy link
Member

We have CI for Mac OS builds. It is using gcc-7.
Also we have tried Travis, but for Mac OS, there are very long queues (it is basically unusable).

@silviucpp
Copy link
Contributor Author

@alexey-milovidov I guess you are not using High Sierra because there master seems not compiling with none of clang or gcc-7 .

On gcc-7 there is the problem of : #1474
and on clang : Seems in last stable Xcode optional is still under experimental namespace. (original isue described here)

@filimonov
Copy link
Contributor

Relates #235

@filimonov filimonov added the comp-darwin Darwin-related builds and cross-builds label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-darwin Darwin-related builds and cross-builds
Projects
None yet
Development

No branches or pull requests

4 participants