public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Custom cabal builds for pandoc 3.*?
@ 2023-03-15 16:11 Jim Pryor
       [not found] ` <76e8af61-df27-472a-986d-030a883998fan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Pryor @ 2023-03-15 16:11 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1742 bytes --]

I used to follow the instructions at 
<https://pandoc.org/installing.html#custom-cabal-method> to build pandoc 
with the cabal configure `--flags="embed_data_files lua53"`.

Since `git pull`ing to the pandoc 3.* source tree, this no longer builds an 
executable. I see from the Pandoc 3.0 announcement on this list that the 
packaging has split in some ways.

Is it still possible to build all the components with custom cabal 
configure flags? How do I go about it? Can I just cd to the `pandoc-cli` 
subdirectory and do the following there:

```
cabal update

cabal install --only-dependencies

cabal configure --prefix=/usr/local --flags="embed_data_files lua53"

cabal build

./dist-newstyle/build/x86_64-osx/ghc-*/pandoc-*/x/pandoc/build/pandoc/pandoc 
--version

```

Or do I have to first run those steps in the top-level directory, then do 
`cabal install`, then repeat them in the `pandoc-cli` subdirectory? When I 
try to only do the steps in the `pandoc-cli` subdirectory, it seems like a 
binary version of the main `pandoc` library is being downloaded, rather 
than one built using my custom configure flags.

Is the option to build using the Lua 5.3 engine still available? I've been 
fiddling around and it seems like however I do the build, I end up with a 
pandoc executable that says it uses the Lua 5.4 engine.


-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/76e8af61-df27-472a-986d-030a883998fan%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2186 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom cabal builds for pandoc 3.*?
       [not found] ` <76e8af61-df27-472a-986d-030a883998fan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-03-15 16:31   ` John MacFarlane
       [not found]     ` <2242AE1C-C331-4335-8764-5D16C0F925D9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2023-03-15 16:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw



> On Mar 15, 2023, at 9:11 AM, Jim Pryor <jim.pryor.nyu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> I used to follow the instructions at <https://pandoc.org/installing.html#custom-cabal-method> to build pandoc with the cabal configure `--flags="embed_data_files lua53"`.
> 
> Since `git pull`ing to the pandoc 3.* source tree, this no longer builds an executable. I see from the Pandoc 3.0 announcement on this list that the packaging has split in some ways.
> 
> Is it still possible to build all the components with custom cabal configure flags? How do I go about it? Can I just cd to the `pandoc-cli` subdirectory and do the following there:
> 
> ```
> cabal update
> cabal install --only-dependencies
> 
> cabal configure --prefix=/usr/local --flags="embed_data_files lua53"
> 
> cabal build
> 
> ./dist-newstyle/build/x86_64-osx/ghc-*/pandoc-*/x/pandoc/build/pandoc/pandoc --version
> 
> ```


Something like this should work, but there have been changes in both pandoc and cabal since the instructions were composed, so they may need some adjusting. Try it?

You'll want to add lua and server to your flags if you want the executable to have Lua and server support, respectively.  lua53 is no longer available, sorry.

> 
> Or do I have to first run those steps in the top-level directory, then do `cabal install`, then repeat them in the `pandoc-cli` subdirectory? When I try to only do the steps in the `pandoc-cli` subdirectory, it seems like a binary version of the main `pandoc` library is being downloaded, rather than one built using my custom configure flags.

cabal never downloads binaries, only source. If it's happening quickly, it could be because your global cabal store already contains a built version of the library.


