Repository navigation
Make gdswrite work with libexpat pointed to in LD_LIBRARY_PATH - #450
Merged
Merged
Conversation
The klayout gdswrite uses libexpat.so.1, but if its location was provided via `LD_LIBRARY_PATH`, it was not found as bazel is blocking this environment variable by default. So run this with `use_default_shell_env = True`. Furthermore, the `ctx.actions.run_shell` is problematic, as it runs a shell using `/bin/bash`, which is not necessarily a location where the shell is on all systems (e.g. NixOS) So instead, assemble the arguments in structured args, and use `ctx.actions.run` instead.
Collaborator
Author
|
This will make XLS tests using gdswrite work on NixOS |
mikesinouye
approved these changes
Sep 28, 2026
Collaborator
|
Thanks Henner, hope you've been well |
copybara-service Bot
pushed a commit
to google/xls
that referenced
this pull request
Sep 29, 2026
This incorporates hdl/bazel_rules_hdl#450 that makes it possible that gdswrite will work on NixOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The klayout gdswrite uses libexpat.so.1, but if its location was provided via
LD_LIBRARY_PATH, it was not found as bazel is blocking this environment variable by default.So run this with
use_default_shell_env = True.Furthermore, the
ctx.actions.run_shellis problematic, as it runs a shell using/bin/bash, which is not necessarily a location where the shell is on all systems (e.g. NixOS) So instead, assemble the arguments in structuredargs, and use
ctx.actions.runinstead.