huo-ju / photoprism-freebsd-port

The photoprism port for FreeBSD
BSD 2-Clause "Simplified" License
69 stars 15 forks source link

Update to 211210 release #31

Closed dml33 closed 2 years ago

dml33 commented 2 years ago

Hi.

Could the port be updated to 211210 Release?

https://github.com/photoprism/photoprism/releases/tag/211210-2cb90e7e

Thanks!

huo-ju commented 2 years ago

The 211210 release of photoprism has upgraded to Go 1.17.5, but the Go version in the Freebsd ports is 1.17.1 https://www.freshports.org/lang/go/

We have to wait several days for freebsd Upgrade their ports. The upgrade was related with CVE-2021-44716, and I think it will happen soon.

psa commented 2 years ago

I've been trying to do this, but 16 GiB RAM doesn't seem to be sufficient. Attempts to get node to use less RAM haven't worked so far and I'm open to ideas...

<s> [webpack.Progress] 10% building
<s> [webpack.Progress] 10% building 0/1 entries 0/0 dependencies 0/0 modules
(node:56936) [DEP_WEBPACK_COMPILATION_CACHE] DeprecationWarning: Compilation.cache
 was removed in favor of Compilation.getCache()
(Use `node --trace-deprecation ...` to show where the warning was created)
<s> [webpack.Progress] 10% building import loader ./node_modules/babel-loader/lib/
index.js
<s> [webpack.Progress] 10% building 0/2 entries 2/2 dependencies 0/2 modules
/wrkdirs/usr/ports/www/photoprism/work-default/photoprism-93b26f197908dd825dfa302d
17793185cc3eab8c/frontend/node_modules/webpack/lib/util/hash/wasm-hash.js:154
                        new WebAssembly.Instance(wasmModule),
                        ^

RangeError: WebAssembly.Instance(): Out of memory: wasm memory
    at create (/wrkdirs/usr/ports/www/photoprism/work-default/photoprism-93b26f197
908dd825dfa302d17793185cc3eab8c/frontend/node_modules/webpack/lib/util/hash/wasm-h
ash.js:154:4)
psa commented 2 years ago

Also, current release is now 211215

dml33 commented 2 years ago

Hi.

How about this link? https://stackoverflow.com/questions/68991747/rangeerror-webassembly-instantiate-out-of-memory-wasm-memory

or maybe this

https://stackoverflow.com/questions/65856300/wasm-code-commit-allocation-failed-process-out-of-memory

Good luck!

psa commented 2 years ago

Thanks, I should have been more specific.

I've tried --max_old_space_size=4096 (and various permutations), but it still runs out. There's also plenty of RAM as far as I can tell (my jail usage graph shows over 15 GiB available).

I thought it might be because bazel was hogging all the ram and added a shutdown to the build target, but that didn't work either.

Curiously, if I login to the jail and manually run a build after it fails, it works fine and makes it even more mind boggling.

huo-ju commented 2 years ago

The repo has been upgrade to 20211215 release, with go 1.17 dependency.

Could you guys try if it works on your system? Thanks.

psa commented 2 years ago

I'm running the latest release (and have uploaded binaries on my repositories), so I think this can be closed.

In order to solve the memory issue I jumped to node 17 and allocated 16 GiB of RAM to poudriere.

dml33 commented 2 years ago

Hi. Sorry for trying this so late. I was on holidays.

I was only wanted to tell you that I have just compiled the port with go in version 1.17.1 without any errors or warnings, although version 1.17.5 is required in the Makefile. "found" was stated on the dependency check.

root@Emby2:~/photoprism-freebsd-port # pkg info go
go-1.17.1,1
Name           : go
Version        : 1.17.1,1
Installed on   : Fri Dec  3 16:49:09 2021 UTC
Origin         : lang/go
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : lang
Licenses       : BSD3CLAUSE
Maintainer     : ygy@FreeBSD.org
WWW            : https://golang.org
Comment        : Go programming language
Annotations    :
        FreeBSD_version: 1202000
        cpe            : cpe:2.3:a:golang:go:1.17.1:::::freebsd12:x64
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 301MiB
Description    :
Go is an open source programming environment that makes it easy to build
simple, reliable, and efficient software.

WWW: https://golang.org

My FreeBSD jail is running on quarterly and 1.17.1 is the current go version. Version 1.17.5 is still in latest, although soon will be in quarterly.

https://www.freshports.org/lang/go

Now, I am compiling psa libtensorflow1-freebsd-port, since when I did

make reinstall

the libtensorflow1 library formerly compiled for the g20211130 was removed.

Great job for you both. I hope libtensorflow1 port is soon accepted!