Skip to content

Documentation desired on Linux build system requirements #381

@SignumTemporis

Description

@SignumTemporis

I'm trying to apply a patch to SDK.
However, when I follow Development procedure I get an error.

What can be wrong?

The procedure (as Dockerfile):

FROM ubuntu:22.04

ARG SDK_VERSION=20.2.0
ARG SDK_INSTALL_PREFIX=/opt

RUN apt-get update
RUN apt-get install -y git wget xz-utils
RUN apt-get install -y make cmake ninja-build

WORKDIR /tmp

RUN wget https://github.com/llvm-mos/llvm-mos-sdk/releases/download/v${SDK_VERSION}/llvm-mos-linux.tar.xz
RUN tar --no-same-owner -C ${SDK_INSTALL_PREFIX} -xJf llvm-mos-linux.tar.xz

ENV PATH=${SDK_INSTALL_PREFIX}/llvm-mos/bin:${PATH}

RUN git clone --depth 1 https://github.com/llvm-mos/llvm-mos-sdk.git
RUN mkdir llvm-mos-sdk/build
WORKDIR /tmp/llvm-mos-sdk/build
RUN cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=${SDK_INSTALL_PREFIX}/llvm-mos/ ..
RUN ninja install
WORKDIR /tmp

The procedure fails in cmake step:

 > [11/13] RUN cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=/opt/llvm-mos/ ..:
0.416 -- No build type selected, default to MinSizeRel
0.528 -- The C compiler identification is GNU 11.4.0
0.687 -- The CXX compiler identification is Clang 20.0.0
0.706 -- The ASM compiler identification is GNU
0.710 -- Found assembler: /usr/bin/cc
0.726 -- Detecting C compiler ABI info
0.827 -- Detecting C compiler ABI info - done
0.845 -- Check for working C compiler: /usr/bin/cc - skipped
0.846 -- Detecting C compile features
0.847 -- Detecting C compile features - done
0.858 -- Detecting CXX compiler ABI info
0.963 -- Detecting CXX compiler ABI info - failed
0.963 -- Check for working CXX compiler: /opt/llvm-mos/bin/clang++
1.064 -- Check for working CXX compiler: /opt/llvm-mos/bin/clang++ - broken
1.064 CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
1.064   The C++ compiler
1.064 
1.064     "/opt/llvm-mos/bin/clang++"
1.064 
1.064   is not able to compile a simple test program.
1.064 
1.064   It fails with the following output:
1.064 
1.064     Change Dir: /tmp/llvm-mos-sdk/build/CMakeFiles/CMakeTmp
1.064     
1.064     Run Build Command(s):/usr/bin/ninja cmTC_4ff06 && [1/2] Building CXX object CMakeFiles/cmTC_4ff06.dir/testCXXCompiler.cxx.o
1.064     [2/2] Linking CXX executable cmTC_4ff06
1.064     FAILED: cmTC_4ff06 
1.064     : && /opt/llvm-mos/bin/clang++   CMakeFiles/cmTC_4ff06.dir/testCXXCompiler.cxx.o -o cmTC_4ff06   && :
1.064     ld.lld: error: unable to find library -l:crt0.o
1.064     ld.lld: error: unable to find library -lcrt0
1.064     ld.lld: error: unable to find library -lcrt
1.064     ld.lld: error: unable to find library -lc
1.064     ld.lld: error: cannot find linker script link.ld
1.064     clang++: error: ld.lld command failed with exit code 1 (use -v to see invocation)
1.064     ninja: build stopped: subcommand failed.
1.064     
1.064 
1.064   CMake will not be able to correctly generate this project.
1.064 Call Stack (most recent call first):
1.064   CMakeLists.txt:9 (project)
1.064 
1.064 
1.066 -- Configuring incomplete, errors occurred!
1.066 See also "/tmp/llvm-mos-sdk/build/CMakeFiles/CMakeOutput.log".
1.066 See also "/tmp/llvm-mos-sdk/build/CMakeFiles/CMakeError.log".

Relates to: #378 issue, 4fc7b2d patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationp3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions