Author Topic: Compile Errors lib/cpp fails sanity check  (Read 3171 times)

Offline hal8000

  • Sr. Member
  • ****
  • Posts: 346
Compile Errors lib/cpp fails sanity check
« on: October 17, 2009, 04:39:32 PM »
I'm compiling a program from source code. However I cant even get to the make stage as
running configure gives me this error:

configure: error: C preprocessor "/lib/cpp" fails sanity check

When i look in my config.log I see the following:

--snip--
In file included from /usr/include/bits/posix1_lim.h:157,
                 from /usr/include/limits.h:145,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:122,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/syslimits.h:7,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:11,
                 from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: error: linux/limits.h: No such file or directory
configure:4994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "drm"
| #define VERSION "1.12a"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4994: gcc -E  conftest.c
In file included from /usr/include/bits/posix1_lim.h:157,
                 from /usr/include/limits.h:145,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:122,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/syslimits.h:7,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:11,
                 from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: error: linux/limits.h: No such file or directory
configure:4994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "drm"
| #define VERSION "1.12a"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4994: gcc -E -traditional-cpp  conftest.c
In file included from /usr/include/features.h:348,
                 from /usr/include/assert.h:38,
                 from conftest.c:15:
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:4994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "drm"
| #define VERSION "1.12a"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4994: gcc -E -traditional-cpp  conftest.c
In file included from /usr/include/features.h:348,
                 from /usr/include/assert.h:38,
                 from conftest.c:15:
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:4994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "drm"
| #define VERSION "1.12a"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4994: /lib/cpp  conftest.c
In file included from /usr/include/bits/posix1_lim.h:157,
                 from /usr/include/limits.h:145,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:122,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/syslimits.h:7,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:11,
                 from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: error: linux/limits.h: No such file or directory
configure:4994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "drm"
| #define VERSION "1.12a"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4994: /lib/cpp  conftest.c
In file included from /usr/include/bits/posix1_lim.h:157,
                 from /usr/include/limits.h:145,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:122,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/syslimits.h:7,
                 from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/include/limits.h:11,
                 from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: error: linux/limits.h: No such file or directory
configure:4994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "drm"
| #define VERSION "1.12a"
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:5033: result: /lib/cpp
configure:5053: /lib/cpp  conftest.c


Looks as though I'm missing limits.h for one thing and possibly others.
I have glibc, glibc-dev, gcc, gcc-c++ and gcc-cpp installed.

Not sure where limits.h should be installed to, and the program I'm installing is:

http://sourceforge.net/apps/mediawiki/drm/index.php?title=Main_Page

version drm-1-12a.tar.gz
Thanks in advance.


Offline aherkey

  • Full Member
  • ***
  • Posts: 109
Re: Compile Errors lib/cpp fails sanity check
« Reply #1 on: October 17, 2009, 05:40:30 PM »
Install glibc-headers-devel for the Linux glibc/kernel header files.

- Andy

jimlees

  • Guest
Re: Compile Errors lib/cpp fails sanity check
« Reply #2 on: November 06, 2009, 02:47:42 PM »
Was having the same problem.  Thanks for your help. 

Now a suggestion.  If you're installing the gcc package during the initial install why not install glibc-header package too?

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: Compile Errors lib/cpp fails sanity check
« Reply #3 on: November 06, 2009, 03:44:49 PM »
Because it's for development.  If you're not developing and only installing things from the repository, like is recommended, you don't need the header files.  Would be a waste of drive space.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

jimlees

  • Guest
Re: Compile Errors lib/cpp fails sanity check
« Reply #4 on: November 06, 2009, 05:07:19 PM »
Sorry, but that begs the question of why install the compiler?

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6214
Re: Compile Errors lib/cpp fails sanity check
« Reply #5 on: November 06, 2009, 05:13:08 PM »
Sorry, but that begs the question of why install the compiler?
;D

i saw this a while ago ..this package should be tied as a dependency of the compiler ..this package is not a standard package and there is really no easy way of knowing what package is missing from error msg produced when its not installed.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

jimlees

  • Guest
Re: Compile Errors lib/cpp fails sanity check
« Reply #6 on: November 06, 2009, 05:47:39 PM »
i saw this a while ago ..this package should be tied as a dependency of the compiler ..this package is not a standard package and there is really no easy way of knowing what package is missing from error msg produced when its not installed.

This is especially true for a "non-developer" who's is just trying to install packages that can only be gotten as source.  For example I'm installing radlib-2.8.4 to support wview-5.5.6 for my weather station.  Additionally, I'm trying to install the cuecat drivers.

Now, I haven't done any serious development in 15 years and the libraries have changed so when all of these packages failed to compile or even configure how was I suppose to know what was missing?

I ask again, if you are initially installing a "non-developer" system why install the compiler package at all?  And then install all of the headers when the SA installs the compiler - say as a task.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: Compile Errors lib/cpp fails sanity check
« Reply #7 on: November 06, 2009, 05:53:57 PM »
Really can't answer that.  I just started with this stuff, read the how-to and the posts about it, just kinda thought that's the way it is.  Guess I just don't know any better.   :)
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline siamer

  • Sr. Member
  • ****
  • Posts: 284
    • ZEN-mini
Re: Compile Errors lib/cpp fails sanity check
« Reply #8 on: November 06, 2009, 08:43:48 PM »
Hello.

jimlees everytime when You trying compile someting and You getting error than this error message showing You what is missing and the same was in that problem:
Quote
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers
than You have just install that package by synaptic...
Or if You want other way, and compiling some software from source than always You will find some README file in that package with dependencies... so just find them in synaptic and install first ;)

good luck :)
siamer
Every man dies, but not every man really lives... !!