Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial doesn't build #7

Closed
christetreault opened this issue Mar 3, 2015 · 10 comments
Closed

Tutorial doesn't build #7

christetreault opened this issue Mar 3, 2015 · 10 comments

Comments

@christetreault
Copy link
Contributor

I figured I'd build the new book, and restart following my issues with chapter 6. I cloned the repo and ran make which output:

$ make
pandoc --from=markdown+lhs --to=html5 -s --mathjax --standalone --parse-raw --mathjax --section-divs --filter web/templates/codeblock.hs --filter templates/html.hs --variable=notitle --highlight-style=tango --template=web/templates/page.template src/00-preamble.lhs src/03-poly.lhs src/99-bib.lhs -o web/dist/foo.html
pandoc: Could not find data file templates/web/templates/page.template
make: *** [site] Error 97

There is no web folder in templates, and the web in the project root is empty. On github, it links to another repository.

After it occurred to me that this was trying to build a webpage, and I want a pdf, I ran make book:

$ make book
cat src/00-preamble.lhs src/01-intro.lhs src/02-basic.lhs src/03-poly.lhs src/04-datatypes.lhs src/05-measure-bool.lhs src/06-measure-int.lhs src/07-measure-sets.lhs src/08-case-study-lazy-queues.lhs src/09-case-study-associative-maps.lhs src/10-case-study-pointers.lhs src/11-case-study-AVL.lhs src/99-bib.lhs > dist/pbook.lhs
/bin/sh: 1: cannot create dist/pbook.lhs: Directory nonexistent
make: *** [book] Error 2

If you create dist in the project root:

$ make book
cat src/00-preamble.lhs src/01-intro.lhs src/02-basic.lhs src/03-poly.lhs src/04-datatypes.lhs src/05-measure-bool.lhs src/06-measure-int.lhs src/07-measure-sets.lhs src/08-case-study-lazy-queues.lhs src/09-case-study-associative-maps.lhs src/10-case-study-pointers.lhs src/11-case-study-AVL.lhs src/99-bib.lhs > dist/pbook.lhs
pandoc --highlight-style=tango --from=markdown+lhs --biblio templates/sw.bib --chapters --latex-engine=pdflatex --template=templates/default.latex --filter templates/inside.hs dist/pbook.lhs -o dist/pbook.pdf
pandoc: Error running filter templates/inside.hs
templates/inside.hs not found in path
make: *** [book] Error 83

templates/inside.hs does exist, and giving it 777 permissions doesn't help. I looked into it a bit, but I can't figure out why it doesn't work. I noticed that there is a pre-built pdf in the repository already, so I'm going to move ahead with that. I just thought I'd share the issues I had with it, and what I found out.

@ranjitjhala
Copy link
Member

Yikes! will look into this ASAP. (hope its not my recent changes...)

On Mon, Mar 2, 2015 at 6:53 PM, Chris Tetreault notifications@github.com
wrote:

I figured I'd build the new book, and restart following my issues with
chapter 6. I cloned the repo and ran make which output:

$ make
pandoc --from=markdown+lhs --to=html5 -s --mathjax --standalone --parse-raw --mathjax --section-divs --filter web/templates/codeblock.hs --filter templates/html.hs --variable=notitle --highlight-style=tango --template=web/templates/page.template src/00-preamble.lhs src/03-poly.lhs src/99-bib.lhs -o web/dist/foo.html
pandoc: Could not find data file templates/web/templates/page.template
make: *** [site] Error 97

There is no web folder in templates, and the web in the project root is
empty. On github, it links to another repository.

After it occurred to me that this was trying to build a webpage, and I
want a pdf, I ran make book:

$ make book
cat src/00-preamble.lhs src/01-intro.lhs src/02-basic.lhs src/03-poly.lhs src/04-datatypes.lhs src/05-measure-bool.lhs src/06-measure-int.lhs src/07-measure-sets.lhs src/08-case-study-lazy-queues.lhs src/09-case-study-associative-maps.lhs src/10-case-study-pointers.lhs src/11-case-study-AVL.lhs src/99-bib.lhs > dist/pbook.lhs
/bin/sh: 1: cannot create dist/pbook.lhs: Directory nonexistent
make: *** [book] Error 2

If you create dist in the project root:

