markdeck icon indicating copy to clipboard operation
markdeck copied to clipboard

Cannot make markdeck from main branch

Open cirego opened this issue 3 years ago • 10 comments

Markdeck is awesome and I'm trying to build it from main. When I try to run make all, I get the following error message:

[zen:~/code/arnehilmann/markdeck:(main[|])] make all
make: *** No rule to make target 'src/docroot/main/admin.template', needed by 'src/docroot/main/toplevel/admin.html'.  Stop.

It appears that there is either a file and/or Makefile rule missing. src/docroot/main is ignored by git and there don't appear to be any instructions on how to generate / fetch admin.template. The admin.template reference only shows up in Git commit a137d7330ae69d80af41a3f26dc30ae6ca0a871f.

Trying to run cargo build fails due to a missing src/docroot/main directory, which is created by make docroot, which also fails with the above error.

For reference, I'm building on Ubuntu 22.04, so it's possible this is a platform specific issue?

Any help on getting this to build would be much appreciated!

cirego avatar Jun 15 '22 16:06 cirego

yikes... I didn't test a clean checkout, obviously! I just added the missing file you mentioned and fixed another problem in the Makefile. But: the helper pages (markdown-friends), a different GitHub project, get integrated into markdeck as well, but the script assumes it already resides beside the markdeck folder. I will have a closer look into this tomorrow (its too late right now here).

btw: which platform are you targeting? something different than the provided binaries?

arnehilmann avatar Jun 15 '22 22:06 arnehilmann

Thanks for the fast reply!

I'm not targeting a different platform, as there are Linux binaries provided, but rather wanted to try building this project myself :) I've used markdeck on and off for what feels like several years now and I figured I should actually dig into how it works.

cirego avatar Jun 15 '22 22:06 cirego

Hi! Please check my latest commits; building markdeck from scratch "should" work now...

arnehilmann avatar Jul 12 '22 09:07 arnehilmann

Hi @arnehilmann, thanks for following up!

I've updated to commit 5b5c33a:

[zen:~/code/arnehilmann/markdeck:(main[|])] git rev-parse --short HEAD
5b5c33a

When I run make all, I get the following error:

[zen:~/code/arnehilmann/markdeck:(main[|])] make all
export MARKDECK_VERSION=0.60.1 PANDOC_VERSION=2.18 REVEALJS_VERSION=4.3.1 ASCIINEMAPLAYER_VERSION=v2.6.1 JQUERY_VERSION=3.6.0.slim.min IMPRESSJS_VERSION=1.1.0 MERMAID_VERSION=9.0.0 SVGBOB_VERSION=0.5.0-alpha.6
envsubst < src/docroot/main/admin.template > src/docroot/main/toplevel/admin.html
bash: line 2: src/docroot/main/toplevel/admin.html: No such file or directory
make: *** [Makefile:118: src/docroot/main/toplevel/admin.html] Error 1

It looks like there still might be a couple of resources missing? Thanks again, this tool is awesome!

cirego avatar Jul 14 '22 16:07 cirego

oh my, .gitignore tricked me... please try again, this time the "should work" commit is f8ea0b9

arnehilmann avatar Jul 14 '22 23:07 arnehilmann

Awesome! Thanks again for plugging away on this.

Unfortunately, it appears that I'm running into a new error (on commit f8ea0b9):

cp: can't stat 'target/release/svgbob': No such file or directory
The command '/bin/sh -c cp target/release/svgbob /svgbob.orig' returned a non-zero code: 1
make: *** [Makefile:123: docroot] Error 1

cirego avatar Aug 11 '22 05:08 cirego

interesting: latest/greatest svgbob builds a svgbob_cli executable now sigh

arnehilmann avatar Aug 11 '22 10:08 arnehilmann

Hi @arnehilmann, any thoughts on how to fix the svgbob_cli issue?

cirego avatar Oct 18 '22 20:10 cirego

I tried doing this:

diff --git a/docker/Dockerfile.docroot b/docker/Dockerfile.docroot
index e1ce8d0..53fbead 100644
--- a/docker/Dockerfile.docroot
+++ b/docker/Dockerfile.docroot
@@ -56,7 +56,7 @@ RUN git clone https://github.com/ivanceras/svgbob.git
 WORKDIR svgbob
 RUN cargo build --release
 RUN cargo test --release
-RUN cp target/release/svgbob /svgbob.orig
+RUN cp target/release/svgbob_cli /svgbob.orig
 RUN echo "svgbob.orig \$@ | sed -n '/^<svg/,\$p'" > /svgbob
 RUN chmod a+rx /svgbob

and that appears to solve the svgbob issue. Then I ran into this:

fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: No such file or directory
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: No such file or directory
ERROR: unable to select packages:
  git (no such package):
    required by: world[git]
The command '/bin/sh -c apk add git' returned a non-zero code: 1
make: *** [Makefile:123: docroot] Error 1

This error appears to be an issue affecting both Alpine 3.15 and 3.16. Will try again later.

cirego avatar Oct 18 '22 20:10 cirego

Still working the above patch, and trying after the temporary network error, I'm getting the following error:

Step 120/126 : COPY src/markdeck/lib/*.jar /markdeck/.markdeck/                                                                                               
COPY failed: no source files were specified                                                                                                                   
make: *** [Makefile:123: docroot] Error 1    

cirego avatar Oct 23 '22 05:10 cirego