LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-28-2007, 06:13 AM   #1
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Rep: Reputation: 0
"/lib/cpp fails sanity check" (Slackware 11, 2.6.18)


Greetings,

I'm trying to install scim (Chinese language input program) on Slackware 11, kernel 2.6.18.

I've read through a lot of different posts on various sites about this error message, but to no avail. I do have cpp (gcc 3.4.6).

I'll include a bit of the config.log here:
---------

configure:3971: gcc -c -g -O2 conftest.c >&5
In file included from /usr/include/stdio.h:28,
from conftest.c:17:
/usr/include/features.h:308:25: sys/cdefs.h: No such file or directory
In file included from /usr/include/stdio.h:34,
from conftest.c:17:
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:213: error: syntax error before "typedef"
In file included from conftest.c:17:
/usr/include/stdio.h:46: error: syntax error before "typedef"
/usr/include/stdio.h:51: error: syntax error before "__USING_NAMESPACE_STD"
/usr/include/stdio.h: In function `__USING_NAMESPACE_STD':
/usr/include/stdio.h:62: error: storage class specified for parameter `__FILE'
In file included from /usr/include/_G_config.h:14,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:17:
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:325: error: storage class specified for parameter `wchar_t'
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:354: error: storage class specified for parameter `wint_t'
In file included from /usr/include/_G_config.h:24,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:17:
/usr/include/wchar.h:81: error: syntax error before "wint_t"
/usr/include/wchar.h:83: error: syntax error before '}' token
In file included from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:17:
/usr/include/_G_config.h:29: error: syntax error before "__mbstate_t"
/usr/include/_G_config.h:34: error: syntax error before "__mbstate_t"

------------

and it goes on for another couple thousand lines or so. Also, I tried installing kernel headers from the cd, but again no luck.

Still something of a newbie, so simpler is better. :) Thanks in advance for any help.
 
Old 04-28-2007, 01:03 PM   #2
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
it's certainly strange to have syntax errors in the standard libraries :/

Quote:
scim-uim-0.2.0 released
Takuro Ashie <ashie@homa.ne.jp>

Thursday 26 April 2007

Fixed some compile errors.
Changes:
* Fixed compile & run time errors when use with lates uim.
Now scim-uim requires uim-1.1.0 or later.
* Changed icon.
Download
* http://sourceforge.net/project/showf...ease_id=503825
do you have the newest version ( or tried an older one ) ?

can you build other programs? what is the output of ls /var/log/packages/glib* ?

there seem to be others with your problem: http://www.nabble.com/forum/ViewPost...d=y&skin=16577
 
Old 04-30-2007, 01:09 AM   #3
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
thanks for the links. i've tried variations and other versions of the scim program, as well as unrelated programs, and all give the same sad result.

here is the output you requested:
Quote:
lichengze@tl2008:~$ ls /var/log/packages/glib*
/var/log/packages/glib-1.2.10-i386-2 /var/log/packages/glibc-i18n-2.3.6-noarch-6 /var/log/packages/glibc-zoneinfo-2.3.6-noarch-6
/var/log/packages/glib2-2.10.3-i486-1 /var/log/packages/glibc-profile-2.3.6-i486-6
/var/log/packages/glibc-2.3.6-i486-6 /var/log/packages/glibc-solibs-2.3.6-i486-6
i'll keep researching this, though any help is much appreciated--i may be getting in a bit over my head.
 
Old 04-30-2007, 07:53 AM   #4
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
Quote:
/usr/include/features.h:308:25: sys/cdefs.h: No such file or directory
see if this file exists; it should, since you have glibc installed. try reinstalling it. also double check that you have all dependencies installed; just common sense. I'd ask the developers, if the problem still persists.

btw, imho this:
Code:
gcc -c -g -O2 conftest.c
is not particular intelligent. if one wants meaningful debugging output, one does not compile with optimizations.
 
Old 04-30-2007, 09:23 AM   #5
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
/sys/cdefs.h does not exist.

i reinstalled glibc from the slack cd though, and it still does not exist. i have /usr/include/ldab_cdefs.h and one for seamonkey, but that's all i can find.

it's definitely not the scim program. i've tried installing several other completely unrelated programs and nothing will compile.

i also tried reinstalling the gcc* packages and again the kernel-headers.

here's another abbreviated config.log from a different program (the "moodin" engine for the kde splash screen):

Quote:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = tl2008
uname -m = i686
uname -r = 2.6.18
uname -s = Linux
uname -v = #1 Wed Sep 20 03:01:24 CDT 2006

