You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I have hit upon a bug in rust lang support.
Compilation with PythonTeX on Windows fails when using rust command families (or rs in that regard) and if you have a space in path to .pytxcode file.
The error message I am getting is:
error: multiple input filenames provided (first two filenames are `Zaloha\Databaze\JazykAccessASQL\Poznamky\minted\<outputdir>\rust_default_default.exe` and `<outputdir>\rust_default_default.rs`)
If I remove the space in path (which is before "Zaloha"), and if there are no other spaces in filepath, error is gone.
I have looked into pythontex_engines.py and naively tryed to add quotations at line 1540 around {workingdir} and {file}.rs, but the error persists. If I use just very basic compilation with rustc compiler:
rustc C:\filepath\with space\file.rs
I get fully working binary. I am Rust newbie, just experimenting with Rust and PythonTeX, and Rust template for PythonTeX looks to me pretty complicated (or at least extensive).
How could this be fixed?
The text was updated successfully, but these errors were encountered:
I think the issue is in the compilation command in pythontex_engines.py. Try swapping
['{rustc} --crate-type bin -o {File}.exe -L {workingdir} {file}.rs', '{File}.exe']
for
['{rustc} --crate-type bin -o "{File}.exe" -L "{workingdir}" {file}.rs', '"{File}.exe"']
That is, add quotes around the executable and working directory. {file}.rs shouldn't need quotes, since it is a temp file in the pythontex-files-* directory, and that path should be guaranteed to have no spaces given how it is constructed.
Proposed solution of adding quotation marks in compilation command fixes my issue.
Thank you very much Mr. Poore. Next time, I will test adding more quotations than less while debuging.
Will this change end up supported in next pythontex release, or in next TeXlive update?
I think I have hit upon a bug in rust lang support.
Compilation with
PythonTeX
on Windows fails when usingrust
command families (orrs
in that regard) and if you have a space in path to.pytxcode
file.The error message I am getting is:
If I remove the space in path (which is before "Zaloha"), and if there are no other spaces in filepath, error is gone.
I have looked into
pythontex_engines.py
and naively tryed to add quotations at line 1540 around{workingdir}
and{file}.rs
, but the error persists. If I use just very basic compilation withrustc
compiler:I get fully working binary. I am Rust newbie, just experimenting with Rust and PythonTeX, and Rust template for PythonTeX looks to me pretty complicated (or at least extensive).
How could this be fixed?
The text was updated successfully, but these errors were encountered: