CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Installation

crt1.o error when compiling OF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 21, 2013, 11:51
Default crt1.o error when compiling OF
  #1
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,075
Blog Entries: 4
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I want to compile OF with gcc-4.7.3 and some flags.
The first compilation works good (standard flag -O3) but the second compilation is not working. Flags are:
Code:
-pipe -O2 -march=bdver1 -mtune=bdver1
After starting Allwmake I get the following error:
Code:
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory

What I did is to create a symbolic link that is mentioned here: http://stackoverflow.com/questions/6...ot-find-crt1-o

Its not working. The files are available in /usr/lib64/

How can I manage that?
Or is it due to gcc-4.7.3 ?
Tobi is offline   Reply With Quote

Old   September 22, 2013, 08:06
Default
  #2
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,075
Blog Entries: 4
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

first problem solved.
I had to export the x86_64 libs path into the LIBRARY_PATH variable like:

Code:
LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
export LIBRARY_PATH
Now this error is gone but I still have problems with /usr/bin/ld like:
Code:
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s

/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc
I think that OF is not compiling well although the OF librarys and binaries are build now...


Does that depend on the Gcc-4.7.3 version?
Tobi is offline   Reply With Quote

Old   September 22, 2013, 08:09
Default
  #3
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,075
Blog Entries: 4
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I think I know the error! The first line which I compile is:
Code:
gcc -m32 -Wall -O2 ...
I should have -m64 not -m32. ?

I made a copy fault: linuxGcc47 into linux64Gcc47_v2
Tobi is offline   Reply With Quote

Old   September 22, 2013, 12:24
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Tobi,

Sorry, I didn't manage to answer you yesterday. I'm glad that you figured it out.

And yes, with OpenFOAM, usually the errors regarding "crt1.o" and "crti.o" are due to inconsistencies in using the compilers. In this case, you were probably having a conflict between the objects available in the Scotch library (the same build is used for all "linux64"), versus the ones being built on OpenFOAM.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 30, 2014, 07:45
Default
  #5
Member
 
CFDUser
Join Date: Mar 2014
Posts: 55
Rep Power: 4
CFDUser_ is on a distinguished road
Hi Tobi and Bruno,

I am getting the same error. Actually I dont have access to admin. I should manage as user for ma hpc. Can you people guide me to rectify this error?

As tobi said I dont know where to put -m64 insted of -m32

Thanks & Regards
CFDUser_
CFDUser_ is offline   Reply With Quote

Old   July 30, 2014, 10:54
Default
  #6
Member
 
CFDUser
Join Date: Mar 2014
Posts: 55
Rep Power: 4
CFDUser_ is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I think I know the error! The first line which I compile is:
Code:
gcc -m32 -Wall -O2 ...
I should have -m64 not -m32. ?

I made a copy fault: linuxGcc47 into linux64Gcc47_v2
Hi Tobi,

I badly in need to solve this problem. Thank god that you are online. If you are free can you guide me where should I change permissions?


CFDUser_
CFDUser_ is offline   Reply With Quote

Old   August 4, 2014, 12:37
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings CFDUser_,

I hope you don't mind, but I'll quote part of the message you sent me over private message:
Quote:
I have a hpc with user rights. I have one solver compiled in admin system. I found some bugs in the solver and corresponding libs. So I tried to compile in my user account.

Even though it is straight forward by compiling to FOAM_USER_LIBBIN and FOAM_USER_APPBIN, compiling libs unable to find depended libs in FOAM_USER_LIBBIN.

I have exported LD_LIBRARY_PATH and verified in LD_LIBRARY_PATH's list. Path is there but still could not find the dependent libs.

To get-ride of this error I have specified searchable path to compile libs(-L$(FOAM_USER_LIBBIN)) and succesfully compiled remaining libs.

But the same thing is not working for compiling solvers. In-fact it is working to find dependent libs but getting new problem called cannot find crt1.o and crti.o.
As I mentioned in the previous post of mine, issues with "crt*.o" are usually due to conflicts between the compiler originally used to build the original libraries and the compiler currently being used.

Several days have passed since you asked about this, so I don't know if you've managed to solve this issue or not. If you haven't, please provide as many details as you can, such as:
  • Which version of OpenFOAM is in the machine you're using?
  • Which Linux Distribution is being used?
  • Do you know how that version of OpenFOAM was installed?
  • What does this command give you?
    Code:
    uname -m
  • What exact steps did you take to compile the libraries and applications on your user folder?
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 4, 2014, 23:03
Default
  #8
Member
 
CFDUser
Join Date: Mar 2014
Posts: 55
Rep Power: 4
CFDUser_ is on a distinguished road
Thanks Bruno for the reply. Some how I managed to compile. Still I believe there is something wrong in ma system. Any way there is no compilation problem now. I will get back to you with the details you asked. Currently I don't have access to send.

Regards,
CFDUser_
CFDUser_ is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64) Ali.beh Fluent UDF and Scheme Programming 2 April 8, 2013 18:12
Linux vs PC Compiling Rhyno466 Fluent UDF and Scheme Programming 10 May 11, 2012 17:01
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40
error msg when compiling user fortran Ollimarc CFX 0 March 13, 2008 19:16
Dissimilarity in compiling new BC in 32bit OpenSuSE 103 versus 64bit CentOS 50 versus 64bit SLED 100 sponiar OpenFOAM Running, Solving & CFD 3 February 26, 2008 07:31


All times are GMT -4. The time now is 00:53.