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

Build fails on Debian 11 #11

Closed
IeP4nieF opened this issue May 29, 2022 · 3 comments
Closed

Build fails on Debian 11 #11

IeP4nieF opened this issue May 29, 2022 · 3 comments

Comments

@IeP4nieF
Copy link

Hi there,

great project! But build fails on Debian 11:

~/pdfrankenstein$ go build
main.go:5:2: package embed is not in GOROOT (/usr/lib/go-1.15/src/embed)

inkscape, poppler-utils and qpdf are installed:

$ inkscape -V
Inkscape 1.0.2 (e86c870879, 2021-01-15)
Pango version: 1.46.2

$ apt search poppler-utils
poppler-utils/stable,now 20.09.0-3.1 amd64  [installiert]
  PDF-Werkzeuge (auf Basis von Poppler)

$ qpdf --version
qpdf version 10.1.0

Any hint on this issue?

Thanks!

@oxplot
Copy link
Owner

oxplot commented May 29, 2022

You need go 1.18 but I'm surprised you didn't get a warning about it given it's specified in go.mod.

EDIT: seems like it's not meant to enforce it: golang/go#48571

@IeP4nieF
Copy link
Author

Ok, thanks for the fast answere.

I'll go with the binary from release page then.

Perhaps you should add "go >=1.18" under "Requirements".

oxplot added a commit that referenced this issue May 29, 2022
@Nickwiz
Copy link

Nickwiz commented Mar 5, 2023

Expect it is the same on Debian. I'm on Ubuntu 18.4 LTS.

A bit hackish, but the way I did it:

  1. Clone and enter:
git clone https://github.com/oxplot/pdfrankenstein.git
cd pdfrankenstein
  1. Download latest go: https://go.dev/dl/
curl -LO https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
tar -xvf go1.20.1.linux-amd64.tar.gz
export GOROOT=$PWD/go
export PATH=$GOROOT/bin:$PATH
go version

go version go1.20.1 linux/amd64

  1. Download latest qpdf AppImage (v11.3.0): https://github.com/qpdf/qpdf/releases and create a link in home/bin for it (under a custom name in case one want to use the standard).
curl -LO https://github.com/qpdf/qpdf/releases/download/v11.3.0/qpdf-11.3.0-x86_64.AppImage
ln -s $PWD/qpdf-11.3.0-x86_64.AppImage $HOME/bin/qpdf.ai

  1. Modify source of pdfrankenstein to use qpdf app image:
sed -i 's/"qpdf"/"qpdf.ai"/g' session/session.go
  1. Build (I had to specify tags):
go build --tags "pango_1_42 gtk_3_22" .

Now. I have not looked at the source yet, but for what ever reason it just hangs if one start it with a PDF file or no argument. However, by using a random non-existing file it works, i.e:

./pdfrankenstein foo

then open PDF from within the application.

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

3 participants