Open shariethernet opened 1 year ago
I narrowed it down to the file name in the fileset. I have a very large path name in the file key for in one of the fileset used by the target. Whenever I have this specific long absolute path I get the above error. I replaced that path with a shorter relative path, then there is no error. As these files and the .core
files are autogenerated, and are located in various locations, are there any work arounds? (The one I could think of is to create an empty build directory in advance, in that case, there is no error irrespective of that path length)
UPDATE:
It appears that when none of the files in the included file sets are relative paths and they constitute only absolute paths, the directory is not created. I fixed it by modifying the yaml_write
function in https://github.com/olofk/fusesoc/blob/main/fusesoc/utils.py to check if the directory for the file path exists, if not create the directory and then write the yaml.
I am not sure if this is the fix. But this seemed to do the job.
def yaml_fwrite(filepath, content, preamble=""):
directory = os.path.dirname(filepath)
if not os.path.exists(directory):
os.makedirs(directory)
with open(filepath, "w") as f:
f.write(preamble)
f.write(yaml.dump(content, Dumper=YamlDumper))
When I change the target name to certain specific names like
pp
,ap
app
etc.,and run fusesoc using the commandfusesoc run --target=pp mycore
I get the below errorWhen I manually create the directory
/home/local/nu/shg/edalize_primepower_example/build/power_0/ap-primepower/
and then run this command it works. For other names of target it works.The one significant difference is that the target names are bigger in the second case, and hence the paths are very long. Would this be an issue?