Skip to contentSkip to conversation

problems about __cli()

DISCUSSION Iain Sandoe 6 participants 7 messages Jul 20, 2000 – Jul 24, 2000

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Josh Huber
Quoted 1 line · Iain Sandoe

[snip]

Quoted 4 lines

It is *vital* to make sure that there is a symlink named 'linux' in /usr/src that points to your /usr/src/your-kernel-foo-bar/ because there are symlinks in /usr/include that expect to use this to find the build-specific headers.

Quoted 7 lines

A couple notes:

You don't have to put your kernel in /usr/src, and you DON'T have to symlink /usr/src/linux to it before you build. The symlinks (on broken RedHat derivatives) in /usr/include should point to the kernel headers that your libc was built againt, otherwise you risk breaking binary compatibility.

I guess I *must* have one of those broken derivatives... and it doesn't work for me without that step... Admittedly, this is mostly an issue between 2.2.xx and 2.4.0 - but I do have to remember to change it back between whiles... a better way would be ?

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 4 lines · Iain Sandoe

I guess I *must* have one of those broken derivatives... and it doesn't work for me without that step... Admittedly, this is mostly an issue between 2.2.xx and 2.4.0 - but I do have to remember to change it back between whiles... a better way would be ?

Well...hmm, what doesn't work? You mean you can't build a kernel unless you make /usr/src/linux point to the kernel source you're building? This is odd, as I haven't done that...ever! In fact, there's no directories in /usr/src on my machine.

I'm confused, as I've built many kernels on a redhat box here (intel, but that shouldn't matter) without every updating the symlink, or using /usr/src to build inside.

I tend to have very large amounts of kernel source laying around, and I don't like to clutter my /usr partition with them...

Signature · 3 lines
Josh
6B21489A | GnuPG ID/Fingerprint | [email protected] |
61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A
#6 lore raw
In reply to Iain Sandoe
Quoted 19 lines · Iain Sandoe
Quoted 9 lines · Josh Huber
Quoted 1 line · Iain Sandoe

[snip]

Quoted 5 lines

It is *vital* to make sure that there is a symlink named 'linux' in /usr/src that points to your /usr/src/your-kernel-foo-bar/ because there are symlinks in /usr/include that expect to use this to find the build-specific headers.

Quoted 7 lines

A couple notes:

You don't have to put your kernel in /usr/src, and you DON'T have to symlink /usr/src/linux to it before you build. The symlinks (on broken RedHat derivatives) in /usr/include should point to the kernel headers that your libc was built againt, otherwise you risk breaking binary compatibility.

Quoted 4 lines

I guess I *must* have one of those broken derivatives... and it doesn't work for me without that step... Admittedly, this is mostly an issue between 2.2.xx and 2.4.0 - but I do have to remember to change it back between whiles... a better way would be ?

Have you tried 'make mrproper' (backup your .config ;), put back the old config, then 'make oldconfig dep vmlinux'? AFAIK the directory where the tree resides only matters after make dep, and the connection is untied with make mrproper.

Michel

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to Josh Huber
Quoted 10 lines · Josh Huber
Quoted 4 lines · Iain Sandoe

I guess I *must* have one of those broken derivatives... and it doesn't work for me without that step... Admittedly, this is mostly an issue between 2.2.xx and 2.4.0 - but I do have to remember to change it back between whiles... a better way would be ?

Well...hmm, what doesn't work? You mean you can't build a kernel unless you make /usr/src/linux point to the kernel source you're building? This is odd, as I haven't done that...ever! In fact, there's no directories in /usr/src on my machine.

IIRC, there was a time (long before 2.0) that kernel builds did look for includes in /usr/include/, so you had to unpack (or symlink) your kernel in /usr/src/linux/. Fortunately the include path was changed to put root_of_build/include first.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 8 lines · Geert Uytterhoeven

On Thu, 20 Jul 2000, Josh Huber wrote:

You don't have to put your kernel in /usr/src, and you DON'T have to symlink /usr/src/linux to it before you build. The symlinks (on broken RedHat derivatives) in /usr/include should point to the kernel headers that your libc was built againt, otherwise you risk breaking binary compatibility.

This is an argument I have heard several times, but I never understood:
If this risks breaking binary compatibility, then your kernel (compiled with its own headers, after all) might not be binary compatible with your glibc. Not nice.

Quoted 11 lines
Quoted 10 lines · Iain Sandoe
Quoted 4 lines

I guess I *must* have one of those broken derivatives... and it doesn't work for me without that step... Admittedly, this is mostly an issue between 2.2.xx and 2.4.0 - but I do have to remember to change it back between whiles... a better way would be ?

Well...hmm, what doesn't work? You mean you can't build a kernel unless you make /usr/src/linux point to the kernel source you're building? This is odd, as I haven't done that...ever! In fact, there's no directories in /usr/src on my machine.

Quoted 4 lines

IIRC, there was a time (long before 2.0) that kernel builds did look for includes in /usr/include/, so you had to unpack (or symlink) your kernel in /usr/src/linux/. Fortunately the include path was changed to put root_of_build/include first.

There *are* situations where you need /usr/src/linux to point to your current kernel sources. This is when you compile modules for the current kernel, a prominent example being MOL.

--
Martin

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 3 lines · Martin Costabel

There *are* situations where you need /usr/src/linux to point to your current kernel sources. This is when you compile modules for the current kernel, a prominent example being MOL.

Actually, I prefer to add a -I/path/to/kernel/include to the module makefiles rather than the /usr/src/linux symlink. I suppose it's personal preference, but I find that having to explicitly specify where the kernel source is reduces the posibility of a screwed compile.

Signature · 3 lines
Josh
6B21489A | GnuPG ID/Fingerprint | [email protected] |
61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A
#5 lore raw
Quoted 10 lines · Josh Huber
Quoted 3 lines · Martin Costabel

There *are* situations where you need /usr/src/linux to point to your current kernel sources. This is when you compile modules for the current kernel, a prominent example being MOL.

Actually, I prefer to add a -I/path/to/kernel/include to the module makefiles rather than the /usr/src/linux symlink. I suppose it's personal preference, but I find that having to explicitly specify where the kernel source is reduces the posibility of a screwed compile.

Moreover, your method Josh is the only sane method IMHO. Trusting /usr/src/linux to be correct for whatever kernel version you are building against is Russian roulette (to put it lightly)...

Jeff

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/