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

Cmake cannot recognize gcc to compile ParaView

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 22, 2010, 19:03
Default Cmake cannot recognize gcc to compile ParaView [SOLVED]
  #1
New Member
 
César Vecchio
Join Date: Jul 2010
Location: Córdoba, Argentina
Posts: 21
Rep Power: 7
CAVT is on a distinguished road
Well, firstly my apologies for another thread on compiling ParaView, but this is a new one. I'm using Unity Linux, 32bit, it's based on Mandriva, and I'm trying to finish installing OF1.7. Well, OpenFoam itself compiled perfectly, and now I'm trying to compile ParaView with the automated script makeParaView provided in the 3rd Party App folder. However, despite my environment is well set, and despite I have gcc, cmake and all that stuff, I get this in the terminal:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/unc/OpenFOAM/ThirdParty-1.7.0/platforms/linuxGcc/paraview-3.8.0 -DVTK_USE_TK:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON -DVTK_USE_RPATH:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DPARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON -DPARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON -DPARAVIEW_GENERATE_PROXY_DOCUMENTATION=OFF -DPARAVIEW_BUILD_QT_GUI=ON /home/unc/OpenFOAM/ThirdParty-1.7.0/paraview-3.8.0

----

-- The C compiler identification is unknown
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/unc/OpenFOAM/ThirdParty-1.7.0/platforms/build-linuxGcc/paraview-3.8.0/CMakeFiles/CMakeTmp


And then it continues with some other errors which are simply the offshoots of this one. Apparently cmake cannot detect properly the compiler gcc, located at /user/bin/gcc, and I cannot figure out how to hardcode it. I've tried tweaking the cmakelists files unfructuously. I have followed to the letter the instructions in OF official website but I get stuck here. I now I can try with a precompiled ParaView, but I want to do the way OpenCFD indicates before trying something else.
Also, after installing everything, how do I know which files I can erase? The resulting folders are somewhat big and I want to create a live-dvd including OF, besides some other apps, and I'm constrained to 4 maximum of 4GB iso image.
Thanks in advance,

César

Last edited by CAVT; July 28, 2010 at 04:45.
CAVT is offline   Reply With Quote

Old   July 23, 2010, 15:21
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings César and welcome to the forum!

OK, as for the gcc issue, you can try running the following two commands:
Code:
export CC=`which gcc`
export CXX=`which g++`
And then run makeParaView. This should tell cmake and make which gcc and g++ should they really use.


As for packing OpenFOAM, it depends on how much of OpenFOAM do you want to make available in the DVD!?
If you only want to be able to run solvers, utilities and scripts, and not provide the source code, then the relevant folders are as follows:
Code:
OpenFOAM-1.7.0/applications/bin
OpenFOAM-1.7.0/etc
OpenFOAM-1.7.0/bin
OpenFOAM-1.7.0/lib
OpenFOAM-1.7.0/tutorials
OpenFOAM-1.7.0/doc (except the Doxygen folder in it)
ThirdParty-1.7.0/platforms
$USER-1.7.0/applications/bin
And you should be set to go! And if by any chance you also want to provide the executables that some tutorials specifically needed, run this from the OpenFOAM-1.7.0 folder:
Code:
wmake all tutorials
Those applications that some tutorials need will be compiled into the folder $USER-1.7.0/applications/bin.


Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 27, 2010, 19:09
Default Cmake cannot recognize gcc to compile ParaView [SOLVED]
  #3
New Member
 
César Vecchio
Join Date: Jul 2010
Location: Córdoba, Argentina
Posts: 21
Rep Power: 7
CAVT is on a distinguished road
Thanks for the valuable advice, Bruno. I'm now building Paraview, let's see how it goes in the end, but so far this is what I did:

First I tried with your suggestion, but it didn't work. I found it pretty weird since when I compiled other softs those flags work well. So I checked if gcc was installed properly in my /usr/bin directory. Everything was fine, gcc is a symlink to the actual gcc-4.4.3 file. So I thought that maybe cmake is not reading well the symlink, and then I changed the export flag as "export CC=gcc-4.4.3" and now the error was pointing solely to g++. The actual g++ file is g++-4.4.3. So the final solution was:

export CC=gcc-4.4.3
export CXX=g++-4.4.3
./makeparaview

Naturally the version numbers wil depend on the installed gcc/g++, but it's evidently an issue of my cmake, since trying to build Paraview from an outer source using ccmake (as stated in Paraview's website) has the same errors. My cmake is 2.8, I noticed in one thread here someone reccomends using 2.6.4 instead of 2.8, but the solution sems to be specifying the full gcc/g++ name. Ha, I'm going 39% ready and advancing...

EDIT: to the mods, would you mind adding SOLVED to the thread title please? I don't have the option to change the title when editing the first post. Thanks.

Last edited by CAVT; July 28, 2010 at 04:44.
CAVT is offline   Reply With Quote

Old   July 27, 2010, 20:38
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings César,

At least I pointed you in the right direction
CMake is known to have it's ups and downs, one of which was a problem with a hard coded work around for a mount folder for some OS (Solaris I think)... which clashed with a normal enterprise Linux setup, with multi user mounts... and thus a pseudo-bug-fix was a bug in itself

Quote:
Originally Posted by CAVT View Post
EDIT: to the mods, would you mind adding SOLVED to the thread title please? I don't have the option to change the title when editing the first post.
You can change the title if, while in edit mode of the post, click on "Go Advanced"! Then it will open the advanced editing mode and provide you with all of technological buttonary that we can get on this forum

Best regards,
Bruno
wyldckat 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
PV3FoamReader compile error.... PEM_GUY OpenFOAM Installation 6 April 5, 2010 17:22
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 22:51


All times are GMT -4. The time now is 14:28.