Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Error in ./configure (SOLVED)

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

Error in ./configure (SOLVED)

#1 Post by garrincha »

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
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#2 Post by mzilikazi »

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
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#3 Post by garrincha »

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
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#4 Post by mzilikazi »

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
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#5 Post by garrincha »

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
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#6 Post by mzilikazi »

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
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#7 Post by garrincha »

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
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#8 Post by mzilikazi »

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
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#9 Post by garrincha »

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."

plugwash
Posts: 2507
Joined: 2006-09-17 01:10
Contact:

#10 Post by plugwash »

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.

thamarok

#11 Post by thamarok »

apt-get install binutils

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#12 Post by garrincha »

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."

plugwash
Posts: 2507
Joined: 2006-09-17 01:10
Contact:

#13 Post by plugwash »

try apt-get build-dep fluxbox

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#14 Post by garrincha »

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."

plugwash
Posts: 2507
Joined: 2006-09-17 01:10
Contact:

#15 Post by plugwash »

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.

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#16 Post by garrincha »

plugwash wrote: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.
My bad. I thought that you were talking about a debian package. Anyway, thanks for the tip. I did 'apt-get build-dep fluxbox', and it dumped at least 12M of files in my box specifically:

Code: Select all

cdbs debhelper gettext html2text intltool-debian libatk1.0-dev libcairo2-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libgtk2.0-dev libice-dev libimlib2-dev libjpeg62-dev libltdl3-dev libpango1.0-dev libpng12-dev libsm-dev libtiff4-dev libtiffxx0c2 libungif4-dev libx11-dev libxau-dev libxcursor-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxpm-dev libxrandr-dev libxrender-dev libxt-dev pkg-config po-debconf x-dev x11proto-core-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev
As you could see, these are devel packages. The ./configure, make and make install did worked when I build fluxbox. But when I tried to test the ./configure for the kde theme (baghira), I got configure error, this time:

Code: Select all

checking for Qt... configure: error: Qt (>= Qt 3.0 and < 4.0) (headers and libraries) not found. Please check your installation!
Obviously it looks like that I need to get the Qt headers and libraries. But, shouldn't I have at least all, if not most of the requisted tool for building a package from source?
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

plugwash
Posts: 2507
Joined: 2006-09-17 01:10
Contact:

#17 Post by plugwash »

nearly every library in debian has a corresponding -dev package, installing all of them would be near impossible even if there was a way to find them all.

as i said if there is an older version of the package you are trying to compile in the debian repositries you can use apt-get build-dep to get most of it. Beyond that its a matter of using the package contents search on packages.debian.org and/or some educated guesswork.

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#18 Post by mzilikazi »

You can dig around and find what you need. Something like:

Code: Select all

aptitude search qt|grep dev
would be useful.

I have very little qt on my systems but this:

Code: Select all

dpkg -l|grep qt
ii  libqt3-headers                        3.3.7-3         Qt3 header files
ii  libqt3-mt                             3.3.7-3         Qt GUI Library (Threaded runtime version), V
ii  libqt3-mt-dev                         3.3.7-3         Qt development files (Threaded)
ii  libqt3-mt-mysql                       3.3.7-3         MySQL database driver for Qt3 (Threaded)
ii  python-qt3                            3.16-1.2         Qt3 bindings for Python
ii  qt3-dev-tools                         3.3.7-3         Qt3 development tools
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
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#19 Post by garrincha »

Thanks guys for taking the trouble answering!8)

O.k., for future reference when I want to build a custom debian kernel, what is the most important thing that I need to have in order (obviously there are notes/HOW-DOs about it elsewhere that I'm aware of, I'm asking anyway) to have almost trouble free building.

So I would presumed that for a minimal base system install like I did I would be missing out a lot of devel libraries and headers?
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#20 Post by mzilikazi »

garrincha wrote: So I would presumed that for a minimal base system install like I did I would be missing out a lot of devel libraries and headers?
Yep that's always the case. Most people don't want/need -dev packages.
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

Post Reply