Missing libselinux.so.1

I’m trying to build my owm kernel for android. Build script gives me this error:

kernel-5.10/tools/build/tar: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory 
make[2]: *** [/home/uwu/KernelDevelopment/SM-A245F_14_Opensource/kernel-5.10/kernel/Makefile:155: kernel/kheaders_data.tar.xz] Error 127 
make[1]: *** [/home/uwu/KernelDevelopment/SM-A245F_14_Opensource/kernel-5.10/
Makefile:1918: kernel] Error 2 
make[1]: *** Waiting for unfinished jobs....

I don’t know how to download libselinux.so.1 to my system. I searched for information several times on the internet but that doeasn’t help me.

locate libselinux.so.1 gives me this:

/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/23.08/94f4007f3da9cc308a6ae4b5e78abc4295e1eaf45becb1bf7c3c4db958108547/files/lib/x86_64-linux-gnu/libselinux.so.1

I tried:
sudo pacman -S libselinux
sudo pacman -Ss libselinux
yay -S libselinux

but nothing worked

I build samsung kernel with toolchain that i also downloaded from opensource.samsung.com

Welcome to the forums :enos:

This is really beyond the scope of this forum. The forum is here to support issues and questions with the OS. I think you would be better asking over at XDA or another Developer forum. This is really just a User forum.

Kernel is a part where you are alone no one can help you , you have to work on your own because unlike manjaro endeavouros uses the arch kernel , it doesn’t have the custom kernel with modified parameters, even i do kernel development stuff and i have to use my brain to solve the problems, i fail many times but i keep my brain in pressure so that it finds the easiest way to solve the problem :slight_smile: it also increases my productivity and brain power

You sure you got all the required packages btw?

Use makepkg

libselinux is in the AUR. What happens when you search for it using yay?

yay -Ss libselinux
aur/libselinux-python2 3.4-1 (+1 0.00)
    SELinux library and simple utilities (python 2.x bindings)
aur/libselinux-static 3.6-1 (+0 0.00)
    SELinux library (static version)
aur/libselinux 3.6-3 (+130 1.60)
    SELinux library and simple utilities

I get this but after installation i get same error that there is no libselinux.so.1

yay -Ss libselinux
aur/libselinux-python2 3.4-1 (+1 0.00) 
    SELinux library and simple utilities (python 2.x bindings)
aur/libselinux-static 3.6-1 (+0 0.00) 
    SELinux library (static version)
aur/libselinux 3.6-3 (+130 1.60) 
    SELinux library and simple utilities

Run this command again. Is the build of the libselinux package completing successfully? If not, what error messages are you getting?

Since you are trying to compile a kernel with selinux support, I would think you would need the dev or devel version of that libary or maybe it needs an Android specific selinux library since you are compiling an Android kernel?

there is no error after this command

okay. I’ll try and reply later

OK, great, that should mean that the package installed properly.

So, what does this return now:

pacman -Qe libselinux

Hello and welcome,

The wiki could help :
https://wiki.archlinux.org/title/Android#Building

libselinux 3.6-3


I solved problem:

pkgfile -s libcrypt.so.1

core/libxcrypt-compat
extra/riscv64-linux-gnu-glibc
multilib/lib32-libxcrypt-compat

I instlled

core/libxcrypt-compat
multilib/lib32-libxcrypt-compat

And i dont get his error. Thanks to everyone

thanks

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.