From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Rainer Subject: Re: passing LC_ALL environment variable to org export call Date: Mon, 29 Sep 2014 14:51:53 +0200 Message-ID: <113D8AEB-BFB6-48D2-B473-EE2055C8C70D@gmail.com> References: <87ppeiv621.fsf@gmx.us> <93730A3A-00B0-431D-8498-7D7852D15AAA@gmail.com> <87y4t2ws06.fsf@gmx.us> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYaR4-0004CW-Dk for emacs-orgmode@gnu.org; Mon, 29 Sep 2014 08:52:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYaQs-0008LI-Ax for emacs-orgmode@gnu.org; Mon, 29 Sep 2014 08:52:14 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:56214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYaQs-0008JO-41 for emacs-orgmode@gnu.org; Mon, 29 Sep 2014 08:52:02 -0400 Received: by mail-wg0-f41.google.com with SMTP id k14so13145602wgh.12 for ; Mon, 29 Sep 2014 05:51:56 -0700 (PDT) In-Reply-To: <87y4t2ws06.fsf@gmx.us> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org On 29 Sep 2014, at 14:06, Rasmus wrote: > Johannes Rainer writes: >=20 >> thanks for your hint. I checked Sys.getenv before and after the >> failing code, but LC_ALL was always properly set. I=92m afraid my >> problem relates to some Mac LLVM and GCC gfortran compiler thing, >> since I=92m using a R version compiled against the Mac Accelerate >> framework (vecLib)=85 it is just so strange that I only get the error = in >> Emacs org-mode upon exporting the org file, but not, if I evaluate >> each code chunk separately. >=20 > But are you using .C, .Fortran or Rcpp in your code-block? If not, > why would your compilers matter? (I'm not an expert on R internals, > so my comment may be na=EFve). >=20 no I=92m not using .C in the code-block, the code block contains only = R-code, however, one of the R functions is using (like most R functions) = either C or fortran code to do the actual calculation. I suspect the = loess function in R causing the problem and that this function uses some = code from the optimized BLAS (i.e. library for numeric calculation) = library from Apple (i.e. the Accelerate, or vecLib framework).=20 So, if I run the code (exporting the org buffer to latex) in parallel = processing mode I get a segfault. the same without parallel processing = is fine. Strangely enough, the code block evaluated (C-c C-c) in = parallel processing mode runs also fine. also, if I tangle the R-code = and run the R-code in R it also works fine. It just doesn=92t with = org-mode export... so, in the end I give up. I think there is some very mystic thing going = on. I also tried to understand what the difference between org-mode = export and org-mode eval is... without success. I thought that the = R-process is somehow started differently, but that doesn=92t seem to be = the case. > As a short turn solution try to add this to the top of your file >=20 > #+PROPERTY: session *R* >=20 > These days you might even get away with just=20 >=20 > #+PROPERTY: session >=20 > I'm not sure. This should run your code from the same session. >=20 > [This should be equivalent to adding :session to babel blocks, but > check the manual if it ain't working] >=20 >> to set all environment variables I=92m using the = =93exec-path-from-shell=94 >> extension, so, all environment settings from the shell are available >> in Emacs. >=20 > Are you exporting async or "normally"? If async, do you get the error > when exporting "normally"? >=20 > =97Rasmus >=20 > --=20 > Hvor meget poesi tror De kommer ud af et glas isvand? >=20 >=20