LinuxQuestions.org
Help answer threads with 0 replies.
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 02-19-2011, 11:59 PM   #1
Dweeb2010
Member
 
Registered: May 2010
Posts: 33

Rep: Reputation: 1
Need help with setting up gcc and g++ in Source Mage - getting configure errors


Hi. I decided to install SMGL to give it a whirl, since I'm into the source-based systems, although relatively new at it. When I used Gentoo in the past, I didn't delve too deeply into use flags and customizing the builds.

I had created a fresh SourceMage install, and then started updating. My problem is that I updated gcc, and now I can't build any other programs. Here are the relevant lines from my config.log:

Code:
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in '/usr/src/gcc-4.4.3.bld':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
gcc is installed and in my $PATH, etc.
I have tried to build some basic c programs with gcc, and they build fine, but they do not run. When attempting to run an executable I've created, for example './a.out' I get: a.out: No such file or directory.

This is an AMD64 system. I can only guess that I somehow misconfigured gcc when I upgraded it, and that somehow the code being generated is not compatible with my system (I used -march=native), but I'm new to the sorcery system and do not know how to correct this. I've tried to reconfigure gcc, but I just haven't been able to figure it out.

I could really use some help!
 
Old 02-20-2011, 05:37 AM   #2
splix20
LQ Newbie
 
Registered: Feb 2011
Distribution: OpenSuse
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by Dweeb2010 View Post
When attempting to run an executable I've created, for example './a.out' I get: a.out: No such file or directory.
What do you see in terminal when you type "ls" in directory where a.out should be ? Do you see your file "a.out" in the list of files ?
 
Old 02-20-2011, 08:10 AM   #3
Dweeb2010
Member
 
Registered: May 2010
Posts: 33

Original Poster
Rep: Reputation: 1
Yes, the built file is in the directory like normal. This really seems to me like somehow I've configured gcc to generate code that is not for my processor, but I'm not sure how that happened.
 
Old 02-20-2011, 07:04 PM   #4
Dweeb2010
Member
 
Registered: May 2010
Posts: 33

Original Poster
Rep: Reputation: 1
I'm fairly certain that my issue is being caused by gcc looking for dynamic libraries in /usr/lib, when in fact the libraries in question are in /usr/lib64. I'm used to using "more convenient" distributions such as Debian and Ubuntu (on 32 bit systems) and am not quite sure how to change this library path setting, but after making a run with 'ldd /usr/bin/gcc' and locating the so files myself I'm pretty sure this is the problem. I could probably just copy/move the files, but I don't think that would be a really clean solution. I'm going to keep googling, but if someone could poke me in the right direction on this I would really appreciate it. Thanks.
 
Old 02-21-2011, 11:06 AM   #5
Dweeb2010
Member
 
Registered: May 2010
Posts: 33

Original Poster
Rep: Reputation: 1
I'm pretty sure I need to just rebuild my gcc with the correct options. Sorry to create yet another thread about this issue. Marking solved.
 
  


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
Source Mage GNU/Linux ktek Linux - Distributions 3 10-02-2008 06:38 PM
Gentoo or Source Mage linuxbriel Linux - Distributions 3 08-27-2006 09:36 PM
Difference between Sorcerer and Source Mage adrian_mx Linux - General 1 04-09-2006 12:51 AM
source mage install ahunderwood5850 Linux - Newbie 1 10-26-2003 04:00 PM
Anyone tried source mage? contrasutra Linux - Distributions 6 10-06-2003 03:19 AM

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

All times are GMT -5. The time now is 11:40 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