* [BUG]C source block evaluation fails over pscp
@ 2017-10-31 12:02 Иван Трусков
0 siblings, 0 replies; only message in thread
From: Иван Трусков @ 2017-10-31 12:02 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 3188 bytes --]
I am working on Windows machine with org file with C source block. I want
to evaluate code block on remote machine accessible to me with PuTTY. Here
is relevant part of the org file:
#+PROPERTY: header-args :noweb yes :results verbatim :dir /pscp:tcl:/home/tc
Now, let us move to the green fields of user input.
#+NAME: echo_arguments
#+BEGIN_SRC C :main no
#include <stdio.h>
int main(int argc, const char* argv[])
{
printf("Has %d arguments\n", argc);
for(int i = 0; i < argc; ++i)
printf("Argument %d:\n%s\n", i, argv[i]);
return 0;
}
#+END_SRC
Evaluation of source block results in error with the following message:
Spawning child process: invalid argument
Full messages output is
executing C code block (echo_arguments)...
Continue...
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760k9p.c to
/pscp:tcl:/tmp/C-src-5760Xzj.c...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760k9p.c to
/pscp:tcl:/tmp/C-src-5760Xzj.c...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760-R2.exe to
/pscp:tcl:/tmp/C-bin-5760xHw.exe...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760-R2.exe to
/pscp:tcl:/tmp/C-bin-5760xHw.exe...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760wbF.c to
/pscp:tcl:/tmp/C-src-5760Xzj.c...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760wbF.c to
/pscp:tcl:/tmp/C-src-5760Xzj.c...done
Break
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760KwR to
/pscp:tcl:/tmp/ob-input-57609lL...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760KwR to
/pscp:tcl:/tmp/ob-input-57609lL...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760kEe to
/pscp:tcl:/tmp/ob-error-5760X6X...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760kEe to
/pscp:tcl:/tmp/ob-error-5760X6X...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760xOk to
/pscp:tcl:/tmp/ob-input-57609lL...failed
edebug-signal: Spawning child process: invalid argument
Debugging shows that error occurs inside function org-babel-eval when call
to
org-babel--shell-command-on-region is made at the line 105 of org-eval.el.
The line is:
(write-region start end input-file)
There are two things that seem strange:
1. Region is actually empty - input region for C file compilation is empty.
2. There is no problem in writing to remote machine. C source file is
written to location needed.
3. Command line is
"gcc -o \"/tmp/C-bin-5760L4M.exe\" \"/tmp/C-src-5760xjA.c\" "
If that command line is executed on remote machine, compilation succeeds
Was that error introduced in some recen org version?
[-- Attachment #2: Type: text/html, Size: 3835 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-31 12:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-31 12:02 [BUG]C source block evaluation fails over pscp Иван Трусков
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).