UFC_INCLUDE_DIRS is always /usr/include

Issue #41 resolved
Chaffra Affouda created an issue

It looks like UFC_INCLUDE_DIRS is always /usr/include which is only true if you do

sudo python setup.py install --prefix=/usr

if you do "sudo python setup.py install" all the files are under /usr/local.

This breaks swig in dolfin.

Comments (9)

  1. Martin Sandve Alnæs

    I never install in /usr and I don't have this problem. You need to provide more information. Maybe you're setting UFC_INCLUDE_DIRS in some .bash_rc or similar profile file?

  2. Chaffra Affouda reporter

    No I am not setting UFC_INCLUDE_DIRS elsewhere. If I do

    sudo python setup.py install --prefix=/usr/local I get the right INSTALL_PREFIX variable. If I do

    sudo python setup.py install, then INSTALL_PREFIX=/usr/include by default which is wrong. The pb is with the function get_installation_prefix in setup.py.

  3. Jack Hale

    Can confirm this issue, the default --prefix on Ubuntu is /usr/local but the CMake files get propagated with /usr if the --prefix command is left unset.

    I am using a completely 'clean' Ubuntu system as we are developing Docker images, so I know it is not a problem with my setup.

    As Chaffra says a simple fix is to specify the --prefix, but I think the default behaviour should work.

  4. Prof Garth Wells

    Related: UFC_INCLUDE_DIRS in UFCConfig.cmake does not handle relative paths, e.g. python setup.py install --prefix=../../ properly.

  5. Prof Garth Wells

    Problem is that sys.prefix returns the Python prefix, not the default install prefix, which should be /usr/local on most systems.

  6. Log in to comment