Skip to content

Commit deed34e

Browse files
committed
examples: pin jni to 1.0.0 (1.0.1 breaks aarch64 Linux builds)
jni 1.0.1, published 2026-07-27T01:10Z, added global_jni_env.c, which passes a `va_list` where a `void *` is expected. On x86_64 va_list is an array type that decays to a pointer so it compiles; on aarch64 it is a struct, so it is a hard error and `flutter build linux` fails with 19 of them. Tracked upstream at dart-lang/native#3498. This surfaced on the release PR rather than as a scheduled failure because the examples depend on the serious_python packages by path: bumping their version invalidates the committed pubspec.lock, pub re-resolves the whole graph, and picks up the newest transitive versions. Any PR touching package versions after 2026-07-27T01:10Z would have hit it. jni itself arrives via path_provider -> path_provider_android -> jni_flutter -> jni. jni_flutter 1.0.1 declares `jni: ^1.0.0`, so 1.0.0 satisfies it -- the override narrows within the allowed range rather than overriding a constraint. Applied to all three examples; only bridge_example runs in CI, but the other two break identically for anyone building them on an ARM64 Linux host. The flask_example / run_example locks also pick up the current path-dependency version (4.0.0 -> 4.4.1); they were simply stale.
1 parent 3ee5620 commit deed34e

5 files changed

Lines changed: 41 additions & 14 deletions

File tree

src/serious_python/example/bridge_example/pubspec.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,14 @@ dev_dependencies:
2424
sdk: flutter
2525
flutter_lints: ^2.0.0
2626

27+
# jni arrives transitively (path_provider -> path_provider_android ->
28+
# jni_flutter -> jni). 1.0.1 added global_jni_env.c, which passes a `va_list`
29+
# where a `void *` is expected: fine on x86_64, where va_list is an array type
30+
# that decays to a pointer, but a hard error on aarch64, where it's a struct.
31+
# That breaks `flutter build linux` on ARM64 hosts. Tracked upstream at
32+
# dart-lang/native#3498 — drop this override once a fixed jni is released.
33+
dependency_overrides:
34+
jni: 1.0.0
35+
2736
flutter:
2837
uses-material-design: true

src/serious_python/example/flask_example/pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ packages:
156156
source: hosted
157157
version: "4.1.2"
158158
jni:
159-
dependency: transitive
159+
dependency: "direct overridden"
160160
description:
161161
name: jni
162162
sha256: c2230682d5bc2362c1c9e8d3c7f406d9cbba23ab3f2e203a025dd47e0fb2e68f
@@ -361,42 +361,42 @@ packages:
361361
path: "../.."
362362
relative: true
363363
source: path
364-
version: "4.0.0"
364+
version: "4.4.1"
365365
serious_python_android:
366366
dependency: transitive
367367
description:
368368
path: "../../../serious_python_android"
369369
relative: true
370370
source: path
371-
version: "4.0.0"
371+
version: "4.4.1"
372372
serious_python_darwin:
373373
dependency: transitive
374374
description:
375375
path: "../../../serious_python_darwin"
376376
relative: true
377377
source: path
378-
version: "4.0.0"
378+
version: "4.4.1"
379379
serious_python_linux:
380380
dependency: transitive
381381
description:
382382
path: "../../../serious_python_linux"
383383
relative: true
384384
source: path
385-
version: "4.0.0"
385+
version: "4.4.1"
386386
serious_python_platform_interface:
387387
dependency: transitive
388388
description:
389389
path: "../../../serious_python_platform_interface"
390390
relative: true
391391
source: path
392-
version: "4.0.0"
392+
version: "4.4.1"
393393
serious_python_windows:
394394
dependency: transitive
395395
description:
396396
path: "../../../serious_python_windows"
397397
relative: true
398398
source: path
399-
version: "4.0.0"
399+
version: "4.4.1"
400400
shelf:
401401
dependency: transitive
402402
description:

src/serious_python/example/flask_example/pubspec.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ dev_dependencies:
5656
# following page: https://dart.dev/tools/pub/pubspec
5757

5858
# The following section is specific to Flutter packages.
59+
# jni arrives transitively (path_provider -> path_provider_android ->
60+
# jni_flutter -> jni). 1.0.1 added global_jni_env.c, which passes a `va_list`
61+
# where a `void *` is expected: fine on x86_64, where va_list is an array type
62+
# that decays to a pointer, but a hard error on aarch64, where it's a struct.
63+
# That breaks `flutter build linux` on ARM64 hosts. Tracked upstream at
64+
# dart-lang/native#3498 — drop this override once a fixed jni is released.
65+
dependency_overrides:
66+
jni: 1.0.0
67+
5968
flutter:
6069

6170
# The following line ensures that the Material Icons font is

src/serious_python/example/run_example/pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ packages:
171171
source: sdk
172172
version: "0.0.0"
173173
jni:
174-
dependency: transitive
174+
dependency: "direct overridden"
175175
description:
176176
name: jni
177177
sha256: c2230682d5bc2362c1c9e8d3c7f406d9cbba23ab3f2e203a025dd47e0fb2e68f
@@ -384,42 +384,42 @@ packages:
384384
path: "../.."
385385
relative: true
386386
source: path
387-
version: "4.0.0"
387+
version: "4.4.1"
388388
serious_python_android:
389389
dependency: transitive
390390
description:
391391
path: "../../../serious_python_android"
392392
relative: true
393393
source: path
394-
version: "4.0.0"
394+
version: "4.4.1"
395395
serious_python_darwin:
396396
dependency: transitive
397397
description:
398398
path: "../../../serious_python_darwin"
399399
relative: true
400400
source: path
401-
version: "4.0.0"
401+
version: "4.4.1"
402402
serious_python_linux:
403403
dependency: transitive
404404
description:
405405
path: "../../../serious_python_linux"
406406
relative: true
407407
source: path
408-
version: "4.0.0"
408+
version: "4.4.1"
409409
serious_python_platform_interface:
410410
dependency: transitive
411411
description:
412412
path: "../../../serious_python_platform_interface"
413413
relative: true
414414
source: path
415-
version: "4.0.0"
415+
version: "4.4.1"
416416
serious_python_windows:
417417
dependency: transitive
418418
description:
419419
path: "../../../serious_python_windows"
420420
relative: true
421421
source: path
422-
version: "4.0.0"
422+
version: "4.4.1"
423423
shelf:
424424
dependency: transitive
425425
description:

src/serious_python/example/run_example/pubspec.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ dev_dependencies:
5858
# following page: https://dart.dev/tools/pub/pubspec
5959

6060
# The following section is specific to Flutter packages.
61+
# jni arrives transitively (path_provider -> path_provider_android ->
62+
# jni_flutter -> jni). 1.0.1 added global_jni_env.c, which passes a `va_list`
63+
# where a `void *` is expected: fine on x86_64, where va_list is an array type
64+
# that decays to a pointer, but a hard error on aarch64, where it's a struct.
65+
# That breaks `flutter build linux` on ARM64 hosts. Tracked upstream at
66+
# dart-lang/native#3498 — drop this override once a fixed jni is released.
67+
dependency_overrides:
68+
jni: 1.0.0
69+
6170
flutter:
6271

6372
# The following line ensures that the Material Icons font is

0 commit comments

Comments
 (0)