20Mhz / skywater-pdk

Open source process design kit for usage with SkyWater Technology Foundry's 130nm node.
https://skywater-pdk.rtfd.io
Apache License 2.0
5 stars 5 forks source link

Make fails with unexpected & #2

Open nachiket opened 3 years ago

nachiket commented 3 years ago

Is the make command supposed to run in a particular shell? I've tried zsh and tcsh and both throw this error.

/opt/skywater-pdk/vendor/synopsys> make sky130_fd_sc_hd_db
cd work && lc_shell -f /spare/opt/skywater-pdk/vendor/synopsys/scripts/lc.tcl -x 'set target_lib_dir ../../../libraries/sky130_fd_sc_hd/latest; set target_lib_name sky130_fd_sc_hd; set output_dir /spare/opt/skywater-pdk/vendor/synopsys/results/lib/sky130_fd_sc_hd' |& tee /spare/opt/skywater-pdk/vendor/synopsys/logs/lc_sky130_fd_sc_hd_db.log
/bin/sh: 1: Syntax error: "&" unexpected
Makefile:28: recipe for target 'sky130_fd_sc_hd_db' failed
make: *** [sky130_fd_sc_hd_db] Error 2

Dropping the pipe to log seems to work fine.

leandromgr commented 3 years ago

That "&" before the "tee" command shouldn't be there as the pipe ("|" symbol) connect the outputs. Other possibility is the STDOUT or STDERR redirection. In that case, the redirection should be before the pipe command. Could you try modifying the Makefile to either of the following commands? 1) Without redirection cd work && lc_shell -f /spare/opt/skywater-pdk/vendor/synopsys/scripts/lc.tcl -x 'set target_lib_dir ../../../libraries/sky130_fd_sc_hd/latest; set target_lib_name sky130_fd_sc_hd; set output_dir /spare/opt/skywater-pdk/vendor/synopsys/results/lib/sky130_fd_sc_hd' | tee /spare/opt/skywater-pdk/vendor/synopsys/logs/lc_sky130_fd_sc_hd_db.log

2) With output redirection cd work && lc_shell -f /spare/opt/skywater-pdk/vendor/synopsys/scripts/lc.tcl -x 'set target_lib_dir ../../../libraries/sky130_fd_sc_hd/latest; set target_lib_name sky130_fd_sc_hd; set output_dir /spare/opt/skywater-pdk/vendor/synopsys/results/lib/sky130_fd_sc_hd' 2>&1 | tee /spare/opt/skywater-pdk/vendor/synopsys/logs/lc_sky130_fd_sc_hd_db.log

I hope that solves the issue. Best regards, Leandro