mattn/go-sqlite3

DW_FORM_strx with no .debug_str_offsets section

denis-obukhov opened this issue ยท 22 comments

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

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",
  ],

@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

Seems like it's an error on MacOS 15

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 commented

I get this with the just released MacOS 15

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

alguien soluciono esto? me pasa con GoLand 2024.2

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 commented

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

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

nice

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

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

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 commented

@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

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

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

Saved my day ๐Ÿ‘๐Ÿผ!

For one who use IntelliJ IDEA, cp dlv to ~/Library/Application\ Support/JetBrains/IntelliJIdea2024.2/plugins/go-plugin/lib/dlv/macarm/

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

Saved my day ๐Ÿ‘๐Ÿผ!

For one who use IntelliJ IDEA, cp dlv to ~/Library/Application\ Support/JetBrains/IntelliJIdea2024.2/plugins/go-plugin/lib/dlv/macarm/

shall we disable the System Integrity Protection (SIP) ?

Reinstalling xcode-select on MacOS 15 with VSCode solved this issue for me

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

Saved my day ๐Ÿ‘๐Ÿผ!
For one who use IntelliJ IDEA, cp dlv to ~/Library/Application\ Support/JetBrains/IntelliJIdea2024.2/plugins/go-plugin/lib/dlv/macarm/

shall we disable the System Integrity Protection (SIP) ?

Probably not. I haven't disabled it myself.

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

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

thank you!

Check /Applications/ if you can't find GoLand in /Users/xxx/Applications/

I am running GoLand 2024.2.2.1 Build #GO-242.22855.106 on MacOS Version 15.0 (24A335), and for me the GoLand was at /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm instead of /Users/xxxx/`

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

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

thank you!

My system version is 15.0.1 (24A348). This answer perfectly resolved my issue:

error reading debug_info: decoding dwarf section info at offset 0x60e5cd: DW_FORM_strx with no .debug_str_offsets section
Exiting.
could not launch process: error reading debug_info: decoding dwarf section info at offset 0x60e5cd: DW_FORM_strx with no .debug_str_offsets section