cannot compile with source code

Asked by Daizong Meng

Hi,

I tried to compile the yade with the trunk downloaded from

https://gitlab.com/yade-dev/trunk

I followed the Prerequisites in yade website but when I run cmaker

cmake -DCMAKE_INSTALL_PREFIX=/mnt/d/My_yade /mnt/d/trunk/trunk-master -DENABLE_MPI=1

the mistake showed as following:

-- Version is set to Unknown
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0
-- GCC Version >= 4.8. Adding -save-temps
-- Log filtering: enabled
-- Enabling boost::log library and DEBUG=OFF. Logging will work nicely, backtraces will not have debug info, files will be small.
-- Architecture: amd64
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY)
-- Found freeglut: /usr/include/GL
-- md5sum of freegult /usr/include/GL/freeglut_std.h is: 791a2febd8584ec530cdd7676191b6d5
-- freegult version is 2.8.1
Loop on the following python versions and check available dependencies:3.10;3.9;3.8;3.7;3.6;3.5;3.4;3.3;3.2;3.1;3.0;2.7;2.6
Trying python version: 3.10 parsed as 3 10
Trying python version: 3.9 parsed as 3 9
Trying python version: 3.8 parsed as 3 8
Trying python version: 3.7 parsed as 3 7
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9")
Trying python version: 3.6 parsed as 3 6
Python version 3.6.9 found, try to import dependencies...
Failed to import dependencies for Python version 3.6.9. NOT FOUND:PythonLibs
-- Found PythonInterp: /usr/bin/python (found version "2.7.17")
Trying python version: 3.5 parsed as 3 5
Trying python version: 3.4 parsed as 3 4
Trying python version: 3.3 parsed as 3 3
Trying python version: 3.2 parsed as 3 2
Trying python version: 3.1 parsed as 3 1
Trying python version: 3.0 parsed as 3 0
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.17")
Trying python version: 2.7 parsed as 2 7
Python version 2.7.17 found, try to import dependencies...
Failed to import dependencies for Python version 2.7.17. NOT FOUND:PythonLibs
-- Found PythonInterp: /usr/bin/python (found version "2.7.17")
Trying python version: 2.6 parsed as 2 6
CMake Error at CMakeLists.txt:358 (MESSAGE):
  No python version with all dependencies was found.

-- Configuring incomplete, errors occurred!

Please help me! The reason for source code compilation is that I want to run yade-openfoam coupling.

Question information

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

Hello,

please read [1] and provide relevant information (e.g. OS version).

> The reason for source code compilation is that I want to run yade-openfoam coupling.

For my system (Ubuntu 22.04), I have packaged 'yade' and 'yadedaily' and both are compiled with MPI.
(I have "mpi" line in printAllVersions() and I successfully run examples/mpi/helloMPY.py example)

I.e., no need to compile from source because of this reason.

If you insist on from source compilation, have a look at cmake log file.
It seems like some problem with python.

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Daizong Meng (mdz950103) said :
#2

Thanks for the reply.

The Ubuntu system is 18.04.5 LTS

The yade is latest version form gitlab and I also tried the 2020.01a. but meet the similar question.

I do not want to compile by myself but the yade-openfoam coupling need that. As showed in

trunk
examples
openfoam
example_icoFoamYade
scriptYade.py

Its fist step is the compilation.

If I do not need to follow the guidance in that file, what should I do?

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

> The Ubuntu system is 18.04.5 LTS

I recommend a newer version (22.04 LTS) if it is not a problem.
Even if the version is LTS, it is already 4.5 years old..

With Ubuntu 22.04, I would also **guess** that you would have less problems with compiling current version from source, in case you want / need it.

> I do not want to compile by myself

then do not compile by yourself :-)

> but the yade-openfoam coupling need that. As showed in ...
> If I do not need to follow the guidance in that file, what should I do?

no, it just says that it "requires MPI installation".
For reference and if needed, build commands are included, but it does not strictly require from source compilation.

As discussed above, MPI is included in "yade" and "yadedaily" system packages in Ubuntu 22.04.
I.e. you can just use the system package and you do not need to compile from source (if only MPI would be the reason for source compilation)

Cheers
Jan

Revision history for this message
Best Janek Kozicki (cosurgi) said :
#4

Actually openfoam is not confirmed to work on newer ubuntu. In the gitlab CI pipeline we have openfoam test running only on ubuntu 18.04.6:

https://gitlab.com/yade-dev/trunk/-/jobs/3248498138

The following lines are executed in this test:

https://gitlab.com/yade-dev/trunk/-/blob/master/.gitlab-ci.yml#L693

For start you could try installing on your ubuntu 18 all the packages which are listed here: https://gitlab.com/yade-dev/docker-yade/-/blob/ubuntu18.04_foam/Dockerfile this is how the docker image with ubuntu 18 was prepared to run these tests.

I have never used openfoam though, so someone who uses it could probably help more.

Revision history for this message
Daizong Meng (mdz950103) said :
#5

Thanks a lot.

I still cannot compile in ubuntu 18.04.5 but I compiled on 20.04.

As you can see, I used the wsl2 for ubuntu so can I compile yade by 20.04 and run it by 18.04, because the installed place is on my /mnt/d?

Any response would be highly appreciated.

sincerely

Daizong

Revision history for this message
Daizong Meng (mdz950103) said :
#6

Thanks Janek Kozicki, that solved my question.