-
Notifications
You must be signed in to change notification settings - Fork 45
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
Kpsewhich error not appearing in log #1541
Comments
glog is currently being written by the lua code. The executable should not be writing to the same file as it will cause buffering to be messed up and the file to be corrupted.. If anything, the lua code should append stderr from the executable to the glog. |
I can make that change, but I’ll point out that we’re already passing the glow file to the executable using the -l argument. If we don’t want the executable to write to glog directly, then we’ll need to change that too.
✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036
PAX ☧ ΧΡΙΣΤΟΣ
… On May 23, 2021, at 10:19 PM, Henry So ***@***.***> wrote:
glog is currently being written by the lua code. The executable should not be writing to the same file as it will cause buffering to be messed up and the file to be corrupted.. If anything, the lua code should append stderr from the executable to the glog.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yeah, either that should change or the lua code needs to close the file before calling the executable. |
Is the glog file still needed after the executable is called (I haven't had a chance to check yet myself)? If it is, is it reasonable for the Lua code to close the file, call the executable, and then immediately reopen the file? |
Yes, that's reasonable. The executable currently overwrites the |
The executable should also be audited to ensure that it writes to said file instead of |
My computer has decided to go on the fritz again, so I can’t complete my analysis, but I think that support.c may have the offending line. It’s the only place where gregorio_set_error_file is called with stderr as hard coded argument. Sent with GitHawk |
It's set to that by default and then overridden by the |
What do you mean by “y.c”? Sent with GitHawk |
There are source files that end in y.c. |
I'll admit that C code is not my strong suit, but in looking through the code, it looks like the error message which I quoted earlier is already using the internal messaging commands which should direct output to the file specified by |
Like I said before, the |
@rpspringuel Please see my stderr-fix branch and let me know if that works for you. |
I can't find the instructions for building the executable with the kpsewhich restrictions in place, so the modified executables that I build aren't triggering the error (and thus make it impossible for me to test the log-file changes). @henryso do you have those instructions somewhere so that I can do some proper testing? |
I think you would add |
Heading on vacation today. I’ll give it a go when I get back (Friday). Sent with GitHawk |
Working on this. Seems I need to do the testing on Ubuntu as there doesn't appear to be a simple way to get the Kpathsea library in a shared form on Mac. |
Any movement on this? |
Totally forgot about this. Let me see if I can't get my test system updated and running these tests before the end of today. |
I'm working on this, but my virtual machine is being rather stubborn at the moment. Compilation steps are taking really long. |
Okay, here's what I get: After successfully building Gregorio on your branch, I get an executable that returns the following:
Which seems to confirm a correct build. However, the error is still present when I attempt to use it:
Should I do anything else to try and verify the executable further? |
Well kpse is preventing that path correctly. So that build includes kpse. The thing now is to see if the logging works correctly with this version of the executable. |
Right. I’d completely forgotten what I was supposed to be testing. Now I need to put the score in a test document and look at the log. I’ll try that out in the morning. Sent with GitHawk |
Okay, finally got the VM working at reasonable speed and there doesn't appear to be any change. The error shows up in stderr, but not the glog file. |
Then I don't think there's a way to get that error into the glog file besides redirecting stderr from lua rather than using gregorio's error file feature. Looks like kpse is forcing it to print to stderr. |
The following kpsewhich based error is sent to stderr but does not get added to the glog file that Gregorio itself generates:
This can make debugging difficult when auto compile (as this error doesn't end up in any log file). Is it possible for the executable to copy stderr messages to glog or should we add a redirect for stderr to the command call in the Lua code which executes the autocompile?
The text was updated successfully, but these errors were encountered: