core icon indicating copy to clipboard operation
core copied to clipboard

Android: compile time int overflow

Open sewnie opened this issue 7 months ago • 1 comments

Describe the bug

This code fails to compile: https://github.com/cogentcore/core/blob/baa6838472a6e76755ba9255b852e618777f6df9/gpu/device.go#L56

How to reproduce

Build a cogent core app for android

Relevant output

/home/sewn/go/pkg/mod/cogentcore.org/[email protected]/gpu/device.go:56:8: cannot use 0xFFFFFF00 (untyped int constant 4294967040) as int value in assignment (overflows)

Platform

Android

sewnie avatar May 24 '25 16:05 sewnie

Thank you for reporting this issue. We will fix this soon.

In the meantime, if you specify the specific architecture you want to build for, it will fix it, since this is an issue with 32-bit Android. For example, core build android/amd64 and core run android should both work. (core build android builds for all four architectures by default, whereas core run android only builds for arm64 by default).

kkoreilly avatar May 24 '25 17:05 kkoreilly

We fixed this issue in #1594. This should work now with the latest version of Cogent Core (go get cogentcore.org/core@main). Thank you for your patience.

kkoreilly avatar Jul 16 '25 22:07 kkoreilly