Skip to content

enhance(headers): mark C/C++ header-only packages as platform independent - #33503

Merged
twaik merged 18 commits into
termux:masterfrom
SjnExe:header-only-arch-independent
Dec 1, 2026
Merged

twaik merged 18 commits into
termux:masterfrom
SjnExe:header-only-arch-independent

Conversation

@SjnExe

@SjnExe SjnExe commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Changes

Marks 24 pure C/C++ header-only template libraries with TERMUX_PKG_PLATFORM_INDEPENDENT=true. These libraries only install C/C++ header files (.h, .hpp) and CMake/pkg-config metadata files under $PREFIX/include/ and $PREFIX/lib/pkgconfig/ with zero compiled ELF binaries, shared libraries (.so), or static archives (.a).

Note: eigen and glm were excluded because eigen compiles shared/static BLAS/LAPACK libraries (libeigen_blas.so, libeigen_lapack.so) and glm compiles static library libglm.a.

Part of architecture-independent package optimization split (<= 25 packages per PR, per TomJo2000 feedback):

Packages (24 Total)

cli11, ctre, doctest, eigen3, immer, lager, libmsgpack-cxx, libprotozero, librinutils, libtllist, lv2, ms-gsl, nlohmann-json, range-v3, robin-map, simde, sparsehash, stb, stduuid, toml11, tomlplusplus, urdfdom-headers, xsimd, zug

Verification

All 24 package artifacts were extracted and audited: verified zero .so shared libraries, zero .a static libraries, and zero ELF binaries across all generated deb archives.

@twaik

twaik commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Some ci artifacts meant to be "platform independent" contain platform dependent content (shared and static libraries). You should fix it.

@SjnExe

SjnExe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Some ci artifacts meant to be "platform independent" contain platform dependent content (shared and static libraries). You should fix it.

Let me check

@SjnExe
SjnExe force-pushed the header-only-arch-independent branch from d1b3614 to 36e060d Compare November 19, 2026 17:47
@SjnExe

SjnExe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Some ci artifacts meant to be "platform independent" contain platform dependent content (shared and static libraries). You should fix it.

Thanks for pointing them out, i removed both of them. Now this PR should be good now👍🏻

@TomJo2000

TomJo2000 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

It might be a good idea to add an automatic check for that.
something along the lines of

if [[ "$TERMUX_PKG_PLATFORM_INDEPENDENT" == "true" && "$elf_files" -gt 0 ]]; then
    termux_error_exit "Found ELF files in architecture independent package"
fi

I'll see if I can come up with something more concrete.
Should definitely be its own PR.

@SjnExe

SjnExe commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

It might be a good idea to add an automatic check for that. something along the lines of

if [[ "$TERMUX_PKG_PLATFORM_INDEPENDENT" == "true" && "$elf_files" -gt 0 ]]; then
    termux_error_exit "Found ELF files in architecture independent package"
fi

I'll see if I can come up with something more concrete. Should definitely be its own PR.

That would make it easy to find arch indipendent packages using trial and error.

@twaik

twaik commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

It might be a good idea to add an automatic check for that. something along the lines of

if [[ "$TERMUX_PKG_PLATFORM_INDEPENDENT" == "true" && "$elf_files" -gt 0 ]]; then
termux_error_exit "Found ELF files in architecture independent package"
fi
I'll see if I can come up with something more concrete. Should definitely be its own PR.

Emmmm... Some platform-independent packages are host-building tools. They definitely should have elf files.
It will be better to check that all platform independent packages are equal by content.
#33532

@SjnExe
SjnExe force-pushed the header-only-arch-independent branch from e3e8394 to 2f1cb51 Compare November 25, 2026 05:06
Disable test, example, and doc builds (-Dimmer_BUILD_TESTS=OFF etc.)
and drop test-only catch2 build dependency to prevent CMake from
failing on missing Catch2 static archive during configuration.
Disable test, example, and doc builds (-Dzug_BUILD_TESTS=OFF etc.)
and drop test-only catch2 build dependency to prevent CMake from
failing on missing Catch2 static archive during configuration.
@twaik
twaik force-pushed the header-only-arch-independent branch from 2f1cb51 to 3900905 Compare December 1, 2026 18:22
@SjnExe

SjnExe commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@twaik Going to merge? Do i need to do anything?

@twaik
twaik merged commit 9ddff28 into termux:master Dec 1, 2026
11 checks passed
@twaik

twaik commented Dec 1, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants