Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I'm running a distro called SLAX 6.0.2 Based on Slackware. I've had a problem for a few days not being able to compile things, and originally I thought it was the ./make that was wrong but then someone pointed out my error. Now after typing the error into google I can't find anything useful.
When I try to compile programmes from source i get this:
root@slax:~/Desktop/gtkspell-2.0.11# ./configure
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
root@slax:~/Desktop/gtkspell-2.0.11#
Isn't the C preprocessor thingy part of gcc? When I go to /lib/cpp there is a shortcut called cpp and that leads to /usr/bin/cpp which is there.
Can you post the last couple dozen lines of the config.log file that gets produced from this ./configure command? Chances are cpp is missing something it needs to run.
Looks like you just have a few of the macros and definitions -- I'm looking for the actual test program it failed on, which is higher up in the file (btw I really hate how autoconf structures its log file). Can you look for that or failing that post the whole file somewhere (snipping obvious cruft. Another thing to try is copy this simple C program:
Code:
#include <stdio.h>
int main(void)
{
puts("Hello, world.");
return 0;
}
into a file called test1.c. Then compile it with gcc test1.c -o test1 and run it with ./test1 -- does it print "Hello, world."? Post any errors you get trying to compile it, please.
configure:2030: checking for gcc
configure:2046: found /usr/bin/gcc
configure:2056: result: gcc
configure:2300: checking for C compiler version
configure:2303: gcc --version </dev/null >&5
gcc (GCC) 3.3.5
Copyright (C) 2003 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:2306: $? = 0
configure:2308: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/specs
Configured with: ../gcc-3.3.5/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.3.5
configure:2311: $? = 0
configure:2313: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2316: $? = 1
configure:2339: checking for C compiler default output file name
configure:2342: gcc conftest.c >&5
configure:2345: $? = 0
configure:2391: result: a.out
configure:2396: checking whether the C compiler works
configure:2402: ./a.out
configure:2405: $? = 0
configure:2422: result: yes
configure:2429: checking whether we are cross compiling
configure:2431: result: no
configure:2434: checking for suffix of executables
configure:2436: gcc -o conftest conftest.c >&5
configure:2439: $? = 0
configure:2464: result:
configure:2470: checking for suffix of object files
configure:2491: gcc -c conftest.c >&5
configure:2494: $? = 0
configure:2516: result: o
configure:2520: checking whether we are using the GNU C compiler
configure:2544: gcc -c conftest.c >&5
configure:2550: $? = 0
configure:2554: test -z
|| test ! -s conftest.err
configure:2557: $? = 0
configure:2560: test -s conftest.o
configure:2563: $? = 0
configure:2576: result: yes
configure:2582: checking whether gcc accepts -g
configure:2603: gcc -c -g conftest.c >&5
configure:2609: $? = 0
configure:2613: test -z
|| test ! -s conftest.err
configure:2616: $? = 0
configure:2619: test -s conftest.o
configure:2622: $? = 0
configure:2633: result: yes
configure:2650: checking for gcc option to accept ANSI C
configure:2720: gcc -c -g -O2 conftest.c >&5
configure:2726: $? = 0
configure:2730: test -z
|| test ! -s conftest.err
configure:2733: $? = 0
configure:2736: test -s conftest.o
configure:2739: $? = 0
configure:2757: result: none needed
configure:2775: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: parse error before "me"
configure:2781: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2916: checking dependency style of gcc
configure:2999: result: gcc3
configure:3022: checking how to run the C preprocessor
configure:3057: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:122,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:3063: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3057: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:122,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:3063: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3057: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:308,
from /usr/include/assert.h:36,
from conftest.c:14:
/usr/include/sys/cdefs.h:31: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:3063: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3057: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:308,
from /usr/include/assert.h:36,
from conftest.c:14:
/usr/include/sys/cdefs.h:31: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:3063: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3057: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:122,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:3063: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3057: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:122,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:3063: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3140: result: /lib/cpp
configure:3164: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:122,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:3170: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3164: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:122,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.3.5/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:3170: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "gtkspell"
| #define PACKAGE_TARNAME "gtkspell"
| #define PACKAGE_VERSION "2.0.11"
| #define PACKAGE_STRING "gtkspell 2.0.11"
| #define PACKAGE_BUGREPORT "nathan@silverorange.com"
| #define PACKAGE "gtkspell"
| #define VERSION "2.0.11"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3239: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
Thats the main part of config.log and the Hello World Programme didn't work.
root@slax:~/Desktop# ./test1.c
./test1.c: line 3: syntax error near unexpected token `('
./test1.c: line 3: `int main(void)'
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
This is the source of your problems. Do you have a full set of glibc headers installed? On my Slackware 10.2 machine this file is a part of the glibc package. Maybe you need to install a separate headers package in SLAX or the file somehow became corrupt. Check the /var/log/packages directory to see if the file should have been a part of your glibc install (there is a file in /var/log/packages corresponding to each package with a list of all files belonging to that package). You should also make sure there are no other missing files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.