Error using YACSGEN on Windows 10 with Salome-9.7.0
This forum is DEPRECATED, please create new topics in the new SALOME forum.
For existing topics please transfer them to the new forum.
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_PREFIXATH=%s"%(self.build_dir, self.sourceDir(), prefix)
ier = os.system(build_sh)
if ier != 0:
raise Invalid("configure has ended in error")
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
This forum is DEPRECATED, please create new topics in the new SALOME forum.
For existing topics please transfer them to the new forum.