Update API with Debian trixie (#1286)

Fix #1273.

- Cleanup `libatlas-base-dev`

  `ATLAS` is an optimized BLAS implementation. Today, the project looks dead. The last stable release (3.10.3)
happened in 2016. The last development release (3.11.41, not packaged) was in 2018. The git repository has seen no commit since 2019. Debian decided to [remove all `libatlas` packages](https://lists.debian.org/debian-science/2023/07/msg00010.html), including `libatlas-base-dev` from `trixie`.

  `libatlas-base-dev` provides a unique `cblas` package with `pkg-config`. Debian provides [`blas`](https://lists.debian.org/debian-science/2023/07/msg00012.html) to cover all the feature in `cblas`. `go-face` already depends on [`blas`](0c14797b4d/face.go (L4)), and it's safe to remove `cblas`.

  Maybe we should fork `go-face` and put those changes in the foked repo.

- Renaming `exiftool`

  In `trixie`, `exiftool` package is renamed as `libimage-exiftool-perl`.
This commit is contained in:
Googol Lee
2025-08-20 21:29:03 +02:00
committed by GitHub
parent 35e65caf7c
commit 03b290eba7
5 changed files with 24 additions and 14 deletions

View File

@@ -270,14 +270,14 @@ We can't keep verifying below commands on each environment. People may need to s
- Required packages:
- `golang` >= 1.22
- `g++`
- `libc-dev`
- `libheif` >= 1.15.1
- [go-face Requirements](https://github.com/Kagami/go-face#requirements)
- `dlib`
- `libjpeg`
- `libblas`
- `libcblas`, recommended using `libatlas-base` in Debian.
- `liblapack`
- `libmagic`
- `libmagickwand`
- Optional tools during developing:
- [`reflex`](https://github.com/cespare/reflex): a source code monitoring tool, which automatically rebuilds and restarts the server, running from the code in development.
- `sqlite`: the SQLite DBMS, useful to interact with Photoview's SQLite DB directly if you use it in your development environment.
@@ -289,7 +289,7 @@ In Debian/Ubuntu, install dependencies:
```sh
$ sudo apt update # Update the package list
$ sudo apt install golang g++ libc-dev libheif-dev libdlib-dev libjpeg-dev libblas-dev libatlas-base-dev liblapack-dev # For API requirement
$ sudo apt install golang g++ libheif-dev libdlib-dev libjpeg-dev libblas-dev liblapack-dev libmagic-dev libmagickwand-dev # For API requirement
$ sudo apt install reflex sqlite3 # For API optional tools
```
@@ -331,14 +331,23 @@ Then run the following commands:
```bash
# Optional: Set the compiler environment in Debian/Ubuntu
$ source ./scripts/set_compiler_env.sh
# Set the compiler environment with `homebrew`
$ export CPLUS_INCLUDE_PATH="$(brew --prefix)/opt/jpeg/include:$(brew --prefix)/opt/dlib/include:${CPLUS_INCLUDE_PATH:-}"
$ export C_INCLUDE_PATH="$(brew --prefix)/opt/libmagic/include:$(brew --prefix)/opt/libheif/include:${C_INCLUDE_PATH:-}"
$ export DYLD_LIBRARY_PATH="$(brew --prefix)/opt/jpeg/lib:$(brew --prefix)/opt/dlib/lib:$(brew --prefix)/opt/libmagic/lib:$(brew --prefix)/opt/libheif/lib:${DYLD_LIBRARY_PATH:-}"
$ export LIBRARY_PATH="$(brew --prefix)/opt/jpeg/lib:$(brew --prefix)/opt/dlib/lib:$(brew --prefix)/opt/libmagic/lib:$(brew --prefix)/opt/libheif/lib:${LIBRARY_PATH:-}"
$ export CGO_CFLAGS_ALLOW=-Xpreprocessor
# Start API server
$ cd ./api
$ go mod download
# Update go-face dependencies
$ sed -i 's/-lcblas//g' $(go env GOMODCACHE)/github.com/\!kagami/go-face*/face.go # Linux
# Or
$ sed -i '' 's/-lcblas//g' $(go env GOMODCACHE)/github.com/\!kagami/go-face*/face.go # macOS
# Start API server
$ go run .
```