Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I've tried the configure scripts from Afterstep (1.8 and 2.0.0), aterm, and a bunch of other open-source downloads. All of them get sad when I run them because gcc (or it could be ld, I'm not sure) can't find crt.o . I could be wrong on that file name; I' on Windows at the moment. I can post logs/error output if that helps.
How can I fix/workaround this problem to compile my programs?
sorry for the delay in my reply, I've had trouble getting my internet connection to work. Here's the output of several things. config.log has info about my system. Feel free to ask for more if it'll help.
lame.c:
int main()
{
return 0;
}
---
In the shell:
[pcweirdo@localhost src]$ gcc lame.c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
---
In the shell:
[root@localhost src]# gcc lame.c > /mnt/winsata/transfer/gcc-basic-err.txt
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
---
In the shell (attempting to configure the KDE GUI for DHCPd.):
[root@localhost kcmdhcpd-0.3.8]# ./configure
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
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... configure: error: C compiler cannot create executables
See `config.log' for more details.
---
config.log:
[root@localhost kcmdhcpd-0.3.8]# cat config.log
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 = localhost.localdomain
uname -m = i686
uname -r = 2.6.5-1.358smp
uname -s = Linux
uname -v = #1 SMP Sat May 8 09:25:36 EDT 2004
configure:1559: checking build system type
configure:1577: result: i686-pc-linux-gnulibc1
configure:1585: checking host system type
configure:1599: result: i686-pc-linux-gnulibc1
configure:1607: checking target system type
configure:1621: result: i686-pc-linux-gnulibc1
configure:1668: checking for a BSD-compatible install
configure:1723: result: /usr/bin/install -c
configure:1738: checking for -p flag to install
configure:1751: result: yes
configure:1762: checking whether build environment is sane
configure:1805: result: yes
configure:1825: checking for gawk
configure:1841: found /usr/bin/gawk
configure:1851: result: gawk
configure:1861: checking whether make sets $(MAKE)
configure:1881: result: yes
configure:2094: checking for style of include used by make
configure:2122: result: GNU
configure:2269: checking for gcc
configure:2285: found /usr/bin/gcc
configure:2295: result: gcc
configure:2539: checking for C compiler version
configure:2542: gcc --version </dev/null >&5
gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
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:2545: $? = 0
configure:2547: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
configure:2550: $? = 0
configure:2552: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2555: $? = 1
configure:2578: checking for C compiler default output file name
configure:2581: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2584: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2623: error: C compiler cannot create executables
See `config.log' for more details.
Your problem happened to me a while ago, when I first installed linux. It took weeks of searching and asking around for me to figure it out - I almost completely lost faith in linux.
Anyway, here it goes:
1.) Install 'glibc-devel'.
2.) And thats it!
That should fix your problem.
configure:1559: checking build system type
configure:1577: result: i686-pc-linux-gnu
configure:1585: checking host system type
configure:1599: result: i686-pc-linux-gnu
configure:1607: checking target system type
configure:1621: result: i686-pc-linux-gnu
configure:1668: checking for a BSD-compatible install
configure:1723: result: /usr/bin/install -c
configure:1738: checking for -p flag to install
configure:1751: result: yes
configure:1762: checking whether build environment is sane
configure:1805: result: yes
configure:1825: checking for gawk
configure:1841: found /usr/bin/gawk
configure:1851: result: gawk
configure:1861: checking whether make sets $(MAKE)
configure:1881: result: yes
configure:2094: checking for style of include used by make
configure:2122: result: GNU
configure:2269: checking for gcc
configure:2285: found /usr/bin/gcc
configure:2295: result: gcc
configure:2539: checking for C compiler version
configure:2542: gcc --version </dev/null >&5
gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
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:2545: $? = 0
configure:2547: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
configure:2550: $? = 0
configure:2552: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2555: $? = 1
configure:2578: checking for C compiler default output file name
configure:2581: gcc conftest.c >&5
configure:2584: $? = 0
configure:2630: result: a.out
configure:2635: checking whether the C compiler works
configure:2641: ./a.out
configure:2644: $? = 0
configure:2661: result: yes
configure:2668: checking whether we are cross compiling
configure:2670: result: no
configure:2673: checking for suffix of executables
configure:2675: gcc -o conftest conftest.c >&5
configure:2678: $? = 0
configure:2703: result:
configure:2709: checking for suffix of object files
configure:2730: gcc -c conftest.c >&5
configure:2733: $? = 0
configure:2755: result: o
configure:2759: checking whether we are using the GNU C compiler
configure:2783: gcc -c conftest.c >&5
configure:2789: $? = 0
configure:2793: test -z
|| test ! -s conftest.err
configure:2796: $? = 0
configure:2799: test -s conftest.o
configure:2802: $? = 0
configure:2815: result: yes
configure:2821: checking whether gcc accepts -g
configure:2842: gcc -c -g conftest.c >&5
configure:2848: $? = 0
configure:2852: test -z
|| test ! -s conftest.err
configure:2855: $? = 0
configure:2858: test -s conftest.o
configure:2861: $? = 0
configure:2872: result: yes
configure:2889: checking for gcc option to accept ANSI C
configure:2959: gcc -c conftest.c >&5
configure:2965: $? = 0
configure:2969: test -z
|| test ! -s conftest.err
configure:2972: $? = 0
configure:2975: test -s conftest.o
configure:2978: $? = 0
configure:2996: result: none needed
configure:3014: gcc -c conftest.c >&5
conftest.c:2: error: syntax error before "me"
configure:3020: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:3155: checking dependency style of gcc
configure:3238: result: gcc3
configure:3261: checking how to run the C preprocessor
configure:3296: 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/i386-redhat-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/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:3302: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3296: 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/i386-redhat-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/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:3302: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3296: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:296,
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:3302: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3296: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:296,
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:3302: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3296: /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/i386-redhat-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/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:3302: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3296: /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/i386-redhat-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/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:3302: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3379: result: /lib/cpp
configure:3403: /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/i386-redhat-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/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:3409: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3403: /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/i386-redhat-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/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:3409: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "kcmdhcpd-0.3.8"
| #define VERSION "3.1.94"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3478: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
I fixed my "insane" cpp my downloading the following packages:
libstdc++
libstdc++-devel
glibc-headers
glibc-kernheaders
glibc-devel
kernel-headers
(from rpmfind.net)
However, I am still unable to "compile simple C++ programs". It says I need libstd++-dev - i have libstdc++-devel, but apparently that's not enough for this configure script.
This is the last part of ./configure 's output:
configure: error: Your Installation isn't able to compile simple C++ programs.
Check config.log for details - if you're using a Linux distribution you might miss
a package named similiar to libstd++-dev.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.