-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2242AE1C-C331-4335-8764-5D16C0F925D9%40gmail.com.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom cabal builds for pandoc 3.*?
       [not found]     ` <2242AE1C-C331-4335-8764-5D16C0F925D9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2023-03-15 17:43       ` Jim Pryor
       [not found]         ` <acdc69b2-c368-45e8-9154-23c280d09cdbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Pryor @ 2023-03-15 17:43 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3332 bytes --]

Thanks for the quick reply. It looks like I can just cd into the 
`pandoc-cli` subdirectory and do the configure and build from there. 
Doesn't seem to be necessary to first do the build (with or without 
install) from the toplevel directory. Not sure how to confirm that the 
library was built with the `embed_data_files` option though. Also some 
tentativeness in these reports because I was experimenting a lot and not 
100% sure I'm right that this is what works in a clean download of the 
source repo.

Bummer that ongoing development of Pandoc is Lua 5.4-only. I've got other 
dependencies on Lua 5.3, and don't want to reconfigure my Lua-thinking and 
libraries yet. I realize that Pandoc bundles its own version of the engine, 
so it's possible to have a different version Lua CLI installed. Reluctance 
is just due to my cognitive limits. Suppose I'll stick with Pandoc 2.19.2 
for the time being.

On Wednesday, March 15, 2023 at 12:31:17 PM UTC-4 John MacFarlane wrote:

>
>
> > On Mar 15, 2023, at 9:11 AM, Jim Pryor <jim.pr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 
> > I used to follow the instructions at <
> https://pandoc.org/installing.html#custom-cabal-method> to build pandoc 
> with the cabal configure `--flags="embed_data_files lua53"`.
> > 
> > Since `git pull`ing to the pandoc 3.* source tree, this no longer builds 
> an executable. I see from the Pandoc 3.0 announcement on this list that the 
> packaging has split in some ways.
> > 
> > Is it still possible to build all the components with custom cabal 
> configure flags? How do I go about it? Can I just cd to the `pandoc-cli` 
> subdirectory and do the following there:
> > 
> > ```
> > cabal update
> > cabal install --only-dependencies
> > 
> > cabal configure --prefix=/usr/local --flags="embed_data_files lua53"
> > 
> > cabal build
> > 
> > 
> ./dist-newstyle/build/x86_64-osx/ghc-*/pandoc-*/x/pandoc/build/pandoc/pandoc 
> --version
> > 
> > ```
>
>
> Something like this should work, but there have been changes in both 
> pandoc and cabal since the instructions were composed, so they may need 
> some adjusting. Try it?
>
> You'll want to add lua and server to your flags if you want the executable 
> to have Lua and server support, respectively. lua53 is no longer available, 
> sorry.
>
> > 
> > Or do I have to first run those steps in the top-level directory, then 
> do `cabal install`, then repeat them in the `pandoc-cli` subdirectory? When 
> I try to only do the steps in the `pandoc-cli` subdirectory, it seems like 
> a binary version of the main `pandoc` library is being downloaded, rather 
> than one built using my custom configure flags.
>
> cabal never downloads binaries, only source. If it's happening quickly, it 
> could be because your global cabal store already contains a built version 
> of the library.
>
>
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/acdc69b2-c368-45e8-9154-23c280d09cdbn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4282 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom cabal builds for pandoc 3.*?
       [not found]         ` <acdc69b2-c368-45e8-9154-23c280d09cdbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-03-15 22:37           ` John MacFarlane
       [not found]             ` <EFF25C3F-EBD2-48A2-8C3B-4C58E0EE8EE0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2023-03-15 22:37 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]



> On Mar 15, 2023, at 10:43 AM, Jim Pryor <jim.pryor.nyu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Thanks for the quick reply. It looks like I can just cd into the `pandoc-cli` subdirectory and do the configure and build from there. Doesn't seem to be necessary to first do the build (with or without install) from the toplevel directory. Not sure how to confirm that the library was built with the `embed_data_files` option though

You could try

strings /path/to/pandoc | grep ‘\$title\$’

which should give you output if the templates are baked in to the binary.


-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/EFF25C3F-EBD2-48A2-8C3B-4C58E0EE8EE0%40gmail.com.

[-- Attachment #2: Type: text/html, Size: 2270 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Custom cabal builds for pandoc 3.*?
       [not found]             ` <EFF25C3F-EBD2-48A2-8C3B-4C58E0EE8EE0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2023-03-16  2:34               ` Jim Pryor
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Pryor @ 2023-03-16  2:34 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]

Thanks, yes it looks like the data files were embedded.

On Wed, Mar 15, 2023, 6:37 PM John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

>
>
> On Mar 15, 2023, at 10:43 AM, Jim Pryor <jim.pryor.nyu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Thanks for the quick reply. It looks like I can just cd into the
> `pandoc-cli` subdirectory and do the configure and build from there.
> Doesn't seem to be necessary to first do the build (with or without
> install) from the toplevel directory. Not sure how to confirm that the
> library was built with the `embed_data_files` option though
>
>
> You could try
>
> strings /path/to/pandoc | grep ‘\$title\$’
>
> which should give you output if the templates are baked in to the binary.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pandoc-discuss/ga0fmPjLRf0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/EFF25C3F-EBD2-48A2-8C3B-4C58E0EE8EE0%40gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/EFF25C3F-EBD2-48A2-8C3B-4C58E0EE8EE0%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CABfcC-cMgvNX-u20iDo8J9L1g6PCuMVS8QU0Cf-M78k2uCFKfw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3386 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-16  2:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 16:11 Custom cabal builds for pandoc 3.*? Jim Pryor
     [not found] ` <76e8af61-df27-472a-986d-030a883998fan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-15 16:31   ` John MacFarlane
     [not found]     ` <2242AE1C-C331-4335-8764-5D16C0F925D9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-03-15 17:43       ` Jim Pryor
     [not found]         ` <acdc69b2-c368-45e8-9154-23c280d09cdbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-15 22:37           ` John MacFarlane
     [not found]             ` <EFF25C3F-EBD2-48A2-8C3B-4C58E0EE8EE0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-03-16  2:34               ` Jim Pryor

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).