xcfem / xc

finite element analysis package for civil engineering structures.
http://www.xcengineering.xyz/html_files/software.html
GNU General Public License v3.0
268 stars 54 forks source link

compile XC on debian stretch #30

Closed berndhahnebach closed 6 years ago

berndhahnebach commented 6 years ago

gave it a try on debian stretch on comit 0597827

Here is what I did: https://gist.github.com/berndhahnebach/7d39889916cb36ea7e6ed6c0d758f9f6

On cmake I run into some trouble ...


$ cd /home/vagrant/Documents/build_xc/build  &&  sudo rm -rf *  &&  sudo cmake ../xc/src
CMake Warning (dev) at CMakeLists.txt:76:
  Syntax Warning in cmake code at column 35

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake version is greater than 2.8.4
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:19 (INCLUDE):
  include could not find load file:

    /root/.xc_build/basica_dirs.cmake

-- basica project dir: /..
-- basica include dir: 
-- basica lib dir: 
CMake Error at CMakeLists.txt:31 (INCLUDE):
  include could not find load file:

    /root/.xc_build/lcmd_dirs.cmake

-- lcmd project dir: /..
-- lcmd include dir: 
-- lcmd lib dir: 
-- xc project dir: /home/vagrant/Documents/build_xc/xc/
-- xc include dir: /home/vagrant/Documents/build_xc/xc/src/
-- xc lib dir: /home/vagrant/Documents/build_xc/xc/lib
-- The Fortran compiler identification is GNU 6.3.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so  
CMake Error at /home/vagrant/Documents/build_xc/xc/CMake/find_packages.cmake:6 (find_package):
  By not providing "FindGNUGTS.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "GNUGTS", but
  CMake did not find one.

  Could not find a package configuration file provided by "GNUGTS" with any
  of the following names:

    GNUGTSConfig.cmake
    gnugts-config.cmake

  Add the installation prefix of "GNUGTS" to CMAKE_PREFIX_PATH or set
  "GNUGTS_DIR" to a directory containing one of the above files.  If "GNUGTS"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:75 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/home/vagrant/Documents/build_xc/build/CMakeFiles/CMakeOutput.log".
vagrant@stretch:~/Documents/build_xc/build$ 
berndhahnebach commented 6 years ago

this might be interesting for you already:

other packages than https://github.com/lcpt/xc/blob/master/doc/install_deb_packages.sh#L17

berndhahnebach commented 6 years ago

BTW: I'm not dedicated to Debian ATM. For some first tests of XC I could use ubuntu too. Since it is in a VM created by vagrant it does not matter anyway. Which ubuntu do you compile and run XC on?

Afterwards if XC runs on ubuntu it will be a simple to get it to work on debian too, hopefully

bernd

lcpt commented 6 years ago

this might be interesting for you already:

other packages than https://github.com/lcpt/xc/blob/master/doc/install_deb_packages.sh#L17

* libsuperlu-dev instead libsuperlu3-dev

* libx11-dev instead libX11-dev

* python-vtk6 instead python-vtk

* python-pip is missing at all

Thank you!

I've fixed that line and pushed changes to GitHub. Luis

Luis.

lcpt commented 6 years ago

About the problem when running cmake, I think you have not installed xc_basic and xc_utils (yeah the installation process is a bit too complex I'll try to simplify it).

I've modified the text on "install.txt" to highlight that:

=====================================================

     * Libraries you must to download from GitHub and install yourself:
         -xc_basic: basic routines (download it from https://github.com/lcpt/xc_basic).
         -xc_util: utilities (download it from https://github.com/lcpt/xc_utils).

=====================================================

If it is not the case, let me know. Luis.

lcpt commented 6 years ago

BTW: I'm not dedicated to Debian ATM. For some first tests of XC I could use ubuntu too. Since it is in a VM created by vagrant it does not matter anyway. Which ubuntu do you compile and run XC on?

Afterwards if XC runs on ubuntu it will be a simple to get it to work on debian too, hopefully

bernd

It's Ubuntu 18.04

berndhahnebach commented 6 years ago

About the problem when running cmake, I think you have not installed xc_basic and xc_utils

Ahh, I totally missed that ... Thanks for all the informations. I will continue my afford in compiling XC this evenning and report back.

bernd

berndhahnebach commented 6 years ago

got it compiled. Had linker errors. Took me quit some time to find my vagrant box just had no disc space left :-) Another missing package libmetis-dev and some changes in xc_utils and xc (https://github.com/berndhahnebach?tab=repositories). I will go for a PR later this week. Need to sort out everything. BTW: is there some unit test or some other simple example to really be sure it is installed and to get started ... Bernd

Ahh https://gist.github.com/berndhahnebach/7d39889916cb36ea7e6ed6c0d758f9f6

lcpt commented 6 years ago

Great!

You can find the verification tests for xc_utils in xc_utils/verif and those for xc in xc/verif. In both cases there is a readme file that explains what to do (it's quite simple anyway).

berndhahnebach commented 6 years ago

problems ... import xc_base does not work ... But on make install of xc_base I got no error. Where should the module be installed ? Somewhere in /usr/local ?

bernd

`` $ python Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import xc_base Traceback (most recent call last): File "", line 1, in ImportError: No module named xc_base

berndhahnebach commented 6 years ago

`` from actions.snow import snowSIA

does not import either

berndhahnebach commented 6 years ago

upps, I missed the installation of the Python modules ... my fault

lcpt commented 6 years ago

problems ... import xc_base does not work ... But on make install of xc_base I got no error. Where should the module be installed ? Somewhere in /usr/local ?

bernd

`` $ python Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import xc_base Traceback (most recent call last): File "", line 1, in ImportError: No module named xc_base

Verify that in the '/usr/local/lib' there is a file named 'libxc_utils.so'.

Have you installed the python modules?:

cd /usr/local/src/prgs/xc_utils/python_modules sh local_install.sh

lcpt commented 6 years ago

upps, I missed the installation of the Python modules ...

Ok. If it doesn't work let me know.

berndhahnebach commented 6 years ago

:-) xc_utils and xc tests run fine. I need to update my script in this regard.

How to get started?

bernd

berndhahnebach commented 6 years ago

Just run all Debian installing packages and cloning and compiling XC on a clean debian stretch. The verification tests run too. The repos from lcpt github account without any patches where used :-)

See https://gist.github.com/berndhahnebach/7d39889916cb36ea7e6ed6c0d758f9f6