go-sqlite3 icon indicating copy to clipboard operation
go-sqlite3 copied to clipboard

DW_FORM_strx with no .debug_str_offsets section

Open denis-obukhov opened this issue 1 year ago • 24 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

denis-obukhov avatar Aug 08 '24 08:08 denis-obukhov

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 avatar Aug 09 '24 22:08 leonardinius

@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

denis-obukhov avatar Aug 12 '24 09:08 denis-obukhov

Seems like it's an error on MacOS 15

mkhoatd avatar Aug 15 '24 01:08 mkhoatd

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

twz915 avatar Sep 06 '24 01:09 twz915

I get this with the just released MacOS 15

sted avatar Sep 17 '24 11:09 sted

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

gcsfred2 avatar Sep 17 '24 15:09 gcsfred2

alguien soluciono esto? me pasa con GoLand 2024.2

ernesto2108 avatar Sep 17 '24 20:09 ernesto2108

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

redwolf2019 avatar Sep 18 '24 03:09 redwolf2019

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

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

zt-9 avatar Sep 18 '24 06:09 zt-9

xcode-select --install

nice

dev4mobile avatar Sep 18 '24 11:09 dev4mobile

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

gcsfred2 avatar Sep 18 '24 12:09 gcsfred2

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

Krenys avatar Sep 18 '24 16:09 Krenys

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

keeema avatar Sep 19 '24 08:09 keeema

@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

zt-9 avatar Sep 20 '24 00:09 zt-9

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

hktalent avatar Sep 20 '24 02:09 hktalent

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/

sagiwei avatar Sep 20 '24 10:09 sagiwei

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) ?

raufhm avatar Sep 20 '24 15:09 raufhm

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

kwmlodozeniec avatar Sep 20 '24 18:09 kwmlodozeniec

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.

sagiwei avatar Sep 21 '24 03:09 sagiwei

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!

Bistutu avatar Sep 22 '24 10:09 Bistutu

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/`

electron0zero avatar Sep 27 '24 10:09 electron0zero

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

hotpot95 avatar Oct 11 '24 07:10 hotpot95

Updating dlv to latest worked for me

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

pansachin avatar Jan 20 '25 11:01 pansachin

For global installation of GoLand in macos, you can consider this:

go install github.com/go-delve/delve/cmd/dlv@latest
sudo cp ~/go/bin/dlv /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm

asve-teach-team avatar Apr 30 '25 10:04 asve-teach-team