|
[Sponsors] |
April 10, 2011, 03:08 |
Compiler problem?
|
#1 |
New Member
N/A
Join Date: Jul 2010
Posts: 29
Rep Power: 16 |
Hello kind folks,
I am experiencing an issue that it fairly irritating, and I have been unable to resolve it after clearing out all my libraries and completely reinstalling the system compilers. I am using Ubuntu 10.10, and have previously installed openFOAM just fine on another machine. Even further, openFOAM actually runs just fine - at least with the tutorials and simple problems that I am currently learning on. Now, the problem that I am having is the following: When I open up the terminal, I get this error: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status It indicates to me, that the main() function is not being called properly; however, I can't find much information on what crt1.o is in the first place. Also, if I remove the openFOAM related commands in the .bashrc, I am free of this problem. Any help would be appreciated. While I am successfully running openFOAM, it is very annoying to know that there is some hidden incompatibility. Many thanks in advance. |
|
April 10, 2011, 05:55 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Jesse,
That is very odd. OK, lets try and debug this:
To be clearer on point 3, the only command line I expect to be in ".bashrc" is something like this: Code:
. /opt/openfoam171/etc/bashrc Code:
source /opt/openfoam171/etc/bashrc Bruno
__________________
|
||
April 10, 2011, 10:52 |
|
#3 |
New Member
N/A
Join Date: Jul 2010
Posts: 29
Rep Power: 16 |
Hi Bruno,
1. I am absolutely sure that it is when I open the terminal window. 2. Right, and that's what is confusing. I am not building anything; however, I did have this error when I both installed the Debian package and built it myself. 3. I am sourcing the bash file and setting the environmental variables that were required for running openFoam, since I preferred installing it elsewhere. Now, I reverted back to the Debian package installer, since I imagine that is the convention. The dot has been noticed. Again, openFoam actually operates just fine on this machine; it's just that I have this terminal error - induced only by the bashrc source. Many thanks, |
|
April 10, 2011, 14:38 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Jesse,
This feels familiar... it seems similar to this thread: http://www.cfd-online.com/Forums/ope...g-anymore.html The only thing I can think of doing next would be to use a divide-and-conquer strategy for isolating which command inside bashrc or settings.sh (sourced by bashrc) at the OpenFOAM folder is triggering that error. Wait, now thank I think about, the only executable that I know that is called from settings.sh is mpicc, if you are using the SYSTEMOPENMPI option. It's used to figure out where are the libraries and include folders for OpenMPI. They are: Code:
mpicc --showme:compile mpicc --showme:link Other than these, you'll have to isolate by hand where the problem is. I usually use commands to print location messages, like these: Code:
echo "Got here 01" ... (some code) ... echo "Got here 02" Bruno
__________________
|
|
April 10, 2011, 17:51 |
|
#5 |
New Member
N/A
Join Date: Jul 2010
Posts: 29
Rep Power: 16 |
Alright, I will give it a go with a different MPI package and see how that goes. One of my machines use MPICH2 and the other MPI-LAM.
If that's not the case, I'll just continue debugging or eventually just image the other HDD. :-) Cheers, Jesse |
|
Tags |
compiler, crt1.o |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
Can I solve this problem by Fluent? | Kai_kc | FLUENT | 1 | October 27, 2010 06:29 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |