Bug#854743: golang-github-mailru-easyjson: FTBFS (32-bit): constant 4294967295 overflows int

2019-03-06 Thread Ritesh Raj Sarraf
Package: src:golang-github-mailru-easyjson
Followup-For: Bug #854743

Attached patch fixed the problem. Please consider it for Buster

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-3-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_USER, TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Fix picked from: https://github.com/mailru/easyjson/pull/150/files
Index: golang-github-mailru-easyjson-0.0~git20161103.0.159cdb8/benchmark/data.go
===
--- 
golang-github-mailru-easyjson-0.0~git20161103.0.159cdb8.orig/benchmark/data.go
+++ golang-github-mailru-easyjson-0.0~git20161103.0.159cdb8/benchmark/data.go
@@ -25,12 +25,12 @@ var smallStructData = Entities{
 type SearchMetadata struct {
CompletedIn float64 `json:"completed_in"`
Count   int `json:"count"`
-   MaxID   int `json:"max_id"`
+   MaxID   int64   `json:"max_id"`
MaxIDStrstring  `json:"max_id_str"`
NextResults string  `json:"next_results"`
Query   string  `json:"query"`
RefreshURL  string  `json:"refresh_url"`
-   SinceID int `json:"since_id"`
+   SinceID int64   `json:"since_id"`
SinceIDStr  string  `json:"since_id_str"`
 }
 
Index: golang-github-mailru-easyjson-0.0~git20161103.0.159cdb8/tests/data.go
===
--- golang-github-mailru-easyjson-0.0~git20161103.0.159cdb8.orig/tests/data.go
+++ golang-github-mailru-easyjson-0.0~git20161103.0.159cdb8/tests/data.go
@@ -88,10 +88,10 @@ var primitiveTypesString = "{" +
`"Int32":` + fmt.Sprint(math.MinInt32) + `,` +
`"Int64":` + fmt.Sprint(int64(math.MinInt64)) + `,` +
 
-   `"Uint":` + fmt.Sprint(math.MaxUint32) + `,` +
+   `"Uint":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
`"Uint8":` + fmt.Sprint(math.MaxUint8) + `,` +
`"Uint16":` + fmt.Sprint(math.MaxUint16) + `,` +
-   `"Uint32":` + fmt.Sprint(math.MaxUint32) + `,` +
+   `"Uint32":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
`"Uint64":` + fmt.Sprint(uint64(math.MaxUint64)) + `,` +
 
`"IntString":"` + fmt.Sprint(math.MinInt32) + `",` +
@@ -100,10 +100,10 @@ var primitiveTypesString = "{" +
`"Int32String":"` + fmt.Sprint(math.MinInt32) + `",` +
`"Int64String":"` + fmt.Sprint(int64(math.MinInt64)) + `",` +
 
-   `"UintString":"` + fmt.Sprint(math.MaxUint32) + `",` +
+   `"UintString":"` + fmt.Sprint(uint32(math.MaxUint32)) + `",` +
`"Uint8String":"` + fmt.Sprint(math.MaxUint8) + `",` +
`"Uint16String":"` + fmt.Sprint(math.MaxUint16) + `",` +
-   `"Uint32String":"` + fmt.Sprint(math.MaxUint32) + `",` +
+   `"Uint32String":"` + fmt.Sprint(uint32(math.MaxUint32)) + `",` +
`"Uint64String":"` + fmt.Sprint(uint64(math.MaxUint64)) + `",` +
 
`"Float32":` + fmt.Sprint(1.5) + `,` +
@@ -191,10 +191,10 @@ var namedPrimitiveTypesString = "{" +
`"Int32":` + fmt.Sprint(math.MinInt32) + `,` +
`"Int64":` + fmt.Sprint(int64(math.MinInt64)) + `,` +
 
-   `"Uint":` + fmt.Sprint(math.MaxUint32) + `,` +
+   `"Uint":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
`"Uint8":` + fmt.Sprint(math.MaxUint8) + `,` +
`"Uint16":` + fmt.Sprint(math.MaxUint16) + `,` +
-   `"Uint32":` + fmt.Sprint(math.MaxUint32) + `,` +
+   `"Uint32":` + fmt.Sprint(uint32(math.MaxUint32)) + `,` +
`"Uint64":` + fmt.Sprint(uint64(math.MaxUint64)) + `,` +
 
`"Float32":` + fmt.Sprint(1.5) + `,` +


Bug#854743: golang-github-mailru-easyjson: FTBFS (32-bit): constant 4294967295 overflows int

2017-02-09 Thread Aaron M. Ucko
Source: golang-github-mailru-easyjson
Version: 0.0~git20161103.0.159cdb8-1
Severity: important
Justification: fails to build from source

Builds of golang-github-mailru-easyjson for 32-bit architectures such
as i386 have been failing:

  # github.com/mailru/easyjson/tests
  src/github.com/mailru/easyjson/tests/data.go:91: constant 4294967295 
overflows int
  src/github.com/mailru/easyjson/tests/data.go:94: constant 4294967295 
overflows int
  src/github.com/mailru/easyjson/tests/data.go:103: constant 4294967295 
overflows int
  src/github.com/mailru/easyjson/tests/data.go:106: constant 4294967295 
overflows int
  src/github.com/mailru/easyjson/tests/data.go:194: constant 4294967295 
overflows int
  src/github.com/mailru/easyjson/tests/data.go:197: constant 4294967295 
overflows int

Could you please take a look?

Thanks!

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu