* pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON'
@ 2018-01-31 13:43 Uwe Brauer
2018-01-31 16:30 ` [installed from source] (was: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON') Uwe Brauer
[not found] ` <87372mp2je.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
0 siblings, 2 replies; 9+ messages in thread
From: Uwe Brauer @ 2018-01-31 13:43 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
Hi
I just switched from Ubuntu 14.04 32bit to 64 bit and the per-user
installed pandoc did not work anymore, so I just downloaded and
installed the deb package from https://github.com/jgm/pandoc/releases/tag/2.1.1
That worked nicely
However I used a short but very useful hs script
Which looks like
,----
| import Text.Pandoc.JSON
|
| main = toJSONFilter stripmath
| where stripmath (Math _ _) = Str "FORMULA"
| stripmath x = x
`----
And which I call
pandoc file -t json | /home/oub/ALLES/HGs/scripts/stripmath | pandoc -f json -t plain -o file2
However when I do that I obtain
/home/oub/ALLES/HGs/scripts/stripmath: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
JSON parse error
That is strange since libgmp.so.10 is installed but now in
/usr/lib/x86_64-linux-gnu/libgmp.so.10
So I should recompile that script I presume
Which I compiled via
ghc --make stripmath.hs
But then I obtain
stripmath.hs:1:8:
Could not find module `Text.Pandoc.JSON'
Use -v to see a list of the files searched for.
Any help would be strongly appreciated
Uwe Brauer
^ permalink raw reply [flat|nested] 9+ messages in thread
* [installed from source] (was: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON')
2018-01-31 13:43 pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON' Uwe Brauer
@ 2018-01-31 16:30 ` Uwe Brauer
[not found] ` <87y3keng85.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
[not found] ` <87372mp2je.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
1 sibling, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2018-01-31 16:30 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
>>> "Uwe" == Uwe Brauer <oub-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> writes:
> Hi
I even installed pandoc from source using stack, but the compilation
problem remains.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON'
[not found] ` <87372mp2je.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
@ 2018-01-31 17:54 ` John MacFarlane
2018-01-31 19:04 ` Uwe Brauer
0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2018-01-31 17:54 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
+++ Uwe Brauer [Jan 31 18 14:43 ]:
>So I should recompile that script I presume
>
>
>Which I compiled via
>
>ghc --make stripmath.hs
>
>But then I obtain
>stripmath.hs:1:8:
> Could not find module `Text.Pandoc.JSON'
> Use -v to see a list of the files searched for.
Our package only installs the pandoc executable, not the
library. You'd need to install this with cabal or stack in
the usual way, if you want to compile a filter.
Note that you can now write filters in lua; this might be
more convenient as the lua interpreter is built into the
pandoc executable. See --lua-filter option.
The lua equivalent to your filter would be something like
this 3-liner (untested):
function Math(el)
return pandoc.Str("FORMULA")
end
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: (was: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON')
[not found] ` <87y3keng85.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
@ 2018-01-31 17:54 ` John MacFarlane
2018-01-31 19:03 ` Uwe Brauer
0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2018-01-31 17:54 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
+++ Uwe Brauer [Jan 31 18 17:30 ]:
>>>> "Uwe" == Uwe Brauer <oub-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> writes:
>
> > Hi
>
>I even installed pandoc from source using stack, but the compilation
>problem remains.
Use 'stack ghc' instead of 'ghc' to compile the filter.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re:
2018-01-31 17:54 ` John MacFarlane
@ 2018-01-31 19:03 ` Uwe Brauer
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2018-01-31 19:03 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
>>> "John" == John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
> +++ Uwe Brauer [Jan 31 18 17:30 ]:
>>>>> "Uwe" == Uwe Brauer <oub-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> writes:
>>
>> > Hi
>>
>> I even installed pandoc from source using stack, but the compilation
>> problem remains.
> Use 'stack ghc' instead of 'ghc' to compile the filter.
Do you mean
stack ghc stripmath.hs
Does not work neither
stripmath.hs:1:1: error:
Could not find module ‘Text.Pandoc.JSON’
Use -v to see a list of the files searched for.
|
1 | import Text.Pandoc.JSON
| ^^^^^^^^^^^^^^^^^^^^^^^
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87tvv1onpd.fsf%40mat.ucm.es.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON'
2018-01-31 17:54 ` pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON' John MacFarlane
@ 2018-01-31 19:04 ` Uwe Brauer
[not found] ` <87po5ponnx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2018-01-31 19:04 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
>>> "John" == John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
> +++ Uwe Brauer [Jan 31 18 14:43 ]:
>> So I should recompile that script I presume
>>
>>
>> Which I compiled via
>>
>> ghc --make stripmath.hs
>>
>> But then I obtain
>> stripmath.hs:1:8:
>> Could not find module `Text.Pandoc.JSON'
>> Use -v to see a list of the files searched for.
> Our package only installs the pandoc executable, not the
> library. You'd need to install this with cabal or stack in
> the usual way, if you want to compile a filter.
How to I obtain the library, which stack command should I use?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON'
[not found] ` <87po5ponnx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
@ 2018-01-31 21:41 ` John MACFARLANE
2018-02-01 8:04 ` Uwe Brauer
0 siblings, 1 reply; 9+ messages in thread
From: John MACFARLANE @ 2018-01-31 21:41 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
'stack install pandoc' should install the library.
With 'cabal', you could do 'cabal install pandoc'
to install the library, and it would then be
available for 'ghc --make' to find. Maybe the
same doesn't work for stack?
Try with cabal, then.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON'
2018-01-31 21:41 ` John MACFARLANE
@ 2018-02-01 8:04 ` Uwe Brauer
[not found] ` <877erxjfuq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2018-02-01 8:04 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
>>> "John" == John MACFARLANE
>>> <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
> 'stack install pandoc' should install the library.
That's what I did.
> With 'cabal', you could do 'cabal install pandoc'
> to install the library, and it would then be
> available for 'ghc --make' to find. Maybe the
> same doesn't work for stack?
> Try with cabal, then.
Ok, shall I delete my stack installation, then?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON'
[not found] ` <877erxjfuq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
@ 2018-02-01 17:28 ` John MACFARLANE
0 siblings, 0 replies; 9+ messages in thread
From: John MACFARLANE @ 2018-02-01 17:28 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
+++ Uwe Brauer [Feb 01 18 09:04 ]:
>>>>"John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
>
>>'stack install pandoc' should install the library.
>
>That's what I did.
>
>
>>With 'cabal', you could do 'cabal install pandoc'
>>to install the library, and it would then be
>>available for 'ghc --make' to find. Maybe the
>>same doesn't work for stack?
>
>>Try with cabal, then.
>
>Ok, shall I delete my stack installation, then?
I don't know; I typically only use stack when I have a
project with a stack.yaml, so I'm not sure exactly where
'stack ghc' looks for its packages. You could check
the stack documentation, but maybe for your purposes cabal
is a better bet (and then you wouldn't need stack).
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-02-01 17:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31 13:43 pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON' Uwe Brauer
2018-01-31 16:30 ` [installed from source] (was: pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON') Uwe Brauer
[not found] ` <87y3keng85.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2018-01-31 17:54 ` John MacFarlane
2018-01-31 19:03 ` Uwe Brauer
[not found] ` <87372mp2je.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2018-01-31 17:54 ` pandoc 2.1.1 64 bit Ubuntu: Could not find module `Text.Pandoc.JSON' John MacFarlane
2018-01-31 19:04 ` Uwe Brauer
[not found] ` <87po5ponnx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2018-01-31 21:41 ` John MACFARLANE
2018-02-01 8:04 ` Uwe Brauer
[not found] ` <877erxjfuq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2018-02-01 17:28 ` John MACFARLANE
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 NNTP newsgroup(s).