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

recompilation OF 1.5 applications libstdc++.so

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2009, 11:29
Default recompilation OF 1.5 applications libstdc++.so
  #1
New Member
 
Join Date: May 2009
Posts: 2
Rep Power: 0
jamba is on a distinguished road
Hi all,

I have a problem recompiling OpenFOAM applications. The error message I keep getting is
----------------------
/home/pc/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../lib64/libstdc++.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [/home/pc/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/interFoam] Error 1

--------------------------
I run OpenSuSE + my gcc version is 4.3.1 on the home direc and the 4.3.1 that comes in Third Party software with OF

Thanks a lot for your help!
Jamba
jamba is offline   Reply With Quote

Old   May 6, 2010, 07:09
Default Same problem on Suse x64 with OpenFoam 1.6.x snapshot
  #2
New Member
 
Arnaud PERE
Join Date: May 2010
Posts: 5
Rep Power: 16
arnaud.pere is on a distinguished road
Hello, as I am facing exactly the same problem on another platform and another OpenFoam version, I was wondering if you got an answer on this ?

My version :
Linux 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

I get several times the folowing linkage error :

gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib64/libstdc++.so: file not recognized: Format
de fichier non reconnu
collect2: ld returned 1 exit status

Any clues anyone ?
arnaud.pere is offline   Reply With Quote

Old   May 6, 2010, 22:02
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Arnaud,

There are multiple solutions for that problem. The main issue lies on a conflict of available tools, namely OpenFOAM's pre-built gcc 4.3.3 and (I'm guessing) openSUSE's gcc 4.4.1.

Solution 1 - Swapping gcc 4.3.3 libraries for the system libraries - run these commands (advice: one by one, just in case... because none of them should complain with errors):
Code:
cd ~/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/lib
mv libstdc++.so.6 libstdc++.so.6.orig
ln -s `locate libstdc++.so.6.0 | grep "^/usr/lib" | head -n 1` libstdc++.so.6
mv libgcc_s.so.1 libgcc_s.so.1.orig
ln -s `locate libgcc_s.so. | grep "^/lib" | head -n 1` libgcc_s.so.1
Solution 2 - Rebuilding gcc 4.3.3 - follow the posts starting on this post: OpenFoam Installation in Redhat Enterprise linux 5 post #4

Solution 3 - Using the system's gcc 4.4.? - gcc-4.4 and above... post #7

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 7, 2010, 05:24
Unhappy Well, no luck
  #4
New Member
 
Arnaud PERE
Join Date: May 2010
Posts: 5
Rep Power: 16
arnaud.pere is on a distinguished road
Hello, thank you for your reply !

