photoview icon indicating copy to clipboard operation
photoview copied to clipboard

Go dependencies fail to install

Open ronangaillard opened this issue 2 years ago • 3 comments

Describe the bug Follow the instructions lead to:

# github.com/strukturag/libheif/go/heif
../../go/pkg/mod/github.com/strukturag/[email protected]/go/heif/heif.go:269:37: could not determine kind of name for C.heif_suberror_Wrong_tile_image_pixel_depth

When building server.

To Reproduce Steps to reproduce the behavior:

  1. Follow all steps here https://photoview.github.io/en/docs/installation-manual/ till go build -v -o photoview .
  2. Run go build -v -o photoview .
  3. See build error

Expected behavior The build to be a success

Your environment: Feel free to remove and add what you think might be useful.

  • Are you using Docker? no
  • Database NA
  • Browser NA
  • Version master (commit c786217711520379bd5cdfd76636194a59174143) (but same error on 2.3.13)
  • uname -a : Linux nas 5.15.74-sunxi #22.08.6 SMP Tue Oct 18 07:00:33 UTC 2022 armv7l GNU/Linux

ronangaillard avatar Nov 15 '22 12:11 ronangaillard

It's important that your local installation of the libheif library is exactly the same as the version of the library specified in go.mod. It's currently v1.12.0

https://github.com/photoview/photoview/blob/c786217711520379bd5cdfd76636194a59174143/api/go.mod#L21

viktorstrate avatar Nov 15 '22 12:11 viktorstrate

Hi,

Thanks for your answer.

Sorry I'm not a go expert, but this means I'm fine right :

ronan@nas:~/photoview/api$ go list -m -u github.com/strukturag/libheif
github.com/strukturag/libheif v1.12.0 [v1.13.0]

?

ronangaillard avatar Nov 15 '22 13:11 ronangaillard

I installed libheif1 and libheif1-dev from the PPA repository as instructed, and ended up with version 1.14.2, according to dpkg. But when I run the same command as ronangaillard, I get this:

$ go list -m -u github.com/strukturag/libheif
github.com/strukturag/libheif v1.12.0 [v1.15.1]

I'm not getting a build error, though, just thought I'd add my experience to this.

myuseraccount avatar Mar 06 '23 20:03 myuseraccount

It looks to me like this is not a bug in the project, but a configuration issue in a client's environment. @jordy2254, do we need to document something somewhere in addition to the existing docs to make this more clear? If not, I'd like to close this issue as not planned

kkovaletp avatar May 09 '24 08:05 kkovaletp

@kkovaletp I don't think anything needs to be done here, this is all mostly down to linux package management and understanding of dependencies. A such, I'll close the issue. if it comes up again in the future some documentation may be useful.

jordy2254 avatar May 09 '24 19:05 jordy2254