Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expandPorts.tcl has hardcoded paths which do not exist. #683

Open
jahagirdar opened this issue Mar 13, 2024 · 1 comment
Open

expandPorts.tcl has hardcoded paths which do not exist. #683

jahagirdar opened this issue Mar 13, 2024 · 1 comment

Comments

@jahagirdar
Copy link

jahagirdar commented Mar 13, 2024

export BLUESPECDIR=/tmp/bsc/inst
/tmp/bsc/util/bluetcl-scripts/expandPorts.tcl foo mkfoo mkfoo.v 
couldn't read file "/tmp/bsc/inst/lib/tcllib/bluespec/portUtil.tcl": no such file or directory

Copied portUtil.tcl from src to /tmp/bsc/inst/lib/tcllib/bluespec/ to fix this. Then

/tmp/bsc/util/bluetcl-scripts/expandPorts.tcl foo mkfoo mkfoo.v                                                                                                       
can't find package types

Copied types.tcl to /tmp/bsc/inst/lib/tcllib/bluespec/ and modified /tmp/bsc/inst/lib/tcllib/bluespec/pkgIndex.tcl with the below line to fix this

package ifneeded types 1.0 [list source [file join $dir types.tcl]]

@quark17
Copy link
Collaborator

quark17 commented Mar 27, 2024

Note that the files don't have to be copied into the BSC installation. Bluetcl has a search path where it looks for Tcl libraries, and you can add a new directory to that path. A common way is by creating a file ${HOME}/.bluetclrc and adding the following line to it:

lappend auto_path /path/to/libraries/

BSC also consults the environment variable BLUETCLLIBPATH which can be define with a search path.

In any case, thank you for reporting this. The files in bsc/util/bluetcl-scripts/ are provided as examples, and I wouldn't be surprised if there's a lot that needs to be cleaned up there. These files were in the proprietary BSC release, but didn't seem to be necessary for the core of BSC. The bsc-contrib repo is where we put BH/BSV libraries that should be open source but didn't belong as the core of BSC; we maybe should have put the Bluetcl libraries in that repo too. No effort was put into making these files work, they were just placed in /util so that the source is available for anyone who still wanted to use it. It would be good to fix up the files to make them work, or add a README on how to make them work (or at least to set expectations about the state of the files), but it hasn't been a priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants