Compiler problem?
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. |
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 |
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. :p 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, |
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 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" Bruno |
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 |
All times are GMT -4. The time now is 21:47. |