fix: rebuild linux-arm64 LibJpegWrap.so with decoder#1
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On arm64 deployments (e.g. Neuron hardware), any server-side JPEG decode path throws at startup:
The committed
runtimes/linux-arm64/native/LibJpegWrap.sowas a stale encoder-only build — it exported onlyCreateandEncode, with no decoder, even thoughLibJpegWrap.cppand the linux-x64/win binaries already had the full decoder API. It also linked the olderlibjpeg.so.62ABI, while x64 linkslibjpeg.so.8.Net effect: everything worked on x64 dev boxes and broke only on arm64 —
MjpegProvider.TryGetFrame()could never construct itsJpegCodec, so consumers that grab decoded frames (e.g. RocketWelder calibration camera snapshot, adaptive-point capture) failed hard.Fix
Rebuilt
runtimes/linux-arm64/native/LibJpegWrap.sofrom the current source in an Ubuntu 22.04 arm64 environment, linkinglibjpeg-turbo8-dev(libjpeg.so.8).Before → after exports:
Create, EncodeCreate, Encode, CreateDecoder, DecodeJpegToGray, DecodeJpegToI420, DecoderDecodeGray, DecoderDecodeI420, EncodeGray8ToJpeg, CreateBgraDecoder, DecoderDecodeBGRANEEDEDlibjpeg.so.62libjpeg.so.8The arm64 binary now matches the x64 binary in both API surface and libjpeg ABI.
Why linking
libjpeg.so.8mattersThe previous arm64 binary needed
libjpeg.so.62, which isn't present in the standard runtime images (they shiplibjpeg-turbo8/libjpeg.so.8). Linkinglibjpeg.so.8means no extra OS package is required in downstream images — this single change resolves both the missing-decoder error and the missing-libjpeg62dependency.Verification
nm -Don the rebuilt.soconfirms the full decoder symbol set above.objdump -pconfirmsNEEDED libjpeg.so.8.Follow-up
1.4.1release (viarelease.sh) is needed so consumers can pick up the fixed package.