You are not logged in.

#1 2008-10-12 11:57:35

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

A few wide and varied questions about Linux in general

I've had a few "I wonder..." things noodling in the back of my head for a while now about the Linux kernel, and how Linux works in general. Yes, I could just install LFS to answer them, but I like knowing what I'm doing before I do it and asking is typically an awesome way to do that tongue

So, here are a bunch of questions. Answer what you know, speculate on what you think. Feel free to answer just one or all of them.

Also, if you feel inspired from these questions or just this thread's very existance and want to ask questions of your own please do!

Compilation questions
When I compiled Openbox recently, it linked such that I can't move it out of my home folder, and additionally, when I run /usr/bin/openbox, I end up executing /Users/dav7/openbox/openbox-3.4.7.2/openbox/.libs/lt-openbox - why is this, and how can I make openbox... not do the weirdness it's currently doing? neutral

Library questions
- In Arch's initramfs image, klibc is named "klibc-EcjIkSXUojTZn3VHC4IxoFgq9Kg.so", at least it was at my last check. Why is this? Why/how do other programs link with this crazily named copy of klibc? How does library linking work actually? How did the linker know to use this klibc name and not something else?
- How do I specify that I want to link against a specific library, for example if I want to link a program against klibc when I have glibc installed? Do I have to create a chroot jail to convince the linker to see only the library I want it to?
- Can I build the Kdrive X server with klibc, or do I need ulibc or glibc? How much (read: what "class" or category of programs) will klibc link against without problems, especially in the X area? Will I need ulibc to build anything X-based?

-dav7

Last edited by dav7 (2008-10-12 12:06:24)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#2 2008-10-13 07:42:08

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: A few wide and varied questions about Linux in general

Bump? neutral


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#3 2008-10-13 12:10:11

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: A few wide and varied questions about Linux in general

Er, I'm pretty sure I'm not an expert, so my "answers" will be almost surely incomplete/incorrect. smile

1) I suppose by "compiling openbox" you mean the standard "./configure; make; make install" procedure. Well, the "./configure" step lets you choose various paths related to the final product. Crunch through "./configure --help". "./configure" script creates/modifies all the makefiles, so that they reflect your choices of paths, and that's what's going to be used.

2) - dynamic linking is manages by /sbin/ldconfig - so have a look at 'man ldconfig'. that's how linker knows what's available.
- with klibc, I think you need to have the whole toolchain (binutils, gcc, klibc) adapted to klibc available to compile against klibc. Then it's a matter of compiling with those tools. I think it's impossible to use the standard gcc and binutils to compile against klibc.
- I have no idea about what compiles against klibc. I think not too much, and with heavy patching. I'm pretty sure you can compile some version of x server against uclibc (that's what openwrt does). Have a look at some small distros (slitaz, dsl) on how are they doing it.

Offline

Board footer

Powered by FluxBB