Skip to content

CentOS 6.7 Build with Newer GCC Version #959

@frenchwr

Description

@frenchwr

I am trying to build FEniCS by following the instructions at this page: http://fenicsproject.org/download/installation_using_hashdist.html

I am on a CentOS 6.7 system - the system compiler is GCC 4.4.7.

When I attempt a standard build with curl -s http://fenicsproject.org/fenics-install.sh | bash (as suggested here: http://fenicsproject.org/download/#automatic-installation-from-source-all-platforms-and-versions-toolsimage-hspace) the build makes it all the way to dolfin and then it bombs out because GCC 4.4.7 does not offer C++11 support.

I then tried a newer version of GCC (4.6.1) and the build failed at CMAKE. The problem with CMAKE is that at the linking stage I cannot add -L/path/to/libstdc++.so.6 so instead the linker points at the system (4.4.7) version of the library and fails with a /usr/lib64/libstdc++.so.6: version GLIBCXX_3.4.15' not found` error.

I've tried passing in LDFLAGS (or LINKFLAGS) in the parameters section of my fenics.yaml file but the FEniCS build system appears to clobber my LDFLAGS so my paths to the correct library do not get passed on to the linker. Here is the relevant section of my fenics.yaml file:

extends:
- file: linux.yaml

parameters:
  PROLOGUE: export CC=/usr/local/gcc/4.6.1/bin/gcc; export CXX=/usr/local/gcc/4.6.1/bin/g++; export CPP=/usr/local/gcc/4.6.1/bin/cpp; export LDFLAGS="-L/usr/local/gcc/4.6.1/lib64 -L/usr/local/gcc/4.6.1/lib";

Any tips on how to get this to build? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions