On Wed, Mar 26, 2014 at 5:27 PM, Johannes Ring <[email protected]> wrote:

> On Wed, Mar 26, 2014 at 5:20 PM, Bishesh Khanal <[email protected]>
> wrote:
> >
> >
> >
> > On Wed, Mar 26, 2014 at 3:29 PM, Johannes Ring <[email protected]>
> wrote:
> >>
> >> On Wed, Mar 26, 2014 at 3:00 PM, Bishesh Khanal <[email protected]>
> >> wrote:
> >> > On Mon, Mar 24, 2014 at 11:23 AM, Johannes Ring <[email protected]>
> >> > wrote:
> >> >> Did you get this to work? If not, you could try to configure DOLFIN
> >> >> with -DBoost_USE_MULTITHREADED:BOOL=OFF.
> >> >
> >> > I tried this too, but it still gives exactly the same error as before;
> >> > ldd
> >> > on libdolfin.so still returns the same content. I'm surprised that
> >> > fenics
> >> > seems to be very difficult to install!
> >> > If it helps, here is the output when I do configure with make, before
> >> > doing
> >> > the make install:
> >> >
> >> > cmake
> >> >
> >> >
> -DCMAKE_INSTALL_PREFIX=/home/bkhanal/Documents/softwares/fenicsComponents/installDirectory/
> >> > -DBoost_USE_MULTITHREADED:BOOL=OFF ..
> >>
> >> The problem is that you have multiple installations of Boost and CMake
> >> is not clever enough to pick the correct Boost libraries without some
> >> help.
> >>
> >> Try to export the following environment variables before running cmake
> >> (modify them to match your setup):
> >>
> >>   export BOOST_DIR=/path/to/boost-installation
> >>   export BOOST_INCLUDEDIR=${BOOST_DIR}/include
> >>   export BOOST_LIBRARYDIR=${BOOST_DIR}/lib
> >>   export BOOST_ROOT=${BOOST_DIR}
> >>
> >> Also remove the CMakeCache.txt file in the build directory before
> running
> >> cmake.
> >
> >
> > I have the following in my .bashrc:
> >
> > export
> >
> C_INCLUDE_PATH=/home/bkhanal/Documents/softwares/boost_1_55_0/build/include:$C_INCLUDE_PATH
> > export
> >
> CPLUS_INCLUDE_PATH=/home/bkhanal/Documents/softwares/boost_1_55_0/build/include:$CPLUS_INCLUDE_PATH
> > export
> >
> LIBRARY_PATH=/home/bkhanal/Documents/softwares/boost_1_55_0/build/lib:$LIBRARY_PATH
> > export
> >
> LD_LIBRARY_PATH=/home/bkhanal/Documents/softwares/boost_1_55_0/build/lib:$LD_LIBRARY_PATH
> >
> > export BOOST_DIR=/home/bkhanal/Documents/softwares/boost_1_55_0/build
> > export BOOST_INCLUDE_DIR=${BOOST_DIR}/include
> > export BOOST_LIBRARY_DIR=${BOOST_DIR}/lib
> > export BOOST_ROOT=${BOOST_DIR}
> >
> > I deleted the CMakeCache.txt (in fact the whole directory) and reran the
> > CMake. It still gives me the same error with the same content on
> libdolfin.
> > I export the env. variables by putting them in the .bashrc . Should I do
> sth
> > else here ?
>
> That should be fine, but you must source ~/.bashrc or start a new
> terminal to set the variables.
>
> > But then, when running CMake it seems to take up the right path for the
> > boost (this I check by running ccmake and I looking at the boost related
> > variables). But then afterwards when doing make, I do not understand why
> it
> > is not taking up the path the CMake has stored in the related variables.
>
> When you run make, does cmake run again?
>

I'm not sure I understand. Ok here is what I do in detail: I created a new
directory build and ran all of the following commands under it.

