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

Need lldb version that works on Alpine 3.9 #73

Closed
mikem8361 opened this issue Sep 14, 2018 · 5 comments
Closed

Need lldb version that works on Alpine 3.9 #73

mikem8361 opened this issue Sep 14, 2018 · 5 comments
Assignees
Labels
bug Something isn't working engineering
Milestone

Comments

@mikem8361
Copy link
Member

The installed by apk doesn't work and even building 5.0.2 (below) doesn't work.

Docker image build file:

RUN apk update

RUN apk add --no-cache \
        autoconf \
        bash \
        build-base \
        clang \
        clang-dev \
        cmake \
        coreutils \
        curl \
        curl-dev \
        gcc \
        gettext-dev \
        gdb \
        git \
        icu-dev \
        krb5-dev \
        libtool \
        libunwind-dev \
        linux-headers \
        make \
        openssl \
        openssl-dev \
        paxctl \
        python \
        python-dev \
        util-linux-dev \
        wget \
        zlib-dev

RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \
        lttng-ust-dev \
        llvm \
        swig \
        userspace-rcu-dev

# Build and install lldb 5.0.2
RUN apk add --no-cache \
        doxygen \
        libedit-dev \
        libxml2-dev \
        libffi-dev \
        ncurses-dev \
        python2 \
        python2-dev && \
        \
        wget http://releases.llvm.org/5.0.2/cfe-5.0.2.src.tar.xz && \
        wget http://releases.llvm.org/5.0.2/llvm-5.0.2.src.tar.xz && \
        wget http://releases.llvm.org/5.0.2/lldb-5.0.2.src.tar.xz && \
        \
        tar -xf llvm-5.0.2.src.tar.xz && \
        mkdir llvm-5.0.2.src/tools/clang && \
        mkdir llvm-5.0.2.src/tools/lldb && \
        tar -xf cfe-5.0.2.src.tar.xz --strip 1 -C llvm-5.0.2.src/tools/clang && \
        tar -xf lldb-5.0.2.src.tar.xz --strip 1 -C llvm-5.0.2.src/tools/lldb && \
        rm cfe-5.0.2.src.tar.xz && \
        rm lldb-5.0.2.src.tar.xz && \
        rm llvm-5.0.2.src.tar.xz && \
        \
        mkdir llvmbuild && \
        cd llvmbuild && \
        CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release ../llvm-5.0.2.src && \
        make -j $(($(getconf _NPROCESSORS_ONLN)+1)) && \
        cd tools/lldb && \
        make install && \
        cd ../../.. && \
        rm -r llvmbuild && \
        rm -r llvm-5.0.2.src


@mikem8361 mikem8361 added the bug Something isn't working label Sep 14, 2018
@mikem8361 mikem8361 self-assigned this Sep 14, 2018
@MykolaBalakin
Copy link

MykolaBalakin commented Oct 30, 2018

I've successfully built the plugin with the following image but lldb freezes on executing attach command.

FROM alpine:3.8 as sos-build-env
WORKDIR /sos
RUN apk update
RUN apk add git bash build-base clang llvm cmake clang-dev gettext-dev icu-dev openssl
RUN apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing lldb-dev
RUN git clone https://github.com/dotnet/diagnostics.git .
RUN ./build.sh

FROM microsoft/dotnet:2.2-sdk AS build-env
WORKDIR /app
COPY . ./
RUN dotnet publish -c Release -o out

FROM microsoft/dotnet:2.2-runtime-alpine
WORKDIR /app
COPY --from=build-env /app/out .
RUN mkdir /sos
COPY --from=sos-build-env /sos/artifacts/bin/Linux.x64.Debug /sos
RUN apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing lldb
ENTRYPOINT ["dotnet", "my-dotnet-app.dll"]

@mikem8361
Copy link
Member Author

Yes, I've tried building a couple of different versions of lldb with no luck.

@MykolaBalakin
Copy link

MykolaBalakin commented Oct 30, 2018

Going to try debugging lldb with lldb. 😄

@sdmaclea
Copy link
Contributor

It is worth noting that lldb seems to work on Alpine 3.9 as mention By @joe-elliott joe-elliott/netcore-kubernetes-profiling#4 (comment)

@mikem8361
Copy link
Member Author

Note to self: try this lldb on apline 3.9.

FROM mcr.microsoft.com/dotnet/core/aspnet:2.2.5-alpine3.9
apk add lldb

@mikem8361 mikem8361 modified the milestones: Future, 3.1 Nov 18, 2019
@mikem8361 mikem8361 reopened this Nov 18, 2019
@tommcdon tommcdon modified the milestones: 3.1, 5.0 Nov 20, 2019
@tommcdon tommcdon changed the title Need lldb version that works on Alpine 3.6, 3.7, 3.8 Need lldb version that works on Alpine 3.9 Nov 20, 2019
@mikem8361 mikem8361 modified the milestones: 5.0, Future Oct 20, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working engineering
Projects
None yet
Development

No branches or pull requests

4 participants