Hecke,
> I am (again) struggling to get deal.ii to compile on our cluster.
> This time, my goal is a very basic variant of deal.ii without any external
> libraries but a non-standard gcc.
> The cluster runs on SLES 11 SP1 thus has gcc-4.3.4 and I want to use a custom
> installation of gcc-4.7.2 because of C++11 features.
>
> Unfortunately, the alternate directory for the corresponding libraries does
> not seem to reach the expand_instantiation script:
>
> |
> Scanningdependencies of target obj_opencascade.inst
> [21%]Generatingboundary_lib.inst
> ../../common/scripts/expand_instantiations:/usr/lib64/libstdc++.so.6:version
> `GLIBCXX_3.4.15' not found (required by
> ../../common/scripts/expand_instantiations)
> make[2]: *** [source/opencascade/boundary_lib.inst] Error 1
> make[1]: *** [source/opencascade/CMakeFiles/obj_opencascade.inst.dir/all] Error 2
> |
>
> My cmake command is
>
> |
> cmake
> -DCMAKE_INSTALL_PREFIX=/usr/nld/deal.II-8.2.1.freya-gcc-4.7.2-DDEAL_II_WITH_MPI=OFF
> -DDEAL_II_WITH_PETSC=OFF
> -DCMAKE_CXX_COMPILER=/usr/nld/gcc-4.7.2/bin/g++-DLAPACK_DIR=/usr/nld/atlas-3.8.3_LAPACK.skadi/-DBLAS_DIR=/usr/nld/atlas-3.8.3_LAPACK.skadi/-DBLA_VENDOR=ATLAS
> ..
> |
What is happening is that you tell cmake to use a specific compiler. This
allows you to compile the expend_instantiations.cc file and link it (because
the compiler knows where to find its compiler support libraries such as
libstdc++), but when you try to execute the program, this yields the error
message you see: the dynamic loader tries to execute your program, but because
it's part of the operating system, it no longer knows where the compiler
support libraries for 4.7.2 are located (it only knows that it's supposed to
load libstd++.so with version number 3.4.15), and fails.
To make work what you're trying to do, you need to not only select which
compiler to use, but also where to find these libraries. You do this by
setting the LD_LIBRARY_PATH environment variable. In your case, I would
suggest you put something like this into your .bashrc:
export PATH=/usr/nld/gcc-4.7.2/bin/:$PATH
export LD_LIBRARY_PATH=/usr/nld/gcc-4.7.2/lib/:$LD_LIBRARY_PATH
This requires you to *always* use this compiler, but that's likely what you
want anyway.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@math.tamu.edu
www:
http://www.math.tamu.edu/~bangerth/