LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 01-05-2008, 02:43 AM   #1
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Rep: Reputation: 30
error: C preprocessor "/lib/cpp" fails sanity check


Hi,

I have a problem with the error in the title, I had a post in linux-software but I was advised to ask here instead.

http://www.linuxquestions.org/questi...-check-609923/

Thanks.
 
Old 01-05-2008, 04:00 AM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
Have you done this: apt-get install build-essential

Output of this please: dpkg -l|grep libglib|grep dev && ls -l `which {g++,gcc,cpp}`
 
Old 01-05-2008, 08:00 AM   #3
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
Yes I have installed build-essential

Code:
ii  libglib1.2-dev                    1.2.10-17                            The GLib library of C routines (development)
ii  libglib2.0-dev                    2.12.4-2                             Development files for the GLib library
ii  libglibmm-2.4-dev                 2.12.0-1                             C++ wrapper for the GLib toolkit (developmen
lrwxrwxrwx 1 root root 7 2007-12-17 07:51 /usr/bin/cpp -> cpp-4.1
lrwxrwxrwx 1 root root 7 2007-12-09 18:25 /usr/bin/g++ -> g++-4.1
lrwxrwxrwx 1 root root 7 2007-12-17 08:03 /usr/bin/gcc -> gcc-4.1
 
Old 01-05-2008, 08:54 AM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
What are you trying to compile? Link to source?
I can't open the pastebin config.log you posted, so grep for cc1 and post results.
Also grep for "command not found"
Do you get anything with "locate cc1"? Like: /usr/lib/gcc/i486-linux-gnu/4.2/cc1plus
If so you could symlink: ln -s /usr/lib/gcc/i486-linux-gnu/4.2/cc1plus /usr/bin/cc1plus
Same with /usr/lib/gcc/i486-linux-gnu/4.2/cc1 if you have it. Replace 4.2 with 4.1 as you use that.

EDIT: Well, reading more carefully your other thread, I see you're compiling glibc itself. Don't. Apt-get it instead. Might as well apt-get rar and unrar-nonfree as you are compiling winrar instead.

Last edited by makuyl; 01-05-2008 at 09:02 AM.
 
Old 01-05-2008, 12:39 PM   #5
Syche
LQ Newbie
 
Registered: Jan 2006
Posts: 9

Rep: Reputation: 0
just get rar or unrar from non-free. Compiling libc6 from source is not something you want to do...
 
Old 01-05-2008, 07:39 PM   #6
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
Quote:
EDIT: Well, reading more carefully your other thread, I see you're compiling glibc itself. Don't. Apt-get it instead. Might as well apt-get rar and unrar-nonfree as you are compiling winrar instead.
But then how do I install my wacom drivers... it has the same error... so does other programs...



Also, apt-get wont come through for me this time.

Code:
0x1:/home/main# apt-get install unrar
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  unrar
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 92.2kB of archives.
After unpacking 229kB of additional disk space will be used.
Get:1 http://http.us.debian.org stable/non-free unrar 1:3.5.4-1 [92.2kB]
Fetched 92.2kB in 2s (44.6kB/s)
Selecting previously deselected package unrar.
(Reading database ... 77383 files and directories currently installed.)
Unpacking unrar (from .../unrar_1%3a3.5.4-1_i386.deb) ...
Setting up unrar (3.5.4-1) ...
0x1:/home/main# unrar
unrar: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by unrar)
I need glibc-2.4 or higher, which leaves no real option but to do this. Besides, if I don't, then I can't install all my other stuff (like I said, wacom drivers, etc.)


Quote:
Do you get anything with "locate cc1"? Like: /usr/lib/gcc/i486-linux-gnu/4.2/cc1plus
If so you could symlink: ln -s /usr/lib/gcc/i486-linux-gnu/4.2/cc1plus /usr/bin/cc1plus
Same with /usr/lib/gcc/i486-linux-gnu/4.2/cc1 if you have it. Replace 4.2 with 4.1 as you use that.
I did the links for that, no help for both cc1 and cc1plus

Last edited by Virtuality; 01-05-2008 at 07:48 PM.
 
