<#460 Build fails when sources are in a read-only ...
# open_pdks
g
#460 Build fails when sources are in a read-only directory Issue created by fedeinthemix I'm using NixOS where packages are built in isolated sandboxes and the build artifacts are stored in read-only locations. For this reason, and to be able to select libraries in various combinations, I build a package per library. When
open_pdk
copies the sources to the staging area the files are still read-only and the following scripts fail to open some files for writing: • rename_models.py • rename_cells.py • inc_verilog.py • fix_io_lef.py • inc_verilog.py • foundry_instal.py All of the above can be fixed by including import stat def makeuserwritable(filepath): if os.path.exists(filepath): st = os.stat(filepath) os.chmod(filepath, st.st_mode | stat.S_IWUSR) and before opening for write try: + makeuserwritable(outname) with open(outname, 'w') as outFile: for i in fixedlines: print(i, file=outFile) The same problem affects
sky130/Makefile.in
and can be corrected by # then remove the larger of the two example directories if test "x${XSCHEM_PATH}" != "x" ; then \ cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_$*} ; \ + chmod -R u+w ${XSCHEM_STAGING_$*}; \ rm -rf ${XSCHEM_STAGING_$*}/decred_hash_macro ; \ fi # xschem setup is for sky130A. Fix for the given target variant. The full patches can be inspected in fbe-flakes. If there is interest I can prepare a PR. RTimothyEdwards/open_pdks