LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-06-2005, 10:16 AM   #1
manuel11g
LQ Newbie
 
Registered: May 2005
Location: /home/manuel11g
Distribution: Slackware
Posts: 6

Rep: Reputation: 0
Instaler problems


hello, I have a big problem.
When i try to install programs i get a error.
The error is :

checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

I have gcc :

root@linux:/home/manuel11g# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/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.4

What to do ?
Pls help.
 
Old 05-06-2005, 10:25 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Re: Instaler problems

Quote:
Originally posted by manuel11g
hello, I have a big problem.
When i try to install programs i get a error.
The error is :

checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

I have gcc :

root@linux:/home/manuel11g# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/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.4

What to do ?
Pls help.
Do you have binutils installed??
 
Old 05-06-2005, 10:28 AM   #3
manuel11g
LQ Newbie
 
Registered: May 2005
Location: /home/manuel11g
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
When i try to install them i get this :

root@linux:/home/manuel11g/binutils-2.9# ./configure --host=i486-slackware-linux
Created "Makefile" in /home/manuel11g/binutils-2.9 using "mt-frag"
/usr/bin/ld: unrecognized option '--as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
 
Old 05-06-2005, 10:59 AM   #4
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Well, I guess you should do:

export CC=gcc
 
Old 05-06-2005, 11:04 AM   #5
manuel11g
LQ Newbie
 
Registered: May 2005
Location: /home/manuel11g
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
It give me the same error.
When i try to compile a Hello_World.c it give me another error:

root@linux:/home/manuel11g/binutils-2.9# gcc Hello_World.c -o hello
Hello_World.c:1:22: iostream.h: No such file or directory
Hello_World.c: In function `main':
Hello_World.c:4: error: `cout' undeclared (first use in this function)
Hello_World.c:4: error: (Each undeclared identifier is reported only once
Hello_World.c:4: error: for each function it appears in.)
Hello_World.c:3: warning: return type of `main' is not `int'
root@linux:/home/manuel11g/binutils-2.9#
 
Old 05-06-2005, 11:06 AM   #6
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Well, that's because there are errors in your program

Hello_World.c:1:22: iostream.h: No such file or directory

something wrong with the way you include a header file here.

Hello_World.c: In function `main':
Hello_World.c:4: error: `cout' undeclared (first use in this function)

put after your includes this line of code:

using namespace std;

Hello_World.c:4: error: (Each undeclared identifier is reported only once
Hello_World.c:4: error: for each function it appears in.)
Hello_World.c:3: warning: return type of `main' is not `int'

the main function should return an int type.
 
Old 05-06-2005, 11:11 AM   #7
manuel11g
LQ Newbie
 
Registered: May 2005
Location: /home/manuel11g
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
This is my source code :

#include <iostream>

using namespace std;

int main()
{
cout << "Hello World \n";
return 0;
}

I copy him from the http://www.linuxquestions.org/questi...icle&artid=173 - a tutorial from this page :P
It is wrong ?
 
Old 05-06-2005, 11:28 AM   #8
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
No it's not, but how do you compile your program?
 
Old 05-06-2005, 11:42 AM   #9
manuel11g
LQ Newbie
 
Registered: May 2005
Location: /home/manuel11g
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
I think i made it.
When i compile programs with g++ it works but when i want to "make" it give me another error :

make
Making all in libGeoIP
make[1]: Entering directory `/root/GeoIP-1.2.1/libGeoIP'
/bin/sh ../libtool --mode=compile g++ -DPACKAGE=\"GeoIP\" -DVERSION=\"1.2.1\" -DHAVE_DLFCN_H=1 -DDEFAULT_DBDIR=\"NONE/share/GeoIP\" -I. -I. -DGEOIPDATADIR=\"/usr/local/share/GeoIP\" -Wall -g -O2 -c GeoIP.c
rm -f .libs/GeoIP.lo
g++ -DPACKAGE=\"GeoIP\" -DVERSION=\"1.2.1\" -DHAVE_DLFCN_H=1 -DDEFAULT_DBDIR=\"NONE/share/GeoIP\" -I. -I. -DGEOIPDATADIR=\"/usr/local/share/GeoIP\" -Wall -g -O2 -c GeoIP.c -fPIC -DPIC -o .libs/GeoIP.lo
GeoIP.c: In function `void _setup_dbfilename()':
GeoIP.c:74: error: invalid conversion from `void*' to `char**'
GeoIP.c: In function `void _setup_segments(GeoIP*)':
GeoIP.c:143: error: invalid conversion from `void*' to `unsigned int*'
GeoIP.c:147: error: invalid conversion from `void*' to `unsigned int*'
GeoIP.c:154: error: invalid conversion from `void*' to `unsigned int*'
GeoIP.c:169: error: invalid conversion from `void*' to `unsigned int*'
GeoIP.c: In function `GeoIP* GeoIP_open(const char*, int)':
GeoIP.c:296: error: invalid conversion from `void*' to `char*'
GeoIP.c: In function `char* GeoIP_database_info(GeoIP*)':
GeoIP.c:450: error: invalid conversion from `void*' to `char*'
GeoIP.c: In function `GeoIPRegion* _get_region(GeoIP*, long unsigned int)':
GeoIP.c:468: error: invalid conversion from `void*' to `GeoIPRegion*'
GeoIP.c:480: error: invalid conversion from `void*' to `char*'
GeoIP.c:496: error: invalid conversion from `void*' to `char*'
GeoIP.c:505: error: invalid conversion from `void*' to `char*'
GeoIP.c: In function `char* _get_org(GeoIP*, long unsigned int)':
GeoIP.c:573: warning: comparison between signed and unsigned integer
expressions
GeoIP.c:581: error: invalid conversion from `void*' to `char*'
GeoIP.c:584: error: invalid conversion from `unsigned char*' to `char*'
GeoIP.c:585: error: invalid conversion from `void*' to `char*'
make[1]: *** [GeoIP.lo] Error 1
make[1]: Leaving directory `/root/GeoIP-1.2.1/libGeoIP'
make: *** [all-recursive] Error 1
 
Old 05-06-2005, 11:45 AM   #10
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Well, this again is not your compiler's fault. There simply are errors in the compiled code.
 
Old 05-06-2005, 12:02 PM   #11
manuel11g
LQ Newbie
 
Registered: May 2005
Location: /home/manuel11g
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
how to repair this errors ?
 
Old 05-06-2005, 12:04 PM   #12
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
It seems you have not much experience with programming C or C++, so I think you're beter of trying to find some precompiled packages for this program.
 
  


Reply



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
Ethernet Adsl Modem Driver Problems And Install Problems... akhilnair Linux - Hardware 12 11-28-2004 08:19 AM
cisco 350 wireless problems and suse x-server problems incognito9 Linux - Wireless Networking 5 10-14-2004 07:53 AM
Problems with OSS while trying to avoid problems in ALSA (scratchy sound) GT_Onizuka Linux - General 1 02-05-2004 11:55 PM
Problems, problems, problems. Lets start with the soundcard Kre8ive Linux - Newbie 5 08-07-2003 01:20 AM
Problems, problems, problems. Lets start with the ES 1868 AudioDrive Kre8ive Linux - Newbie 1 08-06-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:58 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
Open Source Consulting | Domain Registration