ergo: Compilation to arm fails

Describe the bug Compiling to ARM does not work

To Reproduce

$ GOARCH=arm go build

Expected behavior Compilation works fine

Actual behaviour This error is displayed:

# github.com/ergo-services/ergo/lib/osdep
../../go/pkg/mod/github.com/ergo-services/ergo@v1.999.210/lib/osdep/linux.go:15:11: invalid operation: usage.Utime.Sec * 1000000000 + usage.Utime.Nano() (mismatched types int32 and int64)
../../go/pkg/mod/github.com/ergo-services/ergo@v1.999.210/lib/osdep/linux.go:16:11: invalid operation: usage.Stime.Sec * 1000000000 + usage.Stime.Nano() (mismatched types int32 and int64)
# github.com/ergo-services/ergo/lib
../../go/pkg/mod/github.com/ergo-services/ergo@v1.999.210/lib/tools.go:166:11: cannot use 4294967000 (untyped int constant) as int value in assignment (overflows)

Environment (please complete the following information):

  • Arch: arm
  • OS: Linux
  • Framework Version [v1.999.210]
  • Number of CPU or (GOMAXPROCS not set)

Additional context Removing GOARCH fixes it however I need to run few services on ARM

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26

Most upvoted comments

Sure I will try it out. However I’m OOO currently and will be able to check it early next week.

To be specific, I have tested it on aarch64 and all tests passed. I will try to find the same hardware. It’s a bit difficult to resolve it with no access to the similar environment.

On Fri, Apr 22, 2022, 10:32 Szymon Wygnański @.***> wrote:

Thanks for your response. Indeed it compiles fine for arm64. However when I try to run it on Asus Tinker Board T it hangs and after a while the asus shuts off. To reproduce:

cd ergo/examples/simple GOARCH=arm64 go build simple.go // scp to arm64 device

on the arm64 device:

./simple

The result: it hangs. I have to restart the device. Occasionally I get this error log:

Message from @.*** at Apr 22 08:13:22 … kernel:[ 64.830251] Internal error: undefined instruction: 0 [#1] PREEMPT SMP

Message from @.*** at Apr 22 08:13:22 … kernel:[ 64.964868] Process simple (pid: 4048, stack limit = 0xffff000013498000)

Message from @.*** at Apr 22 08:13:22 … kernel:[ 65.199004] Code: d2800014 54000be1 b9404004 f9401c03 (23232323)

However usually there is no log at all.

I debugged it a little and found that it hangs on this line: https://github.com/ergo-services/ergo/blob/79bebaa/proto/dist/resolver.go#L225 However the value of the dsn variable seams to be correct: localhost:4369

On my local PC it works fine (but I have erlang installed) but on the arm machine it does not. Could you give me some clues, I would really appreciate it.

— Reply to this email directly, view it on GitHub https://github.com/ergo-services/ergo/issues/102#issuecomment-1106189951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5ATFEMHDT77JI5ZYZS5LVGJP2ZANCNFSM5T7VMSSQ . You are receiving this because you commented.Message ID: @.***>