all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: Error during evaluation of C source blocks on remote machine [9.1.2 (9.1.2-15-g1d5142-elpa @ c:/Users/Ivan/.emacs.d/elpa/org-20171016/)]
@ 2017-10-23 10:11 trus19
  0 siblings, 0 replies; only message in thread
From: trus19 @ 2017-10-23 10:11 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

I have org file with C source block. I work with file on Windows PC.
I have linux machine, which is accessible through Putty. For reasons, i
want to evaluate C code blocks there (mostly because it has gcc).

Here is relevant fragment of my org file:

> #+PROPERTY: header-args :noweb yes :results verbatim :dir /pscp:tcl:/home/tc :flags -std=c99
> 
> Ok, time for something more interesting.
> 
> Let's say we want to change 2 values between variables. How to do
> that? As we learned, with pointers, like:
> 
> #+NAME: swap_function
> #+BEGIN_SRC C
>   void swap_int(int* pa, int* pb)
>   {
>       int c = *pa;
>       ,*pa = *pb;
>       ,*pb = c;
>   }
> 
>   #define SWAP(a, b, t) {t temp##t; temp##t = a; a = b; b = temp##t;}
> 
> #+END_SRC
> 
> Trying it out:
> 
> #+BEGIN_SRC C :main no
> 
>   #include <stdio.h>
> 
>   <<swap_function>>
> 
>   void main()
>   {
>       int a = 1, b = 19;
>       printf("Before testing a=%d, b=%d\n", a, b);
>       swap_int(&a, &b);
>       printf("After testing function a=%d, b=%d\n", a, b);
>       SWAP(a, b, int);
>       printf("After testing macro a=%d, b=%d\n", a, b);        
>   }
> 
> #+END_SRC

However, when i evaluate source block, i get the following error:

> Spawning child process: invalid argument

I have tried to debug the issue. Error is produced by call to

> (write-region start end input-file)

in function org-babel--shell-command-on-region. This supposedly creates
on remote machine file containing user input (actually,
empty). Evaluation does not go to the invocation of compiler command
line, sadly.

How can that be fixed?


Emacs  : GNU Emacs 24.5.1 (x86_64-w64-mingw32)
 of 2016-01-21 on MICROSOFT-PC
Package: Org mode version 9.1.2 (9.1.2-15-g1d5142-elpa @ c:/Users/Ivan/.emacs.d/elpa/org-20171016/)

current state:
==============
(setq
 org-journal-mode-hook '(#[nil "\301\b\302\303\304$\207"
                           [org-journal-encrypt-on org-add-hook org-journal-encryption-hook nil t] 5]
                         (lambda nil
                          (org-add-hook org-journal-encrypt-on (quote org-journal-encryption-hook) nil t))
                         )
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-log-done 'time
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-restore-windows-after-quit t
 org-agenda-custom-commands '(("n" "Agenda and all TODO's" ((agenda "") (alltodo "")))
                              ("d" "Undated tasks" alltodo "" ((org-agenda-todo-ignore-with-date t))))
 org-use-sub-superscripts '{}
 org-default-notes-file "c:/Users/Ivan/Dropbox/org/notes.org"
 org-agenda-include-diary t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-from-is-user-regexp nil
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil (define-key org-mode-map (kbd "C-c f") (quote krv/org-toggle-focus)))
                 (lambda nil (make-local-variable (quote coding-system-for-read))
                  (make-local-variable (quote coding-system-for-write))
                  (setq coding-system-for-read (quote utf-8-dos)) (setq coding-system-for-write (quote utf-8)))
                 #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local]
                   5 "\n\n(fn)"]
                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-babel-show-result-all append local] 5 "\n\n(fn)"]
                 org-babel-result-hide-spec org-babel-hide-all-hashes org-journal-update-auto-mode-alist)
 org-refile-targets '((org-agenda-files :maxlevel . 3))
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-refile-use-outline-path t
 org-directory "c:/Users/Ivan/Dropbox/org"
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-journal-dir "c:/Users/Ivan/Dropbox/org/journal/"
 org-refile-allow-creating-parent-nodes 'confirm
 org-todo-keywords '((sequence "LATER(l)" "TODO(t!)" "CHECK(k!)" "|" "DONE(d)")
                     (sequence "HOLD(h@/!)" "|" "CANCELLED(c@/!)"))
 org-agenda-window-setup 'current-window
 org-babel-tangle-lang-exts '(("D" . "d") ("C++" . "cpp") ("emacs-lisp" . "el") ("elisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow org-rmail-open :store org-rmail-store-link)
                       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
                       ("irc" :follow org-irc-visit :store org-irc-store-link)
                       ("info" :follow org-info-open :export org-info-export :store org-info-store-link)
                       ("gnus" :follow org-gnus-open :store org-gnus-store-link)
                       ("docview" :follow org-docview-open :export org-docview-export :store
                        org-docview-store-link)
                       ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
                       ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link
                        :store org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
                       ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link)
                       ("file" :complete org-file-complete-link)
                       ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path))))
                       ("help" :follow org--open-help-link)
                       ("http" :follow (lambda (path) (browse-url (concat "http:" path))))
                       ("https" :follow (lambda (path) (browse-url (concat "https:" path))))
                       ("mailto" :follow (lambda (path) (browse-url (concat "mailto:" path))))
                       ("news" :follow (lambda (path) (browse-url (concat "news:" path))))
                       ("shell" :follow org--open-shell-link))
 org-babel-load-languages '((C . t) (emacs-lisp . t))
 org-reveal-start-hook '(org-decrypt-entry)
 org-agenda-files '("~/Dropbox/org/notes.org" "~/Dropbox/org/projects.org" "~/Dropbox/org/machine.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-23 10:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-23 10:11 Bug: Error during evaluation of C source blocks on remote machine [9.1.2 (9.1.2-15-g1d5142-elpa @ c:/Users/Ivan/.emacs.d/elpa/org-20171016/)] trus19

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.