CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Installation issue - CGAL/Delaunay_triangulation_3.h (https://www.cfd-online.com/Forums/openfoam-installation/147800-installation-issue-cgal-delaunay_triangulation_3-h.html)

lost.identity January 29, 2015 10:42

Installation issue - CGAL/Delaunay_triangulation_3.h
 
Hi,

I'm trying to install OpenFOAM 2.3.1 on SUSE Linux Enterprise Server 11 SP3. I'm following the instructions on
http://openfoamwiki.net/index.php/In...#openSUSE_12.3

After some difficulty I've managed to build the ThirdParty folder without any errors. However, now when I try to compile the main OpenFOAM folder I get the following error

Code:

fata error: CGAL/Delaunay_triangulation_3.h: No such file or directory
I've had a look at the following thread to find out any answers
http://www.cfd-online.com/Forums/ope...myhexmesh.html

However, the difference to that thread is, I am able to compile CGAL library in the ThirdParty folder without any issues. I think my culprit might be cmake. My machine only has cmake-2.6 installed. However, I used the following explanation: https://forums.suse.com/showthread.p...ools-libraries, to install cmake version 2.8.12.2 and use it as a prefix as in

Code:

PATH="${HOME}/opt/cmake_2.8.12.2/bin/:${PATH}" ./Allwmake
Any ideas what might be going wrong?

Thanks!

wyldckat January 29, 2015 16:03

Greetings lost.identity,

If you're trying to build OpenFOAM 2.3.1, then please follow these instructions: http://openfoamwiki.net/index.php/In...#openSUSE_12.3 - and not the ones meant for OpenFOAM 2.3.0 ;)

As indicated in step #10, please follow the instructions therein:
Quote:

Code:

#Create a tarball in case you've seen any errors (it's the first error that matters)
#or if you don't understand the output
#and attach the file "make.log.tar.gz" to a post in the designated thread

tar -czf make.log.tar.gz make.log


In addition, please indicate what the following commands give you:
Code:

cmake --version

echo $CMAKE_ROOT

Best regards,
Bruno

lost.identity January 30, 2015 05:35

1 Attachment(s)
Hi Bruno,

Thanks for your reply. I ran Allclean in my ThirdParty folder before re-doing the installation again.

Now there are few hiccups on the way, mainly because I'm using the SUSE Enterprise and not openSUSE. I'll list them down here.

1) I think the equivalent pattern to devel_C_C++ in SLES is sdk_c_c++ so I installed that. Secondly, qt4-assistant-adp-devel, doesn't exist in any SDK repositories so it is no installed.

2) I do not have the correct versions of gmp, mpfr, mpc and gcc. Therefore, following this thread

http://www.cfd-online.com/Forums/ope...n-problem.html

I downloaded the right versions of these software into my ThirdParty directory and extracted there. Then I first ran makeGcc.

3) I do not have a recent version of cmake.
Code:

cmake --version
cmake version 2.6-patch 2

That's the output from my cmake. So as I mentioned before I installed cmake-2.8.12.2 and then used the following to compile

Code:

PATH="${HOME}/opt/cmake_2.8.12.2/bin/:${PATH}" ./Allwmake
I did not get any errors yesterday when I did this. But today I saw the following error

Code:

