libselinux: fix build on 32-bit LFS platforms#391728
Conversation
|
I've also checked we still get the two symbols in x86 # nm -D /nix/store/4agsd6q8snyzihf1zkn3n7izdmxafycb-libselinux-i686-unknown-linux-gnu-3.8/lib/libselinux.so | grep add
U ___tls_get_addr@GLIBC_2.3
000091cd T avc_add_callback@@LIBSELINUX_1.0
0001b358 T matchpathcon_filespec_add@@LIBSELINUX_1.0
0001b0fb T matchpathcon_filespec_add64@@LIBSELINUX_3.8
U readdir64@GLIBC_2.2
0001eadd T selinux_failsafe_context_path@@LIBSELINUX_1.0as expected this causes a mass rebuild so I'll target staging |
adbde4f to
3f447cd
Compare
dc49ec2 to
a006460
Compare
a006460 to
c7acf11
Compare
see the linked pull request for more details, basically upstream tried to improve compatibility for platforms where ino_t defaults to 32-bit, and in the process broke 32-bit platforms where ino_t defaults to 64-bit. patch is in upstream review.
c7acf11 to
3bf8021
Compare
|
Patch looks fine to me. |
|
upstream has (to the best of my knowledge) remained silent on this issue for almost 2 months now. |
|
That sounds fine to me. |
|
thanks!! |
|
Broke musl :( |
|
huh, i am surprised that this even compiled with musl to begin with, I thought |
|
Already submitted a patch upstream :) |
|
Please test: #402027 |
|
thanks for fixing! I think you forgot to add the okay it isn't 100% correct, as it would IIUC still fail when building with but I'm still confused... the code was using |
It's not that other libcs aren't 2038-proof, it's that only Glibc lets you mix 2038-proof and non-2038-proof types. musl only provides 64-bit types.
I certainly don't care about 32-bit platforms, and I've never come across anybody else who does for musl in Nixpkgs either, so I think it's just that nobody noticed. |
I guess I did — surprising to me that it built… |
I know, y2038 proofness design refers to the whole
yeah, it does build, just with the symbol renamed to [...]add64 since the define affects both prototype and definition in the .c
ah okay, that expains it then :) |
Compilation of libselinux on modern 32-bit platforms has been broken since v3.8. For example:
A debian maintainer and me prepared a fix in SELinuxProject/selinux#464 (see discussion and first commit), and I'd like to get this patch here while it's reviewed and released upstream (hopefully in some months). The patch is small and I've tested it doesn't break the build on x64 (a 64-bit platform) and x86 (a 32-bit non-LFS platform).
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.