LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-21-2009, 09:08 AM   #1
greymont
LQ Newbie
 
Registered: Jan 2005
Posts: 5

Rep: Reputation: 0
Stumped with GCC error on first attempt at install from source


I'm attempting to install rdesktop 1.6.0 from source into a relatively fresh Ubuntu 9.10 desktop 64bit.

I downloaded the tar.gz and unpacked it. The README says to
% ./configure
% make
% make install

so I did:

dpc@dpc-host:~/Desktop/rdesktop-1.6.0$ sudo su
root@dpc-host:/home/dpc/Desktop/rdesktop-1.6.0# ./configure
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.

I assume I cannot continue installing, so I looked at config.log and found:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by rdesktop configure 1.6.0, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = dpc-host
uname -m = x86_64
uname -r = 2.6.24-24-generic
uname -s = Linux
uname -v = #1 SMP Sat Aug 22 00:30:49 UTC 2009

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


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

configure:1829: checking for gcc
configure:1845: found /usr/bin/gcc
configure:1856: result: gcc
configure:2094: checking for C compiler version
configure:2101: gcc --version >&5
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
Copyright (C) 2007 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:2104: $? = 0
configure:2111: gcc -v >&5
Using built-in specs.
Target: x86_64-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 --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configure:2114: $? = 0
configure:2121: gcc -V >&5
gcc: '-V' option must have argument
configure:2124: $? = 1
configure:2147: checking for C compiler default output file name
configure:2174: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2177: $? = 1
configure:2215: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "rdesktop"
| #define PACKAGE_TARNAME "rdesktop"
| #define PACKAGE_VERSION "1.6.0"
| #define PACKAGE_STRING "rdesktop 1.6.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2222: error: C compiler cannot create executables
See `config.log' for more details.

What do I do now?
 
Old 09-21-2009, 10:19 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

You seem to be missing crt1.o:

/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status


Which is part of the glibc (developer) package. I do believe (not an ubuntu user) that package is called libc6-dev for the ubuntu distro.

Install that and try again.

Last edited by druuna; 09-21-2009 at 10:21 AM.
 
Old 09-21-2009, 10:20 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
You probably need to install libc6-dev, glibc-dev or whatever it's called in ubuntu. Anyway, I think that ubuntu has some kind of meta-package or something like that called build-essentials, that should install everything you need in one sweep, so maybe you should take that route.

Another thing: you really don't need root privileges to compile anything, so, save yourself some pain, and skip the "sudo su" step. You don't need to be root to do the configure and make steps. You only need that when installing, "sudo make install" usually. However, and unless you have a good reason not to, you should stick to the official packages, and if not, at least be careful enough to use --prefix on the configure step to separate the manually installed files from the ubuntu ones so they don't get mixed. For example:

Code:
./configure --prefix=/usr/local
 
Old 09-21-2009, 10:25 AM   #4
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
You can install `rdesktop` using apt itself. Why take the pain of installing the dependencies when there is a wonderful tool available. In any case I think you require gcc, build-essential package.

Regards,

--
Prasanta
 
Old 09-21-2009, 10:33 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Welcome to LQ.

sudo apt-get install rdesktop
.. will install version 1.6.0

Using 'apt-get install' or the package manager 'synaptic'
is the only correct way to install software on Ubuntu.

If you want to compile an application, not amongst the
26,000 available packages, you will have to do :
sudo apt-get install build-essential libc6-dev g++
.....
Good luck !
.....
 
Old 09-21-2009, 10:42 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by knudfl View Post
Using 'apt-get install' or the package manager 'synaptic'
is the only correct way to install software on Ubuntu.
Do you want to explain that extreme claim? Is it Ubuntu specific or applies to other Debian based distributions?

I would claim that using apt or a front end to apt, such as synaptic, is the easiest way to install any of the vast number of packages available that way. It is also more likely to result in a correct installation than other methods. It also leaves the installed software in a state that will be easier to maintain and upgrade later.

But I think all that just adds up to "best way", which is much less than "only correct way".
 
Old 09-21-2009, 10:48 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
It's certainly the preferable way, as long as there's not any reason to do in any other way. That's what the package manager is there for: it keeps track of the installed files, their dependencies, watch for sanity to prevent packages fighting with each other, file collisions, incompatible versions, etc. etc. Something that you don't get if you install from source.

It just easier to use the package manager. Even if you want to compile something yourself, for a valid reason, I'd still build a proper .deb package, and then install it, rather than just throwing the binaries in your system without any care. And if that's too much for you, out of pure laziness which is the only excuse, then at least be smart and tidy and use --prefix, as said above.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install GCC onto Linux DSL from source kiml Linux - Newbie 1 09-09-2009 02:26 AM
ubuntu modem install (attempt) get:checking for asm/mach-default...** error neonwv Linux - Newbie 7 08-19-2009 08:52 AM
pkg-get install gcc ERROR: gcc unrecognized Raidmax Solaris / OpenSolaris 10 08-30-2007 01:51 PM
GRUB gives error messages after a OpenSuSE install attempt on a External HD mandrakethepenguin Linux - General 1 01-19-2006 04:37 PM
Error Code 6000 during 4.0 or 4.5 Install Attempt james91911 Linspire/Freespire 5 09-09-2004 08:42 PM


All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration