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

DW_FORM_strx with no .debug_str_offsets section #1269

Open
denis-obukhov opened this issue Aug 8, 2024 · 15 comments
Open

DW_FORM_strx with no .debug_str_offsets section #1269

denis-obukhov opened this issue Aug 8, 2024 · 15 comments

Comments

@denis-obukhov
Copy link

denis-obukhov commented Aug 8, 2024

The issue has appeared when I updated to Mac OS 15.0 Beta (24A5309e)
I use GoLand 2024.2, Go 1.22.6, go-sqlite3 v1.14.22

Just add a simple import to an empty project:

import (
	_ "github.com/mattn/go-sqlite3"
)

After launching I get this error:

GOROOT=/Users/username/go/go1.23rc2 #gosetup
GOPATH=/Users/username/go #gosetup
/Users/username/go/go1.23rc2/bin/go build -o /Users/username/Library/Caches/JetBrains/GoLand2024.2/tmp/GoLand/___go_build_LiveKitBE -gcflags all=-N -l LiveKitBE #gosetup
/Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv --listen=127.0.0.1:53060 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/username/Library/Caches/JetBrains/GoLand2024.2/tmp/GoLand/___go_build_LiveKitBE --
API server listening at: 127.0.0.1:53060
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1600.0.30.5
 for arm64.
Got a connection, launched process /Users/username/Library/Caches/JetBrains/GoLand2024.2/tmp/GoLand/___go_build_LiveKitBE (pid = 7993).
2024-08-08T15:40:59+07:00 error layer=debugger error loading binary "/Users/username/Library/Caches/JetBrains/GoLand2024.2/tmp/GoLand/___go_build_LiveKitBE": error reading debug_info: decoding dwarf section info at offset 0x5fe92: DW_FORM_strx with no .debug_str_offsets section
Exiting.
could not launch process: error reading debug_info: decoding dwarf section info at offset 0x5fe92: DW_FORM_strx with no .debug_str_offsets section

It seems like it's something with binary compatibility

@leonardinius
Copy link

leonardinius commented Aug 9, 2024

Adding -ldflags=-linkmode=internal solved it for me in VSCode (different package, similar symptom)

  gopls": {
    "build.buildFlags": [
      "-ldflags=-linkmode=internal",
    ],
  },
  "go.testFlags": [
    "-ldflags=-linkmode=internal",
  ],

@denis-obukhov
Copy link
Author

denis-obukhov commented Aug 12, 2024

@leonardinius Unfortunately, I get this error with this configuration during compilation:

github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol close
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol access
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol getcwd
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol stat
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fstat
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol ftruncate
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fcntl
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol read
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol pread
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol write
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol pwrite
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fchmod
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol unlink
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol mkdir
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol rmdir
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fchown
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol geteuid
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol mmap
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol munmap
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol readlink
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol lstat

@mkhoatd
Copy link

mkhoatd commented Aug 15, 2024

Seems like it's an error on MacOS 15

@twz915
Copy link

twz915 commented Sep 6, 2024

this issue still be reproduced, go sdk 1.23.1, macOS 15.0 Beta (24A5331b)

go install github.com/go-delve/delve/cmd/dlv@master

the newest dlv at master branch could fix this issue

if goland, using command which dlv go get dlv command path.

sudo cp /Users/xxx/go/bin/dlv /Users/xxx/Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv

@sted
Copy link

sted commented Sep 17, 2024

I get this with the just released MacOS 15

@gcsfred2
Copy link

Same issue with macOS 15.0 sequoia, dlv 1.23.0, GoLand 2024.2, go1.23.1 darwin/arm64.

@ernesto2108
Copy link

alguien soluciono esto? me pasa con GoLand 2024.2

@redwolf2019
Copy link

Here's my solution

  1. go install github.com/go-delve/delve/cmd/dlv@master install latest dlv
  2. copy /Users/{YOUR_HOME_NAME}/go/bin/dlv to /Users/{YOUR_HOME_NAME}/Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv replace dlv
  3. then reopen the Goland

@zt-9
Copy link

zt-9 commented Sep 18, 2024

i was having this issue after upgrading to macos15.
reinstall xcode-select solves this issue

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

@dev4mobile
Copy link

xcode-select --install

nice

@gcsfred2
Copy link

@zt-9 reinstalling xcode-select didn't solve the issue for me.

@Krenys
Copy link

Krenys commented Sep 18, 2024

this issue still be reproduced, go sdk 1.23.1, macOS 15.0 Beta (24A5331b)

go install github.com/go-delve/delve/cmd/dlv@master

the newest dlv at master branch could fix this issue

This way is correct

@keeema
Copy link

keeema commented Sep 19, 2024

Here's my solution

  1. go install github.com/go-delve/delve/cmd/dlv@master install latest dlv
  2. copy /Users/{YOUR_HOME_NAME}/go/bin/dlv to /Users/{YOUR_HOME_NAME}/Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv replace dlv
  3. then reopen the Goland

Saved my day :-) Thanks

@zt-9
Copy link

zt-9 commented Sep 20, 2024

@zt-9 reinstalling xcode-select didn't solve the issue for me.

i just tried this and it also works

go install github.com/go-delve/delve/cmd/dlv@master

@hktalent
Copy link

this issue still be reproduced, go sdk 1.23.1, macOS 15.0 Beta (24A5331b)

go install github.com/go-delve/delve/cmd/dlv@master

the newest dlv at master branch could fix this issue

if goland, using command which dlv go get dlv command path.

sudo cp /Users/xxx/go/bin/dlv /Users/xxx/Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv

for me macos 15

go install github.com/go-delve/delve/cmd/dlv@master
/usr/bin/sudo cp /Users/${LOGNAME}/go/bin/dlv /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/mac/dlv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests