Error in ./configure (SOLVED)

Need help with C, C++, perl, python, etc?

Error in ./configure (SOLVED)

Postby garrincha » 2007-01-14 15:15

Hi, I'm trying to build a package, in this case it was a kde theme called 'baghira'. When I tried to run './configure' using the prefix as shown below, the output stated that there is no acceptable C compiler found in the $PATH.
Code: Select all
:~/download/baghira-0.8$ ./configure --prefix=`kde-config --prefix` --disable-debug
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for kde-config... /usr/bin/kde-config
checking where to install... /usr (as requested)
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.


I checked 'config.log' but it wasn't helpful. To be sure, I tried to build a different package and I got the same error as above.

I tried this:
Code: Select all
~$ gcc --version
bash: gcc: command not found


It would seems to me that I don't have the C complier, but when I do dpkg -l, these are the compilers installed on my PC:
Code: Select all
gcc-4.1 (4.1.1-19)
gcc-4.1-base (4.1.1-19)
gcj-4.1-base (4.1.1-17)


These looks like the latest version of gcc compilers. Could that have caused the problem? If not, any idea what could be the problem? I'm using debian/etch by the way.
Last edited by garrincha on 2007-01-16 12:00, edited 1 time in total.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby mzilikazi » 2007-01-14 16:02

Are you positive gcc is installed? dpkg will show an 'ii' in front of the package if it is installed.

Code: Select all
$ dpkg -l|grep gcc
ii  gcc                                   4.1.1-15         The GNU C compiler
ii  gcc-3.3-base                          3.3.6-15         The GNU Compiler Collection (base package)
ii  gcc-3.4-base                          3.4.6-5         The GNU Compiler Collection (base package)
ii  gcc-4.1                               4.1.1-21         The GNU C compiler
ii  gcc-4.1-base                          4.1.1-21         The GNU Compiler Collection (base package)
ii  libgcc1                               4.1.1-21         GCC support library


/usr/bin/gcc should be a symlink to your gcc version:

Code: Select all
$ which gcc
/usr/bin/gcc

$ ls -la /usr/bin/gcc
lrwxrwxrwx 1 root root 7 2007-01-03 05:49 /usr/bin/gcc -> gcc-4.1*
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby garrincha » 2007-01-14 19:05

mzilikazi wrote:Are you positive gcc is installed? dpkg will show an 'ii' in front of the package if it is installed.