Old 01-06-2008, 04:08 AM   #7
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
Did you try unrar-nonfree like I suggested? Not unrar or unrar-free.
Code:
:~$apt-cache search unrar
comix - GTK Comic Book Viewer
unrar-free - Unarchiver for .rar files
unrar - Unarchiver for .rar files (non-free version)
unrar-nonfree - Unarchiver for .rar files (non-free version)
Etch only has glibc2.3 as you've noticed. You would need to upgrade to lenny if you want a newer one.

Where did you get wacom source? apt-get install wacom-kernel-source
 
Old 01-06-2008, 07:58 AM   #8
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
Sigh.

Code:
0x1:/home/main# apt-get install wacom-kernel-source
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  wacom-kernel-source
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0B/787kB of archives.
After unpacking 3785kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package wacom-kernel-source.
(Reading database ... 77388 files and directories currently installed.)
Unpacking wacom-kernel-source (from .../wacom-kernel-source_0.7.4.1-5_all.deb) ...
Setting up wacom-kernel-source (0.7.4.1-5) ...
head: cannot open `/usr/src/linux//include/linux/version.h' for reading: No such file or directory
/var/lib/dpkg/info/wacom-kernel-source.postinst: line 49: [: =: unary operator expected
Warning: kernel headers don't match running Linux version.
Building wacom modules for Linux  (this may take a few minutes)...dpkg: error processing wacom-kernel-source (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 wacom-kernel-source
E: Sub-process /usr/bin/dpkg returned an error code (1)
0x1:/home/main# apt-get install unrar-nonfree
Reading package lists... Done
Building dependency tree... Done
Package unrar-nonfree is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package unrar-nonfree has no installation candidate
0x1:/home/main#
 
Old 01-06-2008, 08:53 AM   #9
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
My bad. Looks like unrar-nonfree is now just unrar. Should work though. Have you possibly changed any debian binaries with self compiled?
According to your other thread you've installed kernel source and headers. Headers are only needed if you don't have full source. Where's the source at since wacom complained about: /usr/src/linux//include/linux/version.h
The extra / between linux and include looks weird btw. Do you have the file /usr/src/linux/include/linux/version.h and is that source the same as your running kernels?

EDIT: google gave this: http://linux.derkeiler.com/Mailing-L.../msg02868.html
Is there something about the apt-gettable driver xserver-xorg-input-wacom that isn't working?

Last edited by makuyl; 01-06-2008 at 09:23 AM.
 
Old 01-06-2008, 04:54 PM   #10
linuxluver567
LQ Newbie
 
Registered: Jan 2008
Distribution: Linux Mint, Ubuntu Studio, and Edubuntu 8.04 Alpha 4
Posts: 3

Rep: Reputation: 0
i also get this error when installing many things. Like this time i am trying to install solseek on my edubuntu 7.10 running KDE. thanks in advance.

Last edited by linuxluver567; 01-06-2008 at 04:55 PM.
 
Old 01-10-2008, 06:18 AM   #11
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
still need help...

okay i just tried to install java

Code:
0x1:/home/main# apt-get install sun-java5-jre
Reading package lists... Done
Building dependency tree... Done
sun-java5-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up wacom-kernel-source (0.7.4.1-5) ...
head: cannot open `/usr/src/linux//include/linux/version.h' for reading: No such file or directory
/var/lib/dpkg/info/wacom-kernel-source.postinst: line 49: [: =: unary operator expected
Warning: kernel headers don't match running Linux version.
Building wacom modules for Linux  (this may take a few minutes)...dpkg: error processing wacom-kernel-source (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 wacom-kernel-source
E: Sub-process /usr/bin/dpkg returned an error code (1)
The thing is I have headers installed and they are the correct version AFAIK. But I tried to re-install them anyway.

Code:
0x1:/home/main# apt-get install linux-headers-2.6.18-5-686
Reading package lists... Done
Building dependency tree... Done
linux-headers-2.6.18-5-686 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up wacom-kernel-source (0.7.4.1-5) ...
head: cannot open `/usr/src/linux//include/linux/version.h' for reading: No such file or directory
/var/lib/dpkg/info/wacom-kernel-source.postinst: line 49: [: =: unary operator expected
Warning: kernel headers don't match running Linux version.
Building wacom modules for Linux  (this may take a few minutes)...dpkg: error processing wacom-kernel-source (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 wacom-kernel-source
E: Sub-process /usr/bin/dpkg returned an error code (1)
So then I downloaded it as source and tried to compile

Code:
0x1:/usr/src/linuxwacom-0.7.8-3# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gawk... (cached) mawk
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
I have my symlinks done properly. I did cd /usr/src/linux//include/linux/ but there was no 'version.h' in there.
Please help.

And I just did cd /usr/src/linux/ and 'vim README' and saw this:

Quote:
Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be.
What I want to know is how I fix it. I did 'rm linux' from /usr/src/ then remade my symlinks but to no avail. Possibly it is not config'd properly; how do I do that?

'make config dep' gives this:

Code:
0x1:/usr/src/linux-source-2.6.18# make config dep
  HOSTCC  scripts/basic/fixdep
In file included from /usr/local/include/features.h:354,
                 from /usr/include/sys/types.h:27,
                 from scripts/basic/fixdep.c:105:
/usr/local/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[3]: *** [scripts/basic/fixdep] Error 1
make[2]: *** [scripts_basic] Error 2
make[1]: *** No rule to make target `.kernelvariables'.  Stop.
  HOSTCC  scripts/basic/fixdep
In file included from /usr/local/include/features.h:354,
                 from /usr/include/sys/types.h:27,
                 from scripts/basic/fixdep.c:105:
/usr/local/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[3]: *** [scripts/basic/fixdep] Error 1
make[2]: *** [scripts_basic] Error 2
make[1]: Nothing to be done for `/usr/src/linux-source-2.6.18/scripts/Kbuild.include'.
  HOSTCC  scripts/basic/fixdep
In file included from /usr/local/include/features.h:354,
                 from /usr/include/sys/types.h:27,
                 from scripts/basic/fixdep.c:105:
/usr/local/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[3]: *** [scripts/basic/fixdep] Error 1
make[2]: *** [scripts_basic] Error 2
make[1]: Nothing to be done for `Makefile'.
  HOSTCC  scripts/basic/fixdep
In file included from /usr/local/include/features.h:354,
                 from /usr/include/sys/types.h:27,
                 from scripts/basic/fixdep.c:105:
/usr/local/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[2]: *** [scripts/basic/fixdep] Error 1
make[1]: *** [scripts_basic] Error 2
make: *** [config] Error 2
and 'make menuconfig'

Code:
  HOSTCC  scripts/basic/fixdep
In file included from /usr/local/include/features.h:354,
                 from /usr/include/sys/types.h:27,
                 from scripts/basic/fixdep.c:105:
/usr/local/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
I'm getting really sick of this, something needs to start working so I can install my stuff like it should have been weeks ago.

Last edited by Virtuality; 01-10-2008 at 06:50 AM.
 
Old 01-11-2008, 05:48 PM   #12
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
If xserver-xorg-input-wacom with wacom-tools from apt works, dump the wacom source. Looks like your kernel isn't even supported by the wacom-kernel-source. Look in /usr/src/modules/wacom/src/ , the newest one supported is 2.6.16.

"dpkg -P wacom-kernel-source"

Did you do: ln -s /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h

Still, it looks like you should just bite the bullet and dist-upgrade to testing since Etch is getting outdated and you'd get a newer glibc. Follow a howto for that though.

After removing the wacom source, see if kernel compilation works then.
 
Old 01-11-2008, 09:39 PM   #13
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
Makuyl - That was the fix to this entire issue, THANK YOU.

I'm not sure whether it was the symlink of the removing wacom kernel source
 
Old 01-12-2008, 04:37 AM   #14
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
Glad it's sorted out, but if I were you, I'd still consider upgrading to Lenny. After all, if it works now, tweak it
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: C++ preprocessor "/lib/cpp" fails sanity check marek345 Linux - Software 4 11-06-2008 09:49 AM
error: C preprocessor "/lib/cpp" fails sanity check Virtuality Linux - Software 21 01-06-2008 09:35 PM
error: C++ preprocessor "/lib/cpp" fails sanity check i.you Linux - Software 3 03-06-2007 02:24 AM
error: C preprocessor "/lib/cpp" fails sanity check ankit4u1 Linux - Software 2 04-02-2006 12:24 PM
error: C preprocessor "/lib/cpp" fails sanity check Master Fox Linux - Software 0 10-14-2004 03:39 PM


All times are GMT -5. The time now is 07:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration