[Debian/Build] Build ml-api on Ubuntu 26.04 (gcc fallback, C++17) - #692
[Debian/Build] Build ml-api on Ubuntu 26.04 (gcc fallback, C++17)#692myungjoo wants to merge 2 commits into
Conversation
The compiler alternatives stop at gcc-9, which no longer exists on Ubuntu 24.10 and later; Ubuntu 26.04 (resolute) ships gcc-13/14/15 only. Every Launchpad recipe build of ml-api for those series therefore stops at the build-dependency stage. Append the unversioned "gcc" as the last alternative so apt falls back to the archive default, exactly as nnstreamer and nnstreamer-edge already do. The older alternatives stay first, so 22.04 and 24.04 resolve exactly as before. The nnstreamer PPA now publishes nnstreamer, nnstreamer-edge, ssat, tensorflow2-lite and edgetpu for 26.04, so this is the only change ml-api needs to build there. No functional change; the packaging build was verified in an ubuntu:26.04 container against ppa:nnstreamer/ppa. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
[Automated review by a separate Claude agent, relayed to this PR by the author's account] Reviewed both commits (7ffa297, 492e55e) against a fresh checkout of the branch. Verdict: approve. No blocking findings; one minor commit-message nit. What was checked
Findings (ranked)
Nothing else. The change is the minimum needed and mirrors what nnstreamer (#4895) and nnstreamer-edge (#256) already merged. |
GoogleTest 1.17, which Ubuntu 26.04 ships, refuses anything older than C++17 with "#error C++ versions less than C++17 are not supported", so every gtest binary of ml-api fails to compile there while the libraries themselves build fine. Raise the meson default from c++14 to c++17. The Android build already uses -std=c++17 and nnstreamer itself has been on c++17 for a long time, so this only aligns the Ubuntu build with them. Every compiler a current series can resolve from the packaging, gcc-9 and later, supports it. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
492e55e to
792c886
Compare
|
[Relayed on behalf of the author by a Claude agent] Thanks. Finding 1 is fixed: the second commit's message now says "every compiler a current series can resolve from the packaging, gcc-9 and later, supports it" instead of the wrong gcc-7 claim (commit message only, no content change; force-pushed to the same branch). The gcc-5/6 alternatives are left as they are in this PR since no series that still has them is affected. Finding 2 is understood: 26.04 coverage comes from the Launchpad recipe once Resolute is added there, which is the next step after this merges. |
The compiler alternatives stop at gcc-13, which Ubuntu 26.04 (resolute) no longer ships, so the Launchpad recipe build of nntrainer for that series stops at the build-dependency stage. Append the unversioned "gcc" as the last alternative so apt falls back to the archive default, as nnstreamer and nnstreamer-edge already do (ml-api gets the same in nnstreamer/api#692). The versioned alternatives stay first, so 22.04 and 24.04 resolve exactly as before. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Why
ppa:nnstreamer/ppanow publishes nnstreamer, nnstreamer-edge, ssat, tensorflow2-lite and edgetpu for Ubuntu 26.04 (resolute), butml-apicannot follow: the Launchpad recipennstreamer-ml-api-dailystops at the build-dependency stage on 24.10 and later because every compiler alternative indebian/control(gcc-9 | gcc-8 | ... | gcc-5) has been dropped from the archive. Once past that, all four gtest binaries fail to compile on 26.04 because GoogleTest 1.17 refuses anything older than C++17.What
debian/control: append the unversionedgccas the last compiler alternative, the same fallback nnstreamer (#4895) and nnstreamer-edge ([Build] Compile and package on Ubuntu 26.04 (gcc 15) nnstreamer-edge#256) already carry. 22.04 and 24.04 still resolvegcc-9first, so nothing changes there.meson.build:cpp_std=c++14->c++17. The Android build already passes-std=c++17and nnstreamer has been on C++17 for years.How it was verified
Full packaging build in an
ubuntu:26.04container withppa:nnstreamer/ppaenabled,mk-build-depsfrom the modified control, thendpkg-buildpackage -us -uc -b(gcc 15.2.0, meson 1.10, openjdk 11 from the archive). Without the second commit the build stops within
unittest_capi_inference,unittest_capi_inference_single,unittest_capi_inference_latencyandunittest_capi_datatype_consistency. With both commits the build completes,override_dh_auto_test(packaging/run_unittests.sh) runs, and all eight.debs are produced.No functional change, so no new test case; the existing unit tests are what the C++17 change makes buildable again on 26.04.
Part of the 26.04 PPA work tracked in nnstreamer/nnstreamer#4902. After this merges, the Launchpad recipe needs Resolute added and a build requested (I can do that).
🤖 Generated with Claude Code