VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: [SOLVED] Compiling error (/lib/cpp)  (Read 2501 times)

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
[SOLVED] Compiling error (/lib/cpp)
« on: August 02, 2007, 07:10:10 pm »

Hello, all.

Something is very wrong in this box of mine.
Using 5.8 Standard, I don't seem to be able to compile anything.

I've tried with 3 different applications, and during ./configure I get the following error:

Code: [Select]
configure: error: C preprocessor "/lib/cpp" fails sanity check
This includes applications that I've successfully compiled before (the same versions).

So, I must have broken something. I've been more or less careful with my upgrades, although a major one has been a kernel upgrade to 2.6.21-ck2 (that actually went a bit wrong at some points).

Any ideas?
Thank you.
« Last Edit: August 03, 2007, 03:57:17 am by wcs »
Logged

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: Compiling error (/lib/cpp)
« Reply #1 on: August 02, 2007, 11:02:19 pm »

That can happen if lots of important headers go missing from /usr/include or if you install unsanitized kernel headers.
This has happened to me before, but I never got arround to fixing it.  :(
Logged

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
Re: Compiling error (/lib/cpp)
« Reply #2 on: August 03, 2007, 03:48:50 am »

Oh, so it's a headers problem.
That's great to know.

I actually have no headers at all installed. In the process of upgrading the kernel I ended up removing all the packages of the previous kernel (2.6.18.5) by mistake.

I'll try installing the headers for 2.6.18.5 as they are the only headers package available. Isn't it a problem that the headers are not 2.6.21-ck2 as well?

Thank you!

EDIT: Compiling now works like a charm. Headers are 2.6.18.5; kernel, source, and modules are 2.6.21-ck2.
« Last Edit: August 03, 2007, 03:57:04 am by wcs »
Logged

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: [SOLVED] Compiling error (/lib/cpp)
« Reply #3 on: August 03, 2007, 11:21:38 am »

The headers for the kernel don't change much. Using 2.6.18.5 headers should work fine for (nearly) all other 2.6.x kernels.
Hell, VL 5.8 ships with Slackware's 2.4 kernel headers and those work fine 99% of the time!  ;)
Logged

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
Re: [SOLVED] Compiling error (/lib/cpp)
« Reply #4 on: August 03, 2007, 12:10:54 pm »

Didn't know that  :)

I suppose there should be no differences for something like the nvidia driver or the VirtualBox kernel module, no?
Does the nvidia driver only need the kernel sources?

Thanks a lot.
Logged

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: [SOLVED] Compiling error (/lib/cpp)
« Reply #5 on: August 03, 2007, 12:36:00 pm »

Didn't know that  :)

I suppose there should be no differences for something like the nvidia driver or the VirtualBox kernel module, no?
Does the nvidia driver only need the kernel sources?

Thanks a lot.

Actually, the kernel headers used for device drivers are included with the kernel sources (/usr/src/linux-2.6.x.x/include), so that is never a problem.

When installing the kernel headers to /usr/include they are "sanitized" before being installed, in other words, made fit for use with userspace apps that might need direct access to the kernel, but that are in no way tied into the kernel itself (eg: UDEV, HAL and DBUS).
Logged

wcs

  • Packager
  • Vectorian
  • ****
  • Posts: 1144
Re: [SOLVED] Compiling error (/lib/cpp)
« Reply #6 on: August 04, 2007, 07:08:03 am »

Now I get it.
That was very informative, easuter.

Thank you.
Logged