/usr/bin/uname -p = pentium4
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/X11R6/bin
PATH: /usr/games
PATH: /opt/www/htdig/bin
PATH: /usr/lib/java/bin
PATH: /usr/lib/java/jre/bin
PATH: /opt/kde/bin
PATH: /usr/lib/qt/bin
PATH: /usr/share/texmf/bin
PATH: .


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1563: checking build system type
configure:1581: result: i686-pc-linux-gnu
configure:1589: checking host system type
configure:1603: result: i686-pc-linux-gnu
configure:1611: checking target system type
configure:1625: result: i686-pc-linux-gnu
configure:1672: checking for a BSD-compatible install
configure:1727: result: /usr/bin/ginstall -c
configure:1742: checking for -p flag to install
configure:1755: result: yes
configure:1766: checking whether build environment is sane
configure:1809: result: yes
configure:1829: checking for gawk
configure:1845: found /usr/bin/gawk
configure:1855: result: gawk
configure:1865: checking whether make sets $(MAKE)
configure:1885: result: yes
configure:2067: checking for kde-config
configure:2129: result: /opt/kde/bin/kde-config
configure:2225: checking where to install
configure:2229: result: /opt/kde (as returned by kde-config)
configure:2284: checking for style of include used by make
configure:2312: result: GNU
configure:2460: checking for gcc
configure:2476: found /usr/bin/gcc
configure:2486: result: gcc
configure:2730: checking for C compiler version
configure:2733: gcc --version </dev/null >&5
gcc (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2736: $? = 0
configure:2738: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/i486-slackware-linux/3.4.6/specs
Configured with: ../gcc-3.4.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.4.6
configure:2741: $? = 0
configure:2743: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2746: $? = 1
configure:2769: checking for C compiler default output file name
configure:2772: gcc conftest.c >&5
configure:2775: $? = 0
configure:2821: result: a.out
configure:2826: checking whether the C compiler works
configure:2832: ./a.out
configure:2835: $? = 0
configure:2852: result: yes
configure:2859: checking whether we are cross compiling
configure:2861: result: no
configure:2864: checking for suffix of executables
configure:2866: gcc -o conftest conftest.c >&5
configure:2869: $? = 0
configure:2894: result:
configure:2900: checking for suffix of object files
configure:2921: gcc -c conftest.c >&5
configure:2924: $? = 0
configure:2946: result: o
configure:2950: checking whether we are using the GNU C compiler
configure:2974: gcc -c conftest.c >&5
configure:2980: $? = 0
configure:2983: test -z || test ! -s conftest.err
configure:2986: $? = 0
configure:2989: test -s conftest.o
configure:2992: $? = 0
configure:3005: result: yes
configure:3011: checking whether gcc accepts -g
configure:3032: gcc -c -g conftest.c >&5
configure:3038: $? = 0
configure:3041: test -z || test ! -s conftest.err
configure:3044: $? = 0
configure:3047: test -s conftest.o
configure:3050: $? = 0
configure:3061: result: yes
configure:3078: checking for gcc option to accept ANSI C
configure:3148: gcc -c conftest.c >&5
In file included from /usr/include/stdio.h:28,
from conftest.c:12:
/usr/include/features.h:308:25: sys/cdefs.h: No such file or directory
In file included from /usr/include/stdio.h:34,
from conftest.c:12:
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:213: error: syntax error before "typedef"
In file included from conftest.c:12:
/usr/include/stdio.h:46: error: syntax error before "typedef"
/usr/include/stdio.h:51: error: syntax error before "__USING_NAMESPACE_STD"
/usr/include/stdio.h: In function `__USING_NAMESPACE_STD':
/usr/include/stdio.h:62: error: storage class specified for parameter `__FILE'
In file included from /usr/include/_G_config.h:14,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:12:
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:325: error: storage class specified for parameter `wchar_t'
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:354: error: storage class specified for parameter `wint_t'
In file included from /usr/include/_G_config.h:24,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:12:
/usr/include/wchar.h:81: error: syntax error before "wint_t"
/usr/include/wchar.h:83: error: syntax error before '}' token
In file included from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:12:
/usr/include/_G_config.h:29: error: syntax error before "__mbstate_t"
/usr/include/_G_config.h:34: error: syntax error before "__mbstate_t"
In file included from /usr/include/_G_config.h:44,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from conftest.c:12:
/usr/include/gconv.h:72: error: storage class specified for parameter `__gconv_fct'
/usr/include/gconv.h:75: error: syntax error before '*' token
/usr/include/gconv.h:75: error: storage class specified for parameter `wint_t'
/usr/include/gconv.h:75: error: `wint_t' declared as function returning a function
/usr/include/gconv.h:75: error: conflicting types for 'wint_t'
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/stddef.h:354: error: previous definition of 'wint_t' was here
/usr/include/gconv.h:78: error: storage class specified for parameter `__gconv_init_fct'
/usr/include/gconv.h:79: error: storage class specified for parameter `__gconv_end_fct'
/usr/include/gconv.h:88: error: storage class specified for parameter `__gconv_trans_fct'
/usr/include/gconv.h:93: error: storage class specified for parameter `__gconv_trans_context_fct'
/usr/include/gconv.h:97: error: storage class specified for parameter `__gconv_trans_query_fct'
/usr/include/gconv.h:100: error: storage class specified for parameter `__gconv_trans_init_fct'
/usr/include/gconv.h:101: error: storage class specified for parameter `__gconv_trans_end_fct'
/usr/include/gconv.h:106: error: syntax error before "__gconv_trans_fct"
/usr/include/gconv.h:111: error: syntax error before '}' token
/usr/include/gconv.h:125: error: syntax error before "__gconv_fct"

...

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE "ksplash"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "0.1"

configure: exit 1
 
Old 04-30-2007, 09:29 AM   #6
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
perhaps i'm going about the uninstalling/reinstalling incorrectly. i just use pkgtool to remove the packages and then install them again (off the cd). then i just do "ldconfig" and try compiling again.
 
Old 04-30-2007, 09:43 AM   #7
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
sorry for all the posting, but i just noticed that the config.log also complains that /sys/types.h and /sys/stat.h are missing. i cut off the above posted config.log before those lines.
 
Old 04-30-2007, 09:43 AM   #8
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
my error. check /usr/include/sys/cdefs.h

( finding any file is easiest with slocate )
 
Old 04-30-2007, 09:49 AM   #9
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
ok, here is what you will do: for every file configure claims to be missing, check wether it exists.
 
Old 04-30-2007, 09:49 AM   #10
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
hmmm... i don't understand this:
Quote:
lichengze@tl2008:~$ ls /usr/include/sys/cdefs.h
/bin/ls: /usr/include/sys/cdefs.h: Not a directory
lichengze@tl2008:~$ ls -l /usr/include/sys
b-wS--S--T 1024 1282483129 2009810796 251, 185 1988-12-27 02:12 /usr/include/sys
lichengze@tl2008:~$
thanks.
 
Old 04-30-2007, 10:26 AM   #11
t_lee
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
here are the files explicitly named "types.h":

/usr/src/linux-2.4.33.3/arch/parisc/math-emu/types.h
/usr/src/linux-2.4.33.3/drivers/net/skfp/h/types.h
/usr/src/linux-2.4.33.3/include/linux/types.h
/usr/src/linux-2.4.33.3/include/linux/sunrpc/types.h
/usr/src/linux-2.4.33.3/include/asm-sh/types.h
/usr/src/linux-2.4.33.3/include/asm-mips64/sn/types.h
/usr/src/linux-2.4.33.3/include/asm-mips64/arc/types.h
/usr/src/linux-2.4.33.3/include/asm-mips64/types.h
(and so on for many other "asm-" variants, and then again for the linux-2.6.18 src tree)
/usr/local/include/wx-2.6/wx/types.h
/usr/local/include/libast/types.h
/usr/share/texmf/include/kpathsea/types.h
/usr/include/pci/types.h
/usr/include/OpenSP/types.h
/usr/include/linux/types.h
/usr/include/asm-i386/types.h
/usr/include/rpc/types.h
/usr/include/bits/types.h
/usr/include/libwmf/types.h
/opt/kde/include/kjs/types.h

and here are the files named "stat.h":
/usr/src/linux-2.4.33.3/include/linux/stat.h
/usr/src/linux-2.4.33.3/include/asm-sh/stat.h
(and again for asm-*, and linux-2.6.18)
/usr/include/linux/stat.h
/usr/include/asm-i386/stat.h
/usr/include/bits/stat.h

the config.log does not mention any other missing files.
 
Old 04-30-2007, 11:02 AM   #12
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
$ ls -l /usr/include/sys
b-wS--S--T 1024 1282483129 2009810796 251, 185 1988-12-27 02:12 /usr/include/sys
To me, those file permissions and ownership readings sound like a completely hosed filesystem...


Eric
 
Old 04-30-2007, 11:16 AM   #13
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
surprise, surprise the file is not there.
do this, see if it gives any errors and try again.
Code:
su -c "(cd && wget -v ftp://ftp.belnet.be/linux/slackware/slackware-11.0/slackware/l/glibc-2.3.6-i486-6.tgz && upgradepkg --reinstall glibc-2.3.6-i486-6.tgz)"
you can rm glibc-2.3.6-i486-6.tgz afterwards.
 
Old 04-30-2007, 11:21 AM   #14
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
Quote:
Originally Posted by Alien Bob
To me, those file permissions and ownership readings sound like a completely hosed filesystem...


Eric
ah yes. that would have been next . run fsck !
 
  


Reply



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 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
" '/lib/cpp' fails sanity check" when trying to install GAIM BoardinBum Linux - Newbie 2 08-13-2004 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:27 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration