unable to run yade after compiling process

Asked by azim

Dear all,

I am a new user of ubuntu and Yade(ubuntu 14.04). I tried to compile yade from the source code according to the structure[1](after working about 3 month with packages). The first error I got, was as [2]. I did not know what to do, so I ignored that and continued the compiling process. After ending the compiling process(Very time consuming) I tried to run yade (by typing ‘’yade’’ in terminal) and this is what I faced[3].

[1] this procedure is the same as https://yade-dem.org/doc/installation.html
the reason for repetition is that I want to know my mistakes:

I installed the git package on my system:

git clone <email address hidden>:yade/trunk.git …….> /home/azim/trunk as usual

and added yade external ppa:

sudo add-apt-repository ppa:yade-users/external
sudo apt-get update

executed these commands:

sudo apt-get install cmake git freeglut3-dev libloki-dev \
libboost-all-dev fakeroot dpkg-dev build-essential g++ \
python-dev ipython python-matplotlib libsqlite3-dev python-numpy python-tk gnuplot \
libgts-dev python-pygraphviz libvtk6-dev python-numpy libeigen3-dev \
python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit gtk2-engines-pixbuf python-argparse \
libqglviewer-dev python-imaging libjs-jquery python-sphinx python-git python-bibtex \
libxmu-dev libxi-dev libcgal-dev help2man libbz2-dev zlib1g-dev python-minieigen

installed mandatory package:

sudo apt-get install python-gts
sudo apt-get install libopenblas-dev libsuitesparse-metis-dev

I made the directory named ‘built’ as follow: /home/azim/trunk/built
then I called cmake to cofigure the simulation like this:

cmake -DCMAKE_INSTALL_PREFIX=/home/azim/trunk/built /home/azim/trunk
cmake -DCMAKE_INSTALL_PREFIX=/home/azim/trunk/built /home/azim/trunk

And finally:

make
make install

cd /home/azim/built//bins
./yade-2017-10-26.git-c434d0a

[2]

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libsuitesparse-metis-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libsuitesparse-dev:i386 libsuitesparse-dev

E: Package 'libsuitesparse-metis-dev' has no installation candidate

[3] The program 'yade' is currently not installed. You can install it by typing:
sudo apt install yade

 My questions:

1) Is there any problem in my compiling process[1]?
2) what does this error mean and what should I do[2]?
3) I used to open yade by typing ‘’yade’’ or ‘’yade simulation.py’’ in terminal . Did I do wrong?? if yes! What is the substitution of typing ‘’yade’’ and ‘’yade simulation.py’’?

Thanks a lot for your help in advance.
Azim

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello Azim,

just some comments, see the end of this message for final solution:

> I am a new user of ubuntu and Yade(ubuntu 14.04)

I recommend to use a newer version, e.g. 16.04 LTS, but it should not be critical..

> The first error I got, was as [2]. I did not know what to do, so I ignored that and continued the compiling process.

ignoring errors is usually not very good idea..

> installed mandatory package:
> sudo apt-get install python-gts
> sudo apt-get install libopenblas-dev libsuitesparse-metis-dev

libopenblas-dev libsuitesparse-metis-dev are NOT mandatory

> 1) Is there any problem in my compiling process[1]?

not really but in general ignoring errors is usually not very good idea..

> 2) what does this error mean and what should I do[2]?

this error means what it says, but as the package it is not mandatory, you can ignore it

> 3) I used to open yade by typing ‘’yade’’ or ‘’yade simulation.py’’ in terminal . Did I do wrong?? if yes! What is the substitution of typing ‘’yade’’ and ‘’yade simulation.py’’?

yade executables are now installed in /home/azim/built/bin, with name yade-2017-10-26.git-c434d0a, so you need:

1) put /home/azim/built/bin in your PATH variable (let us know if you are new to it)
2) instead of 'yade' use 'yade-2017-10-26.git-c434d0a'

cheers
Jan

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Hi,

Just to give some additional details regarding your error [3], the "yade" command by default corresponds to a call to the "package-installed" version of Yade (https://yade-dem.org/doc/installation.html#packages).

This would be kind of the opposite using a "from source code compilation" installed version of Yade, which is what you try to get, here.

Revision history for this message
azim (mirzavand) said :
#3

Hi Jan,

>1) put /home/azim/built/bin in your PATH variable (let us know if you are new to it)

I don't know how to put a directory in my PATH variable(I'm new to it), would you tell me about that?

>2) instead of 'yade' use 'yade-2017-10-26.git-c434d0a'
i typed ''yade-2017-10-26.git-c434d0a'' in terminal but this is what i see:

yade-2017-10-26.git-c434d0a: command not found

Revision history for this message
azim (mirzavand) said :
#4

Hi Jerome,

thank you for the clarification.

this is what i got , for running a scrip named 'simulation.py',(after going to it's directoty) I should type :
"yade-2017-10-26.git-c434d0a simulation.py".
Am I right?

Revision history for this message
Best Jan Stránský (honzik) said :
#5

Hi Azim,

the easiest way is to put the location into .bashrc file. Open .bashrc file, e.g. from terminal

gedit $HOME/.bashrc

and put the following line to the end of the file.

export PATH=/home/azim/trunk/built/bin:$PATH

After starting a new terminal, yade-2017-10-26.git-c434d0a should work fine.

/home/azim/trunk/built/bin is defined as CMAKE_INSTALL_PREFIX/bin

cheers
Jan

Revision history for this message
azim (mirzavand) said :
#6

Thanks Jan Stránský, that solved my question.