LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need help with setting up gcc and g++ in Source Mage - getting configure errors (https://www.linuxquestions.org/questions/linux-software-2/need-help-with-setting-up-gcc-and-g-in-source-mage-getting-configure-errors-863825/)

Dweeb2010 02-19-2011 11:59 PM

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!

splix20 02-20-2011 05:37 AM

Quote:

Originally Posted by Dweeb2010 (Post 4264444)
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 ?

Dweeb2010 02-20-2011 08:10 AM

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.

Dweeb2010 02-20-2011 07:04 PM

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.

Dweeb2010 02-21-2011 11:06 AM

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.


All times are GMT -5. The time now is 01:36 PM.