cp: cannot stat `../bin/d[agm]*': No such file or directory
make: [install] Error 1 (ignored)

But I'm ignoring that error and there are no further errors in the ThirdParty make.

4) I still see the same issue again when I try to compile main OpenFOAM directory. I've attached the compressed log file.

Thanks. :)

wyldckat January 31, 2015 05:21

Hi lost.identity,

Just in case, please check which version of make you're using:
Code:

make --version
As for a possible fix, the following steps are based on these: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10
  1. The "Boost" library/toolbox in your system also seems to be considerably old. Therefore, let's get a more recent one:
    Code:

    foam
    sed -i -e 's=boost-system=boost_1_54_0=' etc/config/CGAL.sh

    cd $WM_THIRD_PARTY_DIR
    alias wget="wget --no-check-certificate"
    wget "https://raw.github.com/wyldckat/scripts4OpenFOAM3rdParty/master/getBoost"
    chmod +x getBoost

    ./getBoost
    sed -i -e 's=boost-system=boost_1_54_0=' makeCGAL

  2. Now try building only CGAL:
    Code:

    ./makeCGAL > mkcgal.log 2>&1
  3. Check the contents of the file "mkcgal.log" and check if there exists an error message at the end and if it's as cryptic at the one you've gotten so far or not:
    Code:

    == Generating build files (DONE) ==

    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/flacs/OpenFOAM/ThirdParty-2.3.1/CGAL-4.3
    + make -j 8
    make: *** No targets specified and no makefile found.  Stop.
    + exit 1


Best regards,
Bruno

lost.identity January 31, 2015 08:56

Hi Bruno,

Thanks again for your reply. This is the output for make --version

Code:

make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-unknown-linux-gnu

The machine I'm trying to install the OpenFOAM does not have internet access, but I've downloaded boost tar file from another machine and copied it to the ThirdParty folder and tried to follow the instructions as close as possible.

if I run ./makeCGAL on it's own I get the following error (my guess it's not using the correct cmake)

Code:

CMake Error: Error in cmake code at
/home/flacs/OpenFOAM/ThirdParty-2.3.1/CGAL-4.3/cmake/modules/CGAL_Macros.cmake:213:
Parse error.  Function missing ending ")".  Instead found left paren with text "(".
CMake Error at CMakeLists.txt:340 (include):
  include could not find load file:

    /home/flacs/OpenFOAM/ThirdParty-2.3.1/CGAL-4.3/cmake/modules/CGAL_Macros.cmake


CMake Error at CMakeLists.txt:341 (cgal_setup_module_path):
  Unknown CMake command "cgal_setup_module_path".


-- Configuring incomplete, errors occurred!
+ exit 1

In fact the only way I could compile anything is if I prefix the installation as

Code:

PATH="${HOME}/opt/cmake_2.8.12.2/bin/:${PATH}" ./makeCGAL
The above compilation does not give any errors. Is there a way to somehow to make the system always take cmake-2.8.12.2 rather than cmake-2.6.2?

Thanks

wyldckat January 31, 2015 09:39

Hi lost.identity,

Run the following commands:
Code:

mkdir -p $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER

ln -s ${HOME}/opt/cmake_2.8.12.2 $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake-2.8.12.1

it creates a symbolic link for the folder where OpenFOAM expects to find the latest CMake version installed.

Start a new terminal and it should be fully operational!

Best regards,
Bruno

lost.identity January 31, 2015 11:41

Hi Bruno,

When I created a symbolic link CGAL worked. However, I still had the same issue with the main OpenFOAM compilation.

So I did a Allclean and then tried to install everything again. However, now even though I followed the same steps I get the same

Code:

CMake Error: Error in cmake code at
/home/flacs/OpenFOAM/ThirdParty-2.3.1/CGAL-4.3/cmake/modules/CGAL_Macros.cmake:213:
Parse error.  Function missing ending ")".  Instead found left paren with text "(".
CMake Error at CMakeLists.txt:340 (include):
  include could not find load file:

    /home/flacs/OpenFOAM/ThirdParty-2.3.1/CGAL-4.3/cmake/modules/CGAL_Macros.cmake


CMake Error at CMakeLists.txt:341 (cgal_setup_module_path):
  Unknown CMake command "cgal_setup_module_path".


-- Configuring incomplete, errors occurred!
+ exit 1

Even though the symbolic link is there. I tried it on another system (with identical setup) and it still doesn't work :(

EDIT: I had to run makeCmake in ThirdParty directory to get it to work. I don't understand it.

Anyways I'm able to run makeCGAL and Allwmake in ThirdParty directory without any issues. The issue with CGAL/Delaunay_triangulation_3.h still remains.

wyldckat January 31, 2015 12:16

Remember when I wrote in the other post that I had based my commands on this wiki page: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10

Well... on that page there are a lot of instructions that might come in handy for your installation! ;)

If my diagnosis is correct, the clean up you've done removed the symbolic link, which is why CMake stopped behaving properly. In addition, when you ran makeCmake, you either didn't start a new terminal or did not run this command:
Code:

wmSET $FOAM_SETTINGS
see step #10 to see what I mean ;)


If this fails, then honestly, my suggestion is that you start a new OpenFOAM installation (you can simply rename the current folders, just in case you prefer to go back to where you once were) and then you can roughly follow those instructions that are meant for CentOS 5.10 on your system, because SLES 11 should be about as old as CentOS 5 ;)
I say this, because those steps have been carefully tailored and tested (by me) to have all of the necessary steps to have a fully working build of OpenFOAM, along with ParaView.

Nonetheless, if you do not want to start over, then try to study a bit more those instructions, to see if you can spot what you might be missing so far...

lost.identity January 31, 2015 13:25

Many thanks Bruno.

I downloaded the source code again and started from scratch and now it works. I had to basically download mpfr, mpc, gmp, gcc, Qt, cmake as my machine didn't have the correct versions. Then compiled them in the ThirdParty directory.

I also had to make sure that the make files had the correct version numbers (had to modify etc/config/settings.sh in the OpenFOAM directory).

rahulksoni December 15, 2016 07:41

no targets specified
 
Quote:

Originally Posted by wyldckat (Post 529789)
Hi lost.identity,

Just in case, please check which version of make you're using:
Code:

make --version
As for a possible fix, the following steps are based on these: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10
  1. The "Boost" library/toolbox in your system also seems to be considerably old. Therefore, let's get a more recent one:
    Code:

    foam
    sed -i -e 's=boost-system=boost_1_54_0=' etc/config/CGAL.sh

    cd $WM_THIRD_PARTY_DIR
    alias wget="wget --no-check-certificate"
    wget "https://raw.github.com/wyldckat/scripts4OpenFOAM3rdParty/master/getBoost"
    chmod +x getBoost

    ./getBoost
    sed -i -e 's=boost-system=boost_1_54_0=' makeCGAL

  2. Now try building only CGAL:
    Code:

    ./makeCGAL > mkcgal.log 2>&1
  3. Check the contents of the file "mkcgal.log" and check if there exists an error message at the end and if it's as cryptic at the one you've gotten so far or not:
    Code:

    == Generating build files (DONE) ==

    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/flacs/OpenFOAM/ThirdParty-2.3.1/CGAL-4.3
    + make -j 8
    make: *** No targets specified and no makefile found.  Stop.
    + exit 1


Best regards,
Bruno

Hi Bruno

I am getting similar error
Code:

+ make -j 8
make: *** No targets specified and no makefile found.  Stop.
+ exit 1

What is causing that error?

rahulksoni December 15, 2016 08:10

Got it
 
Quote:

Originally Posted by rahulksoni (Post 629839)
Hi Bruno

I am getting similar error
Code:

+ make -j 8
make: *** No targets specified and no makefile found.  Stop.
+ exit 1

What is causing that error?

Got it surprisingly if I go to ThirdParty-2.3.0/CGAL-4.3 and then execute make and make install then it works.
I also tried it by forcing to go to CGAL directory and then run make and make install in makeCGAL file. It works
Code:

$CGAL_SOURCE_DIR \
&& cd $CGAL_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS \
&& make install || exit 1 \
&& cd ..

Its peculiar why it is not entering the source directory and executing the commands!!!


All times are GMT -4. The time now is 23:31.