Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

build errors / go version #1072

Open
Michas0206 opened this issue Feb 20, 2021 · 16 comments
Open

build errors / go version #1072

Michas0206 opened this issue Feb 20, 2021 · 16 comments

Comments

@Michas0206
Copy link

Describe the bug
go build producing the following output:

# github.com/OpenDiablo2/OpenDiablo2/d2common/d2datautils
d2common/d2datautils/stream_writer.go:41:17: invalid operation: 1 << v.bitOffset (shift count type int, must be unsigned integer)
note: module requires Go 1.14# github.com/hajimehoshi/ebiten/v2/internal/graphicscommand
/root/go/pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/graphicscommand/image.go:247:9: undefined: strings.ReplaceAll
note: module requires Go 1.12# github.com/hajimehoshi/ebiten/v2/internal/shaderir/glsl
/root/go/pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/shaderir/glsl/glsl.go:151:8: undefined: strings.ReplaceAll
/root/go/pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/shaderir/glsl/glsl.go:152:8: undefined: strings.ReplaceAll
/root/go/pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/shaderir/glsl/glsl.go:154:8: undefined: strings.ReplaceAll
/root/go/pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/shaderir/glsl/glsl.go:155:8: undefined: strings.ReplaceAll
note: module requires Go 1.12# github.com/gravestench/akara
/root/go/pkg/mod/github.com/gravestench/[email protected]/bitset.go:233:38: syntax error: unexpected b1, expecting {
note: module requires Go 1.14# github.com/OpenDiablo2/OpenDiablo2/d2core/d2config
d2core/d2config/default_directories.go:18:23: undefined: os.UserConfigDir
note: module requires Go 1.14# github.com/hajimehoshi/ebiten/v2/internal/devicescale
/root/go/pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/devicescale/cinnamon_unix.go:98:15: undefined: os.UserHomeDir
note: module requires Go 1.12pi@raspberrypi:~/OpenDiablo2 $

To Reproduce
Steps to reproduce the behavior:

  1. System: Raspberry Pi 3 with standard Raspberry Pi OS, latest updates
  2. install go
  3. git clone your repository, enter OpenDiablo2, install dependencies from build.sh for Debian, go get -d and get build
    Expected behavior
    A clean build of OpenDiablo 2

Desktop (please complete the following information):

  • OS: Raspberry Pi OS
  • Version: Buster, latest updates/upgrades installed

Additional context
Is really "go" the problem? I tried it with version 1.11 and 1.15. Or is it arm-architecture related somehow?

@gravestench
Copy link
Contributor

Can you try compiling latest golang from source? I remember having issues when i used the package manager to install golang on my rpi4

@Michas0206
Copy link
Author

Michas0206 commented Feb 27, 2021

Build from source??
I am a complete noob! I could try, already found a how-to - but I assume I produce more problems when setting paths etc manually - I am currently using these steps - to me it looks as if Go works fine,
is there any way to proof if my Go-install is fine before trying to compile this from source?

Not sure whats wrong here - the game starts with "go run .", the menu shows up, map test works as far as I can see, but when trying to start singleplayer, game crashes with an error. I cant attach the message here in code format or quote format, so if necessary I could just add it as plain text, very long and starting with SIGSEV error.

@gucio321
Copy link
Contributor

@michas0602 do you still have this problem?

Not sure whats wrong here - the game starts with "go run .", the menu shows up, map test works as far as I can see, but when trying to start singleplayer, game crashes with an error. I cant attach the message here in code format or quote format, so if necessary I could just add it as plain text, very long and starting with SIGSEV error.

could you post e.g. first 15 lines?

@kermitdafrog8
Copy link

kermitdafrog8 commented Apr 30, 2021

When I try to build the latest from Github I get

D2common/d2fileformats/d2mpq/mpq.go:7:2: package io/fs is not in GOROOT

@gucio321
Copy link
Contributor

@kermitdafrog8 package io/fs was introduced in go 1.16, so you need to update your golang version

@kermitdafrog8
Copy link

@kermitdafrog8 package io/fs was introduced in go 1.16, so you need to update your golang version

After upgrading Go it builds. When I run it I try to start a game and it crashes.

@gucio321
Copy link
Contributor

@kermitdafrog8 what does this crashes look like ;-)

@kermitdafrog8
Copy link

@kermitdafrog8 what does this crashes look like ;-)

Panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x98c947]

If you need more let me know.

@gucio321
Copy link
Contributor

gucio321 commented Apr 30, 2021

@kermitdafrog8 could you paste more pls,
I cant identity this exactly, but I suppose, that it could be caused by Diablo 2 patch. What Diablo II patch do you use? (1.14d needed)

@kermitdafrog8
Copy link

Would probably be which ever is the latest. Recently purchased the LOD expansion so I could use this. Is there any way to downgrade if needed?

@gucio321
Copy link
Contributor

kermitdafrog8 you can reinstall game at any time, if you want to back to an older version, but please post your panic message, because I'm not sure if the bug is caused by Diablo 2 version.

@kermitdafrog8
Copy link

kermitdafrog8 you can reinstall game at any time, if you want to back to an older version, but please post your panic message, because I'm not sure if the bug is caused by Diablo 2 version.

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x98c947] goroutine 24 [running]: github.com/OpenDiablo2/OpenDiablo2/d2game/d2gamescreen.(*CharacterSelect).updateCharacterBoxes(0xc002223200)         /opt/OpenDiablo2/d2game/d2gamescreen/character_select.go:332 +0xe7 github.com/OpenDiablo2/OpenDiablo2/d2game/d2gamescreen.(*CharacterSelect).refreshGameStates(0xc002223200)         /opt/OpenDiablo2/d2game/d2gamescreen/character_select.go:521 +0x5c github.com/OpenDiablo2/OpenDiablo2/d2game/d2gamescreen.(*CharacterSelect).OnLoad(0xc002223200, 0xc001576f00)         /opt/OpenDiablo2/d2game/d2gamescreen/character_select.go:211 +0x5e5 github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen.(*ScreenManager).Advance.func1(0x7f3583e687a0, 0xc002223200, 0xc001526dc0)         /opt/OpenDiablo2/d2core/d2screen/screen_manager.go:86 +0x43 created by github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen.(*ScreenManager).Advance         /opt/OpenDiablo2/d2core/d2screen/screen_manager.go:85 +0x345

@gucio321
Copy link
Contributor

gucio321 commented May 2, 2021

@kermitdafrog8 it doesn't seem like behavior by a wrong version ...
I can reproduce it, when character save file has "permission denied" e.g. when it is owned by another user
pleas check, who is owner of your save files
default location of saves is in a config directory in OpenDiablo2 subfolder
for linux /home/user/.config/OpenDiablo2/Save

@kermitdafrog8
Copy link

It shows the right user:group. If I wanted to delete the save and start over should I delete folder or just file?

@kermitdafrog8
Copy link

Deleted save. Recreated character. Game loaded but no mobs. How playable is this?

@gucio321
Copy link
Contributor

gucio321 commented May 8, 2021

@kermitdafrog8 See our status page, read milestones and visit here

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

No branches or pull requests

4 participants