Build fails with “library found in package”
Error message:- Remove the bundled library from your package.
-
Update your build configuration to link dynamically:
-
Rebuild your package:
-
Verify the library is no longer bundled:
Runtime error: “cannot open shared object file”
Error message:- Verify the library isn’t on the Vega OS public ABI list.
-
Bundle the library in your package:
-
Rebuild and reinstall your package:
Symbol resolution fails at runtime
Error message:-
Identify which library provides the missing symbol:
-
Add an explicit dependency using
DT_NEEDEDordlopen(): -
Rebuild your package:
Library loaded from wrong namespace
Symptom: Your app crashes or behaves unexpectedly when calling library functions, even though the library appears to load successfully. Cause: The dynamic linker loaded a different version of the library than expected, typically because:- You used a fully-qualified path in
dlopen() - The library name matches one on the public ABI list
-
Use unqualified library names in
dlopen()calls: - Check for public ABI conflicts Verify your library isn’t on the public ABI list. If it is, the system version will always load.
-
Test on actual devices to confirm correct library loading:
ABI validation passes but runtime fails
Symptom: Your package passes build-time ABI validation, but the app fails at runtime with linker errors. Cause: Build-time validation can’t catch all runtime scenarios, particularly:- Dynamic
dlopenpaths constructed at runtime - Ambient symbol dependencies
- Conditional library loading based on runtime state
-
Review all
dlopen()calls in your code for dynamic path construction: - Ensure you’re using unqualified library names.
- Test thoroughly on physical devices.
-
Check device logs for linker errors:
Missing DT_NEEDED entries
Symptom: Your app builds successfully but fails at runtime with missing symbol errors. Cause: Your build configuration doesn’t properly declare library dependencies, causing the linker to skip addingDT_NEEDED entries.
Solution:
-
Check current
DT_NEEDEDentries: -
Add missing dependencies to your build configuration:
-
Rebuild and verify
DT_NEEDEDentries are present:
Conflicting library versions
Symptom: Your app works on the Vega Virtual Device but fails on physical devices, or vice versa. Cause: Different library versions between your bundled libraries and system libraries, or between virtual and physical device environments. Solution:-
Verify which libraries you bundled in your package:
-
Check for libraries that you should link dynamically instead:
- Compare your bundled libraries against the public ABI list
- Remove any matches and link them dynamically
- Test on both virtual and physical devices to ensure consistency.
Related topics
- Manage native libraries with linker namespacing
- Validate Your Package with Strict ABI Check
- Use VPT for Vega App Packages

