Personal tools
You are here: Home Forum Extension of the platform Error using YACSGEN on Windows 10 with Salome-9.7.0

Error using YACSGEN on Windows 10 with Salome-9.7.0

Up to Extension of the platform

Error using YACSGEN on Windows 10 with Salome-9.7.0

Posted by Brigity Volund at August 14. 2021

Bottom line up front: Salome environment is set such that CONFIGURATION_ROOT_DIR = C:\SALOME-9.7.0\W64\CONFIGURATION

However there is no "CONFIGURATION" folder inside "W64" in the SALOME-9.7.0 install. When using YACSGEN, CMakeLists.txt requires CONFIGRATION_ROOT_DIR to be defined. Please advise. More details are as follows. 

When executing the following script in mymodule.py on windows 10 with Salome-9.7.0 installed, 

"

from module_generator import Generator,Module,PYComponent

from module_generator import CPPComponent,Service

from module_generator import Library

 

context={'update':1,

         "prerequisites":"C:/SALOME-9.7.0/run_salome_shell.bat",

"kernel":"C:/SALOME-9.7.0/W64/KERNEL"  

         }

 

c1=CPPComponent("mycompo",

                services=[

                          Service("myservice",

                                  inport=[("inputport","double"),],

                                  outport=[("outputport","double")],

                                  defs="#include <iostream>",

                                  body="ouputport=2*inputport;",

                                  ),

                         ]

               ;)

m=Module("mymodule",components=[c1],prefix="./myInstall")

g=Generator(m,context)

g.generate()

g.configure()

g.make()

g.install()

g.make_appli("myappli",restrict=["KERNEL","GUI","YACS"])

"

The following error is obtained:

"

The filename, directory name, or volume label syntax is incorrect.

Traceback (most recent call last):

  File "mymodule.py", line 24, in <module>

    g.configure()

  File "c:\SALOME-9.7.0\W64\YACSGEN\lib\python3.6\site-packages\module_generator\gener.py", line 845, in configure

    raise Invalid("configure has ended in error")

module_generator.gener.Invalid: configure has ended in error

"

The code around line 845 of gener.py is, 

"

    build_sh = "cd %s; cmake ../%s -DCMAKE_INSTALL_PREFIX:PATH=%s"%(self.build_dir, self.sourceDir(), prefix) 

    ier = os.system(build_sh)

    if ier != 0:

      raise Invalid("configure has ended in error")

"
 
When use cmd prompt manually to execute cd %s; cmake ../%s -DCMAKE_INSTALL_PREFIX:PATH=%s"%(self.build_dir, self.sourceDir(), prefix)  to see what error cmake identifies, I get the following error:
 
"
CMake Error at CMakeLists.txt:28 (MESSAGE): <--- this is the CMakeLists.txt file inside mymodule_SRC folder
  We absolutely need the Salome CMake configuration files, please define
  CONFIGURATION_ROOT_DIR !
 
 
-- Configuring incomplete, errors occurred!
See also "C:/SALOME-9.7.0/SOURCES/mine/mymodule_build/CMakeFiles/CMakeOutput.log".
"
 
And when I execute "SET" in cmd prompt it tells me than CONFIGURATION_ROOT_DIR = C:\SALOME-9.7.0\W64\CONFIGURATION
 
But there is no "CONFIGURATION" folder inside "W64".
 
Please advise. Thank in advance.

 

Re: Error using YACSGEN on Windows 10 with Salome-9.7.0

Posted by Gregor Simic at August 14. 2021

Hello,

since the CONFIGURATION directory only contains build scripts (CMake, autotools), what I would advise is to download the CONFIGURATION module and copy it into the W64 directory.

So one way is to download it from the github repository:

https://git.salome-platform.org/gitweb/?p=tools/configuration.git;a=summary

More specifically the 9.7.0 snapshot:

https://git.salome-platform.org/gitweb/?p=tools/configuration.git;a=snapshot;h=8437067aa369c94f9aed9456dc2ea2f38c6bd990;sf=tgz

Or download any other Linux images and copy the CONFIGURATION directory to the W64 directory.

 

Best regards

Re: Error using YACSGEN on Windows 10 with Salome-9.7.0

Posted by Brigity Volund at August 15. 2021

Thank you Gregor. Downloading the CONFIGURATION module and copying it into the W64 directory resolved the issue! 

Powered by Ploneboard
Document Actions