About using the kernel's sources as libs

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
fantasmaazul
Posts: 2
Joined: Fri May 24, 2024 1:40 am

About using the kernel's sources as libs

Post by fantasmaazul »

I need the the file string.h to compile something and the system cannot find it.
using find:

Code: Select all

# find / -name string.h
/usr/src/kbuild-6.1.106/arch/x86/include/asm/string.h
/usr/src/kbuild-6.1.106/include/asm-generic/string.h
/usr/src/kbuild-6.1.106/include/linux/string.h
/usr/src/kbuild-6.1.106/include/uapi/linux/string.h
/usr/src/kbuild-6.1.106/tools/include/linux/string.h
/usr/src/kbuild-6.1.106/tools/include/nolibc/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/arch/x86/include/asm/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/include/asm-generic/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/include/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/include/uapi/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/tools/include/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/tools/include/nolibc/string.h

I think those are the kernel souces...
Can i use them? i should add them to PATH?

fantasmaazul
Posts: 2
Joined: Fri May 24, 2024 1:40 am

Re: About using the kernel's sources as libs

Post by fantasmaazul »

i almost destroyed the system trying another thing. Good thing this is puppy. I rebooted with no consequences.

i tried again and now is there!

Code: Select all

# find / -name string.h
/usr/include/string.h
/usr/include/spa-0.2/spa/utils/string.h
/usr/include/linux/string.h
/usr/src/kbuild-6.1.106/arch/x86/include/asm/string.h
/usr/src/kbuild-6.1.106/include/asm-generic/string.h
/usr/src/kbuild-6.1.106/include/linux/string.h
/usr/src/kbuild-6.1.106/include/uapi/linux/string.h
/usr/src/kbuild-6.1.106/tools/include/linux/string.h
/usr/src/kbuild-6.1.106/tools/include/nolibc/string.h
/initrd/pup_ro3/usr/include/linux/string.h
/initrd/pup_ro3/usr/include/spa-0.2/spa/utils/string.h
/initrd/pup_ro3/usr/include/string.h
/initrd/mnt/tmpfs/pup_rw/usr/include/string.h
/initrd/mnt/tmpfs/pup_rw/usr/include/spa-0.2/spa/utils/string.h
/initrd/mnt/tmpfs/pup_rw/usr/include/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/arch/x86/include/asm/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/include/asm-generic/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/include/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/include/uapi/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/tools/include/linux/string.h
/initrd/pup_k/usr/src/kbuild-6.1.106/tools/include/nolibc/string.h

i guess I re-installed the devx package, probably was that
bye bye!

ozsouth
Posts: 1569
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 241 times
Been thanked: 704 times

Re: About using the kernel's sources as libs

Post by ozsouth »

@fantasmaazul Welcome! - for most puppies, you need to install devx & sources to compile drivers. In aufs, this is done on the fly (loaded in a running system). In overlayfs, devx will load on boot if placed in same folder as puppy sfs, but sources need to be either loaded on boot (first renamed as ydrv or bdrv in modern pups) or in in some pups can be loaded on the fly.

Post Reply

Return to “Programming”