First point, my platform is not an OpenSuse but a Suse Enterprise 10.2 :
Code:
> cat /etc/SuSE-release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2
So that the system compiler is GCC 4.1.2 (quite old I'm afraid)


So as you can guess, I was using the compiler provided in Thirdparty (gcc 4.3.3)
  1. I had already tried the first method but only with the first library which did not work at all. So I tried with the two suggested : the result is exactly the same as previously posted.
  2. I had already tried to recompile gcc provided with thirdparty from source (I'm currently using a binary version because I couldn't manage to make the compilation work and didn't have enough time to check why. Maybe I should give a look again.
  3. As you can see, my system compiler is far too old and complains about many errors newer versions wouldn't. This can't work for me.
Well, this looks like a deadend if I can't manage to compile the right version of gcc from scratch.
In parallel, collegues are going to try compilation on the latest OpenSuse and if success we will migrate this "old" Suse Enterprise server to OpenSuse
arnaud.pere is offline   Reply With Quote

Old   May 7, 2010, 15:43
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Arnaud,

OK, then might I suggest following the instructions at this thread, more specifically posts #13 and #18. Those posts have instructions to fix OpenFOAM's MPFR and a tweaked makeGcc script for strict x86_64 compiling of gcc The surrounding posts could also have vital information for you!

And even if your SuSe box is a bit old, it can still crank up the speed on the latest OpenFOAM

Good luck and keep us posted on your efforts!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 10, 2010, 11:21
Default
  #6
New Member
 
Arnaud PERE
Join Date: May 2010
Posts: 5
Rep Power: 16
arnaud.pere is on a distinguished road
Hello again,
Well, things are in progress...

Thanks for the redirection to previous post : this helped me a lot and I could successfully compile gcc 4.3.3 & co !
Currently, OpenFoam is being compiled (started a bit less than an hour ago, but still no errors, so I would say it's going better than before)
In the meantime, I tried briefly to compile paraview but did get a "cmake not found" error : I'm going to check in previous posts if I can find a clue.

I'l let you know how this goes
arnaud.pere is offline   Reply With Quote

Old   May 10, 2010, 11:34
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Arnaud,

You can get a pre-built cmake from the 32 bit binary package of ThirdParty. Just unpack the file ThirdParty-1.6.linuxGcc.gtgz the same way you did the other packages, and you'll get cmake good to go... or so I hope. Well not quite, since you will also need to install a package that could be named ia32libs (it's the name in Ubuntu, I'm not sure what is its name in SuSe ) for it to run. It provides libraries for running 32 bit applications in 64bit Linux boxes.
Or you could download the cmake source from www.cmake.org and build it. Paraview 3.6.1 needs at the very least "cmake 2.6.4".

Also, you can follow this thread: New user needs help - it provides a very step-by-step on how to install Qt 4.3.5 + Paraview.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 10, 2010, 12:45
Default
  #8
New Member
 
Arnaud PERE
Join Date: May 2010
Posts: 5
Rep Power: 16
arnaud.pere is on a distinguished road
Well, we are progressing :

Now openfoam compiles successfully ! Great step forward ! Thanks for your help again !
Paraview compiles successfully too, I get the splash screen on start, but that's all : segmentation fault before anything else happens.
arnaud.pere is offline   Reply With Quote

Old   May 10, 2010, 12:55
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
I think your SuSe is running in French or similar. In other words, you possibly need the trick for forcing standard English:
Code:
export LC_ALL=C
You can add this code line to the script paraFoam, somewhere before paraview is called, preferably just after the first large block of comments.

The second possibility, is that PV3FoamReader needs to be rebuilt.

If it still crashes, another possibility is that there is a clash of loaded libraries. Try running paraview directly form it's binary folder "OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64/bin/", but without the OpenFOAM environment being active/sourced! If it runs, the guilty party is library clashes. Somehow, OpenFOAM and Paraview probably weren't built with the same gcc version.

Good luck!

Bruno
__________________

Last edited by wyldckat; May 10, 2010 at 12:56. Reason: missing word...
wyldckat is offline   Reply With Quote

Old   May 10, 2010, 13:11
Default
  #10
New Member
 
Arnaud PERE
Join Date: May 2010
Posts: 5
Rep Power: 16
arnaud.pere is on a distinguished road
You reply too fast !
I had juste found previous messages from you on another post : http://www.cfd-online.com/Forums/ope...ion-fault.html

=> As it's a Suse french version, I tried the LC_LANG => no luck
=> I'm not sure if I used the system compiler ou openfoam's to compile paraview and saw this could have an effect => currently trying to fix this... and... yes, it works !!!

Thanks again for all your help
Best regards,
Arnaud
arnaud.pere is offline   Reply With Quote

Old   May 10, 2010, 13:17
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
You're welcome I'm glad it's working now

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
applications, libstdc++.so, recompilation


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM Version 1.5 Released OpenFOAM discussion board administrator OpenFOAM Announcements from ESI-OpenCFD 0 July 14, 2008 19:22
Windows Installation BugsComments on Petrbs patch brooksmoses OpenFOAM Installation 48 April 16, 2006 01:20
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 08:46.