Uh oh!
There was an error while loading. Please reload this page.
missing DWARF symbol table - #3717
Conversation
crazy-max
commented
Jul 23, 2022
Ah ok now I remember why we removed DWARF symbol table: https://github.com/docker/cli/runs/7479620604?check_suite_focus=true#step:4:2067 By default on Darwin the linker will invoke I think our osxsdk used for cross comp darwin binaries might be too old: Line 62 in f1615fa I will take a look |
Codecov Report
@@ Coverage Diff @@## master #3717 +/- ##
==========================================
- Coverage 59.06% 59.06% -0.01%
==========================================
Files 289 289 Lines 24673 24665 -8 ==========================================
- Hits 14573 14568 -5 + Misses 9226 9224 -2 + Partials 874 873 -1 |
c9fb04c to
56767fdComparecrazy-max
commented
Jul 23, 2022
Ok so we have to install the I took a look at https://apt.llvm.org/ but does not seem to include FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-bullseye
COPY --from=xx / /
RUN apt-get update && apt-get install --no-install-recommends -y bash clang lld file lsb-release software-properties-common
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 12 all && rm -f llvm.sh
WORKDIR /go/src/github.com/docker/cliSo I think we have to use the @tonistiigi Maybe instead of the debian variant we could switch to |
| if [ "$BASE_VARIANT" != "alpine" ] && [ "$(xx-info os)" = "darwin" ]; then | ||
| # on debian, use osxcross toolchain that includes the llvm-dsymutil tool | ||
| # and right minimal llvm version required | ||
| # more info: https://github.com/docker/cli/pull/3717 | ||
| export PATH="/osxcross/bin:$PATH" | ||
| export LD_LIBRARY_PATH="/osxcross/lib:$LD_LIBRARY_PATH" | ||
| export CC="o64-clang" | ||
| export CXX="o64-clang++" | ||
| fi |
There was a problem hiding this comment.
@tonistiigi If you're ok with osxcross we could add a detection folder like /xx-sdk on xx so it could set itself the required env vars to use osxcross and we could remove this part in the Dockerfile? Maybe also the ability to support macports like https://github.com/crazy-max/goxx/blob/main/rootfs/usr/local/bin/goxx-macports. WDYT?
1edf995 to
75dabedCompare
thaJeztah
left a comment
There was a problem hiding this comment.
By default on Darwin the linker will invoke dsymutil to put the debug info directly into the executable. This invocation of dsymutil is disabled by the linker's -w or -s option
Is this something that could be fixed in Go?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@tonistiigi Can't repro everytime but we currently have this issue with BuildKit: https://github.com/docker/cli/runs/7496406536?check_suite_focus=true#step:4:389 But I wonder is this is not linked to the infamous empty layer issue we had in the past or moby/buildkit#2973. |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
093023f to
963e446Comparecrazy-max
commented
Jul 25, 2022
Looking at https://github.com/docker/cli/runs/7497061435?check_suite_focus=true#step:4:330: It seems some instructions are cached even if no cache exporters are in place and the builder is a new one with a fresh BuildKit state in the GHA workflow. With cache disabled everything looks good: https://github.com/docker/cli/actions/runs/2731390831 |
963e446 to
fd1d521CompareOk so after bisect we actually strip DWARF symbol table in 20.10. So not a regression but this is needed for docker-archive/compose-cli#2151. Needs to noop |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fd1d521 to
6fb3e77Compare6fb3e77 to
2854529Compare@thaJeztah Comment added. We also discussed with @tonistiigi about this and we could fallback to strip from cctools for dawrin if llvm upstream doesn't work. this could be bundled in xx with ld64 so we could remove this hack. |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2854529 to
6f799c1ComparethaJeztah
commented
Jul 28, 2022
@tonistiigi this LGTY? |
There was a problem hiding this comment.
We should look more deeply into what that darwin issue is. Is it something broken in old LLVM etc. Is it Debian weirdness? If needed we can get the Apple strip from https://github.com/tpoechtrager/cctools-port/blob/master/cctools/misc/strip.c with ld64 in xx.
Regression from #3320 which always strips DWARF symbol table.
I encounter this issue while trying to debug #3621 but also to improve our shell out operations with
debug/buildinfopkg (available since Go 1.18) for plugins discovery.Signed-off-by: CrazyMax crazy-max@users.noreply.github.com