Yes, mine are supposed to be installed:
Code: Select all
ii  gcc-4.1                           4.1.1-19                        The GNU C compiler
ii  gcc-4.1-base                      4.1.1-19                        The GNU Compiler Collection (base packag$
ii  gcj-4.1-base                      4.1.1-17                        The GNU Compiler Collection (gcj base pa


When I typed 'which gcc', no output is returned, so presumedly there is no sym link to the gcc compiler supposedly installed in my system.

This is not the first time that it has happened. I tried to build a package about two weeks ago and I got the same error.

Edit: I checked the /usr/bin/ directory and gcc-4.1 is definitely there.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby mzilikazi » 2007-01-14 23:53

garrincha wrote:Edit: I checked the /usr/bin/ directory and gcc-4.1 is definitely there.

Code: Select all
apt-get install gcc libgcc1

If that doesn't make the symlink make it yourself.
Code: Select all
ln -s /usr/bin/gcc-4.1 /usr/bin/gcc
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby garrincha » 2007-01-15 13:06

mzilikaz, just got around to doing it. I installed gcc as I already have libgcc1. I also made the symlink as well. However, I'm still getting output error, a different one this time:

Code: Select all
:~/download/baghira-0.8$ ./configure --prefix=`kde-config --prefix` --disable-debug
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for kde-config... /usr/bin/kde-config
checking where to install... /usr (as requested)
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.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby mzilikazi » 2007-01-15 13:53

So what does config.log tell you? Is this not the same thing you are trying to build?
Code: Select all
$ aptitude search baghira
p   kwin-baghira                    - KDE theme for Apple junkies :)
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby garrincha » 2007-01-15 15:37

mzilikazi wrote:So what does config.log tell you?

There are over 400 lines in the config.log. I'm not terribly familiar about it though. Here're couple of lines from the config.log file:
Code: Select all
.
.
/usr/bin/uname -p = unknown
/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/games


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

configure:1564: checking build system type
configure:1582: result: i686-pc-linux-gnulibc1
configure:1590: checking host system type
configure:1604: result: i686-pc-linux-gnulibc1
configure:1612: checking target system type
configure:1626: result: i686-pc-linux-gnulibc1
configure:1673: checking for a BSD-compatible install
configure:1728: result: /usr/bin/install -c
configure:1743: checking for -p flag to install
configure:1756: result: yes
configure:1767: checking whether build environment is sane
configure:1810: result: yes
configure:1854: checking for gawk
configure:1883: result: no
configure:1854: checking for mawk
configure:1870: found /usr/bin/mawk
configure:1880: result: mawk
configure:1890: checking whether make sets $(MAKE)
configure:1910: result: yes
configure:2164: checking for kde-config
configure:2226: result: /usr/bin/kde-config
configure:2249: checking where to install
configure:2257: result: /usr (as requested)
configure:2308: checking for style of include used by make
configure:2336: result: GNU
configure:2484: checking for gcc
configure:2500: found /usr/bin/gcc
configure:2510: result: gcc
configure:2754: checking for C compiler version
configure:2757: gcc --version </dev/null >&5
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
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:2760: $? = 0
configure:2762: gcc -v </dev/null >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
configure:2765: $? = 0
configure:2767: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2770: $? = 1
configure:2793: checking for C compiler default output file name
configure:2796: gcc     conftest.c  >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2799: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "baghira"
| #define VERSION "cvs"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2838: error: C compiler cannot create executables
See `config.log' for more details.


Code: Select all
Is this not the same thing you are trying to build?
[code]$ aptitude search baghira
p   kwin-baghira                    - KDE theme for Apple junkies :)[/code]


Yes, this is the same thing. I would have apt-get install it instead however I'm trying to test the compile and build features on my etch installation as I would like to build a kernel later on. Incidentally, I downloaded another tarball kde theme and I tried to run ./configure and I got the same error output as the one for above.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby mzilikazi » 2007-01-15 16:04

garrincha wrote:Yes, this is the same thing. I would have apt-get install it instead however I'm trying to test the compile and build features on my etch installation as I would like to build a kernel later on. Incidentally, I downloaded another tarball kde theme and I tried to run ./configure and I got the same error output as the one for above.


Well I may be the last person you should ask about anything KDE. ;)
You'd have much better luck with a KDE specific forum/mailing list/chat room. Of course, if you find a resolution to your problem it would be great for you to post it so others could read it too. :)

Last guess - Do you have these installed?
Code: Select all
ii  autoconf                              2.61-3         automatic configure script builder
ii  automake1.9                           1.9.6+nogfdl-3         A tool for generating GNU Standards-complian
ii  autotools-dev                         20060920.1         Update infrastructure for config.{guess,sub}

Keep in mind I'm on a Sid desktop at the moment - package versions are often times different.
Debian Sid Laptops:
AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55 / 1.5G
Intel(R) Pentium(R) Dual CPU T2390 @ 1.86GHz / 3G
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby garrincha » 2007-01-15 17:02

mzilikazi wrote:Last guess - Do you have these installed?
Code: Select all
ii  autoconf                              2.61-3         automatic configure script builder
ii  automake1.9                           1.9.6+nogfdl-3         A tool for generating GNU Standards-complian
ii  autotools-dev                         20060920.1         Update infrastructure for config.{guess,sub}

Keep in mind I'm on a Sid desktop at the moment - package versions are often times different.


I checked, apparently I did not have these installed, so I installed these packages for the etch version in my installation. Unfortunately, it didn't do the trick.

It is not necessarily a KDE-specific problem. As I mentioned I tried to configure and make a tarball about 2 weeks ago and I got the same error as the one I printed at the top of this trend. I just downloaded the tarball fluxbox-1.0rc2.tar.bz2 and run ./configure and I got the same error.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby plugwash » 2007-01-15 21:08

garrincha wrote:
mzilikazi wrote:Are you positive gcc is installed? dpkg will show an 'ii' in front of the package if it is installed.


Yes, mine are supposed to be installed:
Code: Select all
ii  gcc-4.1                           4.1.1-19                        The GNU C compiler
ii  gcc-4.1-base                      4.1.1-19                        The GNU Compiler Collection (base packag$
ii  gcj-4.1-base                      4.1.1-17                        The GNU Compiler Collection (gcj base pa


When I typed 'which gcc', no output is returned, so presumedly there is no sym link to the gcc compiler supposedly installed in my system.

This is not the first time that it has happened. I tried to build a package about two weeks ago and I got the same error.

Edit: I checked the /usr/bin/ directory and gcc-4.1 is definitely there.


it looks like you have installed the compiler but not the packages that create the symlinks to the current default compiler.

there should be a package simply named gcc, you need to install it

you might also wan't to install build-essential as there are likely to be other things that are important for building stuff that you don't currently have installed.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Postby thamarok » 2007-01-15 21:23

apt-get install binutils
thamarok
 

Postby garrincha » 2007-01-15 21:58

Thanks for the tips guys.

I'm still beating around the bush. I am wondering why all of sudden after my debian installaton that was only a couple of weeks old, I could have missed out a lot of stuffs essential in building a package.

I already have gcc and binutils installed. I apt-get 'build-essential' as you suggested plugwash, it dumped
'build-essential g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-kernel-headers' into my linux box. It did the trick but up to a point, when trying to './configure' fluxbox, the last line of a very long output:
Code: Select all
configure: error: Fluxbox requires the X Window System libraries and headers.

and similarly, the kde theme:
Code: Select all
checking for X... configure: error: Can't find X includes. Please check your installation and add the correct paths
.
What are the required X Window System libraries and header that I needed? Could you please post all the stuffs that I'm supposed to have on my etch installation required to build a package?
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby plugwash » 2007-01-15 22:14

try apt-get build-dep fluxbox
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Postby garrincha » 2007-01-15 22:36

plugwash wrote:try apt-get build-dep fluxbox


What exactly is the 'build-dep' package? There doesn't seems to be this package in my etch repo. I'm not trying to install fluxbox from the debian repo, rather I was trying to build a package from the source tarball (i.e., fluxbox-1.0rc2.tar.bz2) that I downloaded from the fluxbox site. If the configure, make and make install doesn't work then it is not likely that I will be able to build my custom kernel.
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."
User avatar
garrincha
 
Posts: 2340
Joined: 2006-06-02 16:38

Postby plugwash » 2007-01-15 22:46

build-dep isn't a package its a command just like update install upgrade dist-upgrade source and so on.

that command will install everything that would be needed to build the debian package of fluxbox which should be pretty much the same as what is needed to build the upstream source.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable