Skip to content

bazel: Switch to tcl9, don't use runfiles anymore.#10094

Merged
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
hzeller:feature-20260409-tcl9
Apr 21, 2026
Merged

bazel: Switch to tcl9, don't use runfiles anymore.#10094
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
hzeller:feature-20260409-tcl9

Conversation

@hzeller
Copy link
Copy Markdown
Collaborator

@hzeller hzeller commented Apr 9, 2026

We now can store a zipped set of tcl files for init.tcl and readline, so we don't need runfiles anymore.

Also advantage: the bazel-bin/openroad binary is now self-complete, so it can be copied anywhere as it does not need to find the tcl files relative to the binary anymore.

While at it, also update openmp: the previous version had some runfile that is actually not needed. So that helps us entirely not needing any runfiles anymore.

@github-actions github-actions Bot added the size/S label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the openmp and tcl_lang dependencies to newer versions and enables the use_zipfs flag by default in bazel/BUILD. Feedback was provided to remove an outdated inline comment that is no longer accurate following the Tcl 9 migration.

Comment thread bazel/BUILD Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

@hzeller hzeller force-pushed the feature-20260409-tcl9 branch from 7a747da to 74fc11a Compare April 9, 2026 15:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this help reduced the symlinking done when running tests?

@maliberty maliberty enabled auto-merge April 9, 2026 15:42
@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

Yes. It reduces the symlinks to zero.

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

(at least for openroad and opensta ussage. I have not looked if the tests do other symlinks)

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

mmh, testing locally
//src/rsz/test:buffer_varying_lengths-tcl_test fails with
Error: buffer_varying_lengths.tcl, 105 can't read "sta::float_inf": no such variable

Maybe there is an issue mapping

https://github.com/The-OpenROAD-Project/OpenSTA/blob/6599d47d27d532f0662dbf8dab63577e5e7b93b5/util/Util.i#L52

with swig under Tcl 9 ?

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

This happens when calling report_check_types defined in src/sta/search/Search.tcl

https://github.com/The-OpenROAD-Project/OpenSTA/blob/6599d47d27d532f0662dbf8dab63577e5e7b93b5/search/Search.tcl#L486-L494

Is there something special that we need to do to hage Searcch.tcl see the definition in Util.i ?

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

Looks like CI also fails with this as well.
Do you have an idea what is amiss @maliberty ?

@maliberty
Copy link
Copy Markdown
Member

I see it in ./sta/util/Util.i

float float_inf = INF;

I don't know why it isn't found.

@hzeller hzeller marked this pull request as draft April 9, 2026 19:33
@hzeller hzeller marked this pull request as draft April 9, 2026 19:33
auto-merge was automatically disabled April 9, 2026 19:33

Pull request was converted to draft

auto-merge was automatically disabled April 9, 2026 19:33

Pull request was converted to draft

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

Will convert to draft for now and have a look separately when I find some time.

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 9, 2026

Tried with latest swig 4.4.1 (which I am about to push to BCR), but that does not make a difference.

@hzeller hzeller force-pushed the feature-20260409-tcl9 branch from 74fc11a to 8710f38 Compare April 10, 2026 09:02
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 17, 2026

If we can get OpenSTA synced to head of Parallax upstream (and also ideally The-OpenROAD-Project/OpenSTA#341 merge), then this can be unblocked as then Tcl 9 will work fully.

@maliberty
Copy link
Copy Markdown
Member

We sync osta fairly recently. Is there a specific commit you need?

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 17, 2026

Essentially the latest one: parallaxsw/OpenSTA@e629909

@maliberty
Copy link
Copy Markdown
Member

@dsengupta0628 please look at updating osta.

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 20, 2026

Is there a timelime for the upstream merge of sta ?

@dsengupta0628
Copy link
Copy Markdown
Contributor

Is there a timelime for the upstream merge of sta ?

I had started merging from the latest code in 4/16, that ended up with some compilation issues with our OpenSTA test infrastructure- once resolved, I pulled in the OpenROAD/OpenSTA master and now I found 7-8 regression failures. I am resolving them one by one. Once this is resolved, I will pull in the current latest changes from upstream too. It is ongoing effort right now

@dsengupta0628
Copy link
Copy Markdown
Contributor

@dsengupta0628 please look at updating osta.

PR The-OpenROAD-Project/OpenSTA#348 FYI

We now can store a zipped set of tcl files for init.tcl and
readline, so we don't need runfiles anymore.

Also advantage: the bazel-bin/openroad binary is now self-complete,
so it can be copied anywhere as it does not need to find the tcl files
relative to the binary anymore.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@hzeller hzeller force-pushed the feature-20260409-tcl9 branch from 8710f38 to 25ffb41 Compare April 21, 2026 15:14
@hzeller hzeller marked this pull request as ready for review April 21, 2026 15:14
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 21, 2026

Now that a fresh upstream STA is referenced in the submodule, this now should work and is ready to review.

After this, the binary can be put anywhere, and just works there without needing tcl files (or even a local tcl installation); including tclreadline.

This is true not only for openroad but the opensta binary:

bazel build -c opt :openroad src/sta:opensta
install bazel-bin/openroad bazel-bin/src/sta/opensta /tmp
/tmp/openroad  # <- works and initializes tcl
/tmp/opensta # also this one

@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented Apr 21, 2026

FYI @oharboe for your install scripts.

@maliberty maliberty enabled auto-merge April 21, 2026 15:47
@maliberty maliberty merged commit 03322c9 into The-OpenROAD-Project:master Apr 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants