Non ubuntu linux build

hi guys, not sure if it's the right place to ask. trying to compile swift on non ubuntu linux. as per README I cloned all the repos and started utils/build-script --release-debuginfo command. The error message I get makes me think that compiled clang unable to find gcc libs. any tips?

CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/home/az/git/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/./bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/az/git/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/tools/clang/runtime/compiler-rt-bins/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/ninja" "cmTC_d1d07"
    [1/2] Building C object CMakeFiles/cmTC_d1d07.dir/testCCompiler.c.o
    [2/2] Linking C executable cmTC_d1d07
    FAILED: cmTC_d1d07
    : && /home/az/git/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/./bin/clang    CMakeFiles/cmTC_d1d07.dir/testCCompiler.c.o  -o cmTC_d1d07   && :
    /usr/bin/ld: cannot find crtbegin.o: No such file or directory
    /usr/bin/ld: cannot find -lgcc
    /usr/bin/ld: cannot find -lgcc_s
    clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.




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


-- Configuring incomplete, errors occurred!
See also "/home/az/git/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/tools/clang/runtime/compiler-rt-bins/CMakeFiles/CMakeOutput.log".
See also "/home/az/git/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/tools/clang/runtime/compiler-rt-bins/CMakeFiles/CMakeError.log".
[51/268] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/bugpoint.cpp.o
FAILED: tools/clang/runtime/compiler-rt-stamps/compiler-rt-configure

What flavor of Linux are you using?

I've been building Swift with good results for Fedora. Check out this repo for the dependencies we've figured out: https://github.com/corinnekrych/swift-rpm. Hopefully that will point you in the right direction; if you get stuck reply back and I'll help in any way I can.

Thank you for your link. I'm on ALTLinux and have installed almost the same you have. Applied distro specific patches helped me to get working clang at least. Building swift...