------------Configuration under ccmake----------------------
$ccmake
-DCMAKE_INSTALL_PREFIX=/home/bkhanal/Documents/softwares/fenicsComponents/installDirectory/
-DBoost_USE_MULTITHREADED:BOOL=OFF ..

Here I had to change the variables related to the following: (to provide
proper paths):
petsc, vtk, eigen, CGAL. (For boost, it takes up the proper path from
.bashrc, so I don't need to do anything)
I also needed to disable DOLFIN_ENABLE_UNIT_TESTS otherwise, I would get
this error:

CMake Error at CMakeLists.txt:495 (if):
   if given arguments:

     "LESS" "1.13.1"

   Unknown arguments specified

The content of the CMakeLists.txt, including the Line 495 in bold text:

# Check for cppunit
if (DOLFIN_ENABLE_UNIT_TESTS)
  find_package(CppUnit)

  # Older version of CPPUNIT use std::auto_ptr, which is deprecated
*  if (${CPPUNIT_VERSION} LESS 1.13.1)*
    include(CheckCXXCompilerFlag)
    CHECK_CXX_COMPILER_FLAG(-Wno-deprecated HAVE_NO_DEPRECATED)
    if (HAVE_NO_DEPRECATED)
      set(CMAKE_CXX_FLAGS_DEVELOPER "${CMAKE_CXX_FLAGS_DEVELOPER}
-Wno-deprecated")
    endif()
  endif()

endif()

So, I set DOLFIN_ENABLE_UNIT_TESTS to off, then configured.

---------------Generation under ccmake-----------------
I just pressed 'g' to generate under ccmake.
------------------ make install-----------------------
I exited from the ccmake, then used:
$make install
I guess it should take the configuration that was in cmake instead of
reconfiguring again from the scratch. If it was, I believe it would have
complained about the missing paths for e.g. for petsc, cgal etc.
Here is the output in the beginning during make install:

$make install -j4
Scanning dependencies of target copy_swig_files
Scanning dependencies of target dolfin
[  0%] Built target copy_swig_files
[  1%] [  1%] [  1%] Building CXX object
dolfin/CMakeFiles/dolfin.dir/function/SpecialFunctions.cpp.o
[  1%] Building CXX object
dolfin/CMakeFiles/dolfin.dir/function/FunctionAssigner.cpp.o
Building CXX object
dolfin/CMakeFiles/dolfin.dir/function/SpecialFacetFunction.cpp.o
Building CXX object
dolfin/CMakeFiles/dolfin.dir/function/FunctionSpace.cpp.o
[  2%] Building CXX object
dolfin/CMakeFiles/dolfin.dir/function/SubSpace.cpp.o
In file included from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/mesh/Mesh.h:40:0,
                 from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/mesh/Cell.h:33,
                 from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/function/FunctionSpace.h:38,
                 from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/function/SubSpace.h:25,
                 from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/function/SubSpace.cpp:24:
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/common/MPI.h:43:0:
warning: "MPI_COMM_WORLD" redefined [enabled by default]
/home/bkhanal/Documents/softwares/petsc-3.4.3/arch-linux2-cxx-debug/include/mpi.h:266:0:
note: this is the location of the previous definition
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/common/MPI.h:44:0:
warning: "MPI_COMM_SELF" redefined [enabled by default]
/home/bkhanal/Documents/softwares/petsc-3.4.3/arch-linux2-cxx-debug/include/mpi.h:267:0:
note: this is the location of the previous definition
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/common/MPI.h:45:0:
warning: "MPI_COMM_NULL" redefined [enabled by default]
/home/bkhanal/Documents/softwares/petsc-3.4.3/arch-linux2-cxx-debug/include/mpi.h:81:0:
note: this is the location of the previous definition
[  2%] Building CXX object
dolfin/CMakeFiles/dolfin.dir/function/Function.cpp.o
In file included from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-project-dolfin-ed58f6bd083b/dolfin/common/utils.h:33:0,
                 from
/user/bkhanal/home/Documents/softwares/fenicsComponents/fenics-pr


And it goes on ...
But I still get the same error.



> Johannes
>
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to