$ make book
cat src/00-preamble.lhs src/01-intro.lhs src/02-basic.lhs src/03-poly.lhs src/04-datatypes.lhs src/05-measure-bool.lhs src/06-measure-int.lhs src/07-measure-sets.lhs src/08-case-study-lazy-queues.lhs src/09-case-study-associative-maps.lhs src/10-case-study-pointers.lhs src/11-case-study-AVL.lhs src/99-bib.lhs > dist/pbook.lhs
pandoc --highlight-style=tango --from=markdown+lhs --biblio templates/sw.bib --chapters --latex-engine=pdflatex --template=templates/default.latex --filter templates/inside.hs dist/pbook.lhs -o dist/pbook.pdf
pandoc: Error running filter templates/inside.hs
templates/inside.hs not found in path
make: *** [book] Error 83

templates/inside.hs does exist, and giving it 777 permissions doesn't
help. I looked into it a bit, but I can't figure out why it doesn't work. I
noticed that there is a pre-built pdf in the repository already, so I'm
going to move ahead with that. I just thought I'd share the issues I had
with it, and what I found out.

Reply to this email directly or view it on GitHub
#7.

Ranjit.

@christetreault
Copy link
Contributor Author

Is the .pdf in the repo the latest and greatest?

@ranjitjhala
Copy link
Member

@christetreault I think I fixed all the above. Can you do a

git pull
make

(perhaps better to clone a new repository and start from scratch)

You should get the finished PDF in dist/pbook.pdf

there is a "snapshot" of the book in pdf/programming-with-refinement-types.pdf

@christetreault
Copy link
Contributor Author

No luck. Now I'm getting:

$ make
cat src/00-preamble.lhs src/01-intro.lhs src/02-basic.lhs src/03-poly.lhs src/04-datatypes.lhs src/05-measure-bool.lhs src/06-measure-int.lhs src/07-measure-sets.lhs src/08-case-study-lazy-queues.lhs src/09-case-study-associative-maps.lhs src/10-case-study-pointers.lhs src/11-case-study-AVL.lhs src/99-bib.lhs > dist/pbook.lhs
PANDOC_TARGET=latex pandoc --highlight-style=tango --from=markdown+lhs --biblio templates/sw.bib --chapters --latex-engine=pdflatex --template=templates/default.latex --filter templates/Figures.hs --filter templates/inside.hs dist/pbook.lhs -o dist/pbook.pdf
pandoc: Error running filter templates/Figures.hs
templates/Figures.hs not found in path
make: *** [book] Error 83

The contents of templates:

$ ls -al templates/
total 456
drwxrwxr-x  2 chris chris   4096 Mar  3 12:40 .
drwxrwxr-x 10 chris chris   4096 Mar  3 12:40 ..
-rw-rw-r--  1 chris chris   6064 Mar  3 12:40 book.tex
-rw-rw-r--  1 chris chris   7452 Mar  3 12:40 default.latex
-rw-rw-r--  1 chris chris    251 Mar  3 12:40 figHtml.template
-rw-rw-r--  1 chris chris    102 Mar  3 12:40 figLatex.template
-rw-rw-r--  1 chris chris   3519 Mar  3 12:40 Figures.hs
-rw-rw-r--  1 chris chris   5763 Mar  3 12:40 haskellListings.tex
-rw-rw-r--  1 chris chris   2673 Mar  3 12:40 html.hs
-rw-rw-r--  1 chris chris      0 Mar  3 12:40 html.template
-rw-rw-r--  1 chris chris   3452 Mar  3 12:40 inside.hs
-rw-rw-r--  1 chris chris 411918 Mar  3 12:40 sw.bib

All this after I cloned a fresh repo.

@ranjitjhala
Copy link
Member

Hm. thought i added that! can you try now?

@christetreault
Copy link
Contributor Author

Nope, same error still...

Perhaps I am missing some dependency? I installed Pandoc from the Ubuntu repo. Otherwise I didn't install anything special...

@ranjitjhala
Copy link
Member

Odd can you swing by my office tomorrow afternoon?

On Mar 3, 2015, at 5:00 PM, Chris Tetreault notifications@github.com wrote:

Nope, same error still...


Reply to this email directly or view it on GitHub.

@christetreault
Copy link
Contributor Author

Sure, Is 1:30 good?

@ranjitjhala
Copy link
Member

Yup!

On Tue, Mar 3, 2015 at 6:28 PM, Chris Tetreault notifications@github.com
wrote:

Sure, Is 1:30 good?

Reply to this email directly or view it on GitHub
#7 (comment)
.

Ranjit.

@christetreault
Copy link
Contributor Author

Tutorial builds now; closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants