Closed paspro closed 1 year ago
Hello,
Did you start from a clean/empty build directory ?
The cs_package.py and cs_config.py file have changed : they is now no longer generated from templates, but fixed, and read the configuration in a code_saturne_build.cfg file. Du to the workings of the build system, it seems it is required to do a clean rebuild when updating.
I did start with a clean build directory. I managed to avoid this problem by modifying the top part of file bin/cs_package.py as
import cs_config
#try:
# from code_saturne import cs_config
#except Exception:
# import cs_config
This makes the script to work properly.
I found out that when installing code_saturne to a specific directory after the compilation is completed, the Python scripts are installed in my local Python site-packages directory and not inside the directory where code_saturne is installed. As a result, when building more than one versions of code_saturne the Python site-packages/code_saturne directory is overwritten breaking the previous versions.
In order to avoid this issue I have to use the --with-python_prefix option to set the correct directory e.g.
"--prefix=/home/panos/Applications/Code_Saturne/code_saturne-7",
"--with-python_prefix=/home/panos/Applications/Code_Saturne/code_saturne-7"
This is an issue for both CS 7 and the master. With this additional option there is no need to modify the cs_package.py file. I think that the Python prefix should by default be set to be the same as the installation prefix.
The modification to cs_package.py is risky, as it may improve things for the build stage (though I don't understand why, as it simply calls the "Except" clause in all caes, but once code_saturne is installed, the Python path should relate to "site-packages", and so require the from code_saturne import cs_config
version.
What system are you running on ? I might try to reproduce this on a VM if I have a similar setup available.
As to your second issue, is it related to an autoconf or automake update on your system ? I have had the same issue with automake 1.16.4 (https://lists.gnu.org/archive/html/automake/2021-08/msg00006.html), and this even affects older versions of the code. This is an external issue, and the only thing I can do is update the installation documentation.
I guess we can close this for now, and reopen if the issue resurfaces.
When trying to compile master I get the following error:
The currently released version does not produce such an error. Any clues?