M1 Mac. 

I tried this:for f in *.md; do pandoc "$f" -o "${f%.md}.pdf"; done

But I get an error:

pandoc(45574,0x207810e00) malloc: *** set a breakpoint in malloc_error_break to debug

pandoc: pdflatex: createProcess: runInteractiveProcess: exec: resource exhausted (Cannot allocate memory)

On Sunday, July 25, 2021 at 7:22:06 PM UTC+4 instan...@gmail.com wrote:
I appreciate this isn't the simple solution that you might be hoping for, but I've had success in getting pandoc to run reliably in a docker container.

I'm using it to build my thesis, and I created a template project here https://github.com/instantiator/markdown-thesis-builder which contains a sample Dockerfile, and the build script that uses pandoc.

I hope it's helpful - I found it's the only way to reliably run pandoc on my M1 Mac.

On Friday, 23 July 2021 at 15:53:16 UTC+1 allank...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
Great to find this posting.

I've been having this problem ever since I got a M1 MacBook Air with BigSur at the start of the year.

I couldn't find any references when I encountered it and put it down to something to do with BigSur and ARM.
I've reinstalled Pandoc and PdfLatex several time but never resolved.
I've just don't another reinstall and then stumbled on John's fix which works for me - thanks!

Something I noticed in the process: a really small file will process correctly:

# Hello world

## Hello world

### Hello world

Hello world

pandoc hello.txt -o hello.pdf

Works.
You can add a few more paragraphs (approx 5) to hello.txt before I get the error - which hints that there is some actual resource exhausted happening. But why would that be fixed by specifying the path? Dunno.

Thanks for the fix, hope we can find a solution before long

allan


On Wednesday, 9 June 2021 at 16:40:37 UTC+1 John MacFarlane wrote:
"Jason Davies" <ophi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi folks,
>
> I just tried to convert three short Word files one at a time; one worked
> fine but two gave errors like this:
>
> pandoc(24405,0x209984e00) malloc: can't allocate region
> :*** mach_vm_map(size=1048576, flags: 100) failed (error code=268435465)
> pandoc(24405,0x209984e00) malloc: *** set a breakpoint in
> malloc_error_break to debug
> pandoc: pdflatex: createProcess: runInteractiveProcess: exec: resource
> exhausted (Cannot allocate memory)
>

I just got an M1 mac, and I ran into this same error.

I found that if I fully specify the pdflatex path, it works:

pandoc -o my.pdf --pdf-engine=/Library/TeX/texbin/pdflatex

It's a bit mysterious why this should be needed, since
`which pdflatex` returns this path!
And running pandoc with --verbose shows that the PATH is
correctly passed through to the process running pdflatex.

Anyone have any ideas? AT least this gives a workaround...

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/264288c6-47ab-4d1f-9d4f-070860bdac82n%40googlegroups.com.