[GH-ISSUE #711] Build Errors On FreeBSD #520

Closed
opened 2026-05-07 00:25:02 +02:00 by BreizhHardware · 3 comments

Originally created by @schrodyn on GitHub (Apr 28, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/711

I would really like to try out Nfty but I'm solely a FreeBSD user on all servers. Getting build errors for Nfty on FreeBSD 13.1. Can you help or consider FreeBSD for your releases? You consider every other OS but not the BSDs.

$ pwd
/home/schrodinger/src/ntfy-2.4.0
$ make build
cd web && npm install
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.

added 1487 packages, and audited 1488 packages in 17s

245 packages are looking for funding
  run `npm fund` for details

6 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New patch version of npm available! 9.6.4 -> 9.6.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.5
npm notice Run npm install -g npm@9.6.5 to update!
npm notice
cd web  && npm run build  && mv build/index.html build/app.html  && rm -rf ../server/site  && mv build ../server/site  && rm  ../server/site/config.js  ../server/site/asset-manifest.json

> ntfy@1.0.0 build
> react-scripts build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  313.97 kB  build/static/js/main.80de9c45.js

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment

pip3 install -r requirements.txt
make: exec(pip3) failed (No such file or directory)
*** Error code 1

Stop.
make: stopped in /usr/home/schrodinger/src/ntfy-2.4.0
Originally created by @schrodyn on GitHub (Apr 28, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/711 I would really like to try out Nfty but I'm solely a FreeBSD user on all servers. Getting build errors for Nfty on FreeBSD 13.1. Can you help or consider FreeBSD for your releases? You consider every other OS but not the BSDs. ``` $ pwd /home/schrodinger/src/ntfy-2.4.0 $ make build cd web && npm install npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. added 1487 packages, and audited 1488 packages in 17s 245 packages are looking for funding run `npm fund` for details 6 high severity vulnerabilities To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. npm notice npm notice New patch version of npm available! 9.6.4 -> 9.6.5 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.5 npm notice Run npm install -g npm@9.6.5 to update! npm notice cd web && npm run build && mv build/index.html build/app.html && rm -rf ../server/site && mv build ../server/site && rm ../server/site/config.js ../server/site/asset-manifest.json > ntfy@1.0.0 build > react-scripts build Creating an optimized production build... Compiled successfully. File sizes after gzip: 313.97 kB build/static/js/main.80de9c45.js The project was built assuming it is hosted at /. You can control this with the homepage field in your package.json. The build folder is ready to be deployed. You may serve it with a static server: npm install -g serve serve -s build Find out more about deployment here: https://cra.link/deployment pip3 install -r requirements.txt make: exec(pip3) failed (No such file or directory) *** Error code 1 Stop. make: stopped in /usr/home/schrodinger/src/ntfy-2.4.0 ```
BreizhHardware 2026-05-07 00:25:02 +02:00
Author
Owner

@binwiederhier commented on GitHub (Apr 28, 2023):

make: exec(pip3) failed (No such file or directory) implies that you do not have Python installed, or at least that pip3 is not available.

I am happy to consider BSD-type systems, though I don't know anything about *BSD, so it's hard/impossible for me to consider or test it. I'd be more than happy to accept PRs to extend the build toolchain and include FreeBSD and others.

Also see: #162

<!-- gh-comment-id:1527540084 --> @binwiederhier commented on GitHub (Apr 28, 2023): `make: exec(pip3) failed (No such file or directory)` implies that you do not have Python installed, or at least that `pip3` is not available. I am happy to consider BSD-type systems, though I don't know anything about *BSD, so it's hard/impossible for me to consider or test it. I'd be more than happy to accept PRs to extend the build toolchain and include FreeBSD and others. Also see: #162
Author
Owner

@schrodyn commented on GitHub (Apr 28, 2023):

I tried the OpenBSD solution but it doesn't translate to FreeBSD. I tried to work around the python problem with a venv but I'm getting more problems related to dependencies. Unfortunately I'll consider ntfy incompatible with FreeBSD for now. Shame, I like your project. An alternative might be an Ubuntu jail (FreeBSD containers) but feels like overkill.

Just FYI the current errors:

Collecting six>=1.5 (from python-dateutil>=2.8.1->ghp-import>=1.0->mkdocs>=1.4.2->mkdocs-material->-r requirements.txt (line 2))
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: csscompressor, jsmin, regex, MarkupSafe, pyyaml, watchdog
  Building wheel for csscompressor (setup.py) ... done
  Created wheel for csscompressor: filename=csscompressor-0.9.5-py3-none-any.whl size=240333 sha256=982acb770d8f7377fe84221489a53350dd3e1721494abfffe373e2cb241c9c35
  Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/b9/97/af/2636f782de9bded12dfea15ea66cc77e01937e6b0916a3353c
  Building wheel for jsmin (setup.py) ... done
  Created wheel for jsmin: filename=jsmin-3.0.1-py3-none-any.whl size=13765 sha256=6e8503aee921da3f5930e60791f13c974cbbcc8a4229ae72f18fa3fef63eebc9
  Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/b1/2d/bd/fafa1f2a88e2f23e0e4eb50b0852a67268eed958096a02c03f
  Building wheel for regex (setup.py) ... done
  Created wheel for regex: filename=regex-2023.3.23-cp311-cp311-freebsd_13_1_release_p6_amd64.whl size=292711 sha256=d233a7b2f7306c9699ae5e4397b3e97343ab8f7368bf37e88b31a94348b2fd6c
  Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/99/ef/3a/307139e5aa4cf80c007432f70f22ecc0e5638082c5105a5fc6
  Building wheel for MarkupSafe (setup.py) ... done
  Created wheel for MarkupSafe: filename=MarkupSafe-2.1.2-cp311-cp311-freebsd_13_1_release_p6_amd64.whl size=15425 sha256=7c1ba91e80cd55adad97436874657e243db9fe47df5b88fdfa12a11467503100
  Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/01/81/5f/04fdc32056d8410469bd24a28bd60dfa5be60e0d12fd1bf8ea
  Building wheel for pyyaml (pyproject.toml) ... done
  Created wheel for pyyaml: filename=PyYAML-6.0-cp311-cp311-freebsd_13_1_release_p6_amd64.whl size=45344 sha256=e31b456d9d29741c71b48b60c72e2eb2cdc8fb4320ec83b1ed3212c6e78ebb17
  Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/3c/de/35/2cbb99955fa449eeddb2b433b4369035ee5bdf0fc121035ffe
  Building wheel for watchdog (setup.py) ... done
  Created wheel for watchdog: filename=watchdog-3.0.0-py3-none-any.whl size=82036 sha256=7150527fae069459983266dc420e1bdc90c2ad2cb716a122bfc12872e70521a0
  Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/4d/58/44/2c9a2be09adb640c344be9970d37f88a4a78239b760bed8c55
Successfully built csscompressor jsmin regex MarkupSafe pyyaml watchdog
Installing collected packages: jsmin, htmlmin2, csscompressor, watchdog, urllib3, six, regex, pyyaml, pygments, mkdocs-material-extensions, mergedeep, MarkupSafe, markdown, idna, colorama, click, charset-normalizer, certifi, requests, pyyaml-env-tag, python-dateutil, pymdown-extensions, jinja2, ghp-import, mkdocs, mkdocs-simple-hooks, mkdocs-minify-plugin, mkdocs-material
Successfully installed MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-3.1.0 click-8.1.3 colorama-0.4.6 csscompressor-0.9.5 ghp-import-2.1.0 htmlmin2-0.1.13 idna-3.4 jinja2-3.1.2 jsmin-3.0.1 markdown-3.3.7 mergedeep-1.3.4 mkdocs-1.4.2 mkdocs-material-9.1.8 mkdocs-material-extensions-1.1.1 mkdocs-minify-plugin-0.6.4 mkdocs-simple-hooks-0.1.5 pygments-2.15.1 pymdown-extensions-9.11 python-dateutil-2.8.2 pyyaml-6.0 pyyaml-env-tag-0.1 regex-2023.3.23 requests-2.29.0 six-1.16.0 urllib3-1.26.15 watchdog-3.0.0
  File "<stdin>", line 1
    -e import sys\nif sys.version_info < (3,8):\n exit(1)
       ^^^^^^
SyntaxError: invalid syntax
/usr/local/bin/python3.8
python3.8  build
python3.8: can't open file 'build': [Errno 2] No such file or directory
*** Error code 2

Stop.
make: stopped in /usr/home/schrodinger/src/ntfy-2.4.0

I'll go ahead and close the issue and thanks for getting back to me.

<!-- gh-comment-id:1528080643 --> @schrodyn commented on GitHub (Apr 28, 2023): I tried the OpenBSD solution but it doesn't translate to FreeBSD. I tried to work around the python problem with a venv but I'm getting more problems related to dependencies. Unfortunately I'll consider ntfy incompatible with FreeBSD for now. Shame, I like your project. An alternative might be an Ubuntu jail (FreeBSD containers) but feels like overkill. Just FYI the current errors: ``` Collecting six>=1.5 (from python-dateutil>=2.8.1->ghp-import>=1.0->mkdocs>=1.4.2->mkdocs-material->-r requirements.txt (line 2)) Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Building wheels for collected packages: csscompressor, jsmin, regex, MarkupSafe, pyyaml, watchdog Building wheel for csscompressor (setup.py) ... done Created wheel for csscompressor: filename=csscompressor-0.9.5-py3-none-any.whl size=240333 sha256=982acb770d8f7377fe84221489a53350dd3e1721494abfffe373e2cb241c9c35 Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/b9/97/af/2636f782de9bded12dfea15ea66cc77e01937e6b0916a3353c Building wheel for jsmin (setup.py) ... done Created wheel for jsmin: filename=jsmin-3.0.1-py3-none-any.whl size=13765 sha256=6e8503aee921da3f5930e60791f13c974cbbcc8a4229ae72f18fa3fef63eebc9 Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/b1/2d/bd/fafa1f2a88e2f23e0e4eb50b0852a67268eed958096a02c03f Building wheel for regex (setup.py) ... done Created wheel for regex: filename=regex-2023.3.23-cp311-cp311-freebsd_13_1_release_p6_amd64.whl size=292711 sha256=d233a7b2f7306c9699ae5e4397b3e97343ab8f7368bf37e88b31a94348b2fd6c Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/99/ef/3a/307139e5aa4cf80c007432f70f22ecc0e5638082c5105a5fc6 Building wheel for MarkupSafe (setup.py) ... done Created wheel for MarkupSafe: filename=MarkupSafe-2.1.2-cp311-cp311-freebsd_13_1_release_p6_amd64.whl size=15425 sha256=7c1ba91e80cd55adad97436874657e243db9fe47df5b88fdfa12a11467503100 Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/01/81/5f/04fdc32056d8410469bd24a28bd60dfa5be60e0d12fd1bf8ea Building wheel for pyyaml (pyproject.toml) ... done Created wheel for pyyaml: filename=PyYAML-6.0-cp311-cp311-freebsd_13_1_release_p6_amd64.whl size=45344 sha256=e31b456d9d29741c71b48b60c72e2eb2cdc8fb4320ec83b1ed3212c6e78ebb17 Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/3c/de/35/2cbb99955fa449eeddb2b433b4369035ee5bdf0fc121035ffe Building wheel for watchdog (setup.py) ... done Created wheel for watchdog: filename=watchdog-3.0.0-py3-none-any.whl size=82036 sha256=7150527fae069459983266dc420e1bdc90c2ad2cb716a122bfc12872e70521a0 Stored in directory: /usr/home/schrodinger/.cache/pip/wheels/4d/58/44/2c9a2be09adb640c344be9970d37f88a4a78239b760bed8c55 Successfully built csscompressor jsmin regex MarkupSafe pyyaml watchdog Installing collected packages: jsmin, htmlmin2, csscompressor, watchdog, urllib3, six, regex, pyyaml, pygments, mkdocs-material-extensions, mergedeep, MarkupSafe, markdown, idna, colorama, click, charset-normalizer, certifi, requests, pyyaml-env-tag, python-dateutil, pymdown-extensions, jinja2, ghp-import, mkdocs, mkdocs-simple-hooks, mkdocs-minify-plugin, mkdocs-material Successfully installed MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-3.1.0 click-8.1.3 colorama-0.4.6 csscompressor-0.9.5 ghp-import-2.1.0 htmlmin2-0.1.13 idna-3.4 jinja2-3.1.2 jsmin-3.0.1 markdown-3.3.7 mergedeep-1.3.4 mkdocs-1.4.2 mkdocs-material-9.1.8 mkdocs-material-extensions-1.1.1 mkdocs-minify-plugin-0.6.4 mkdocs-simple-hooks-0.1.5 pygments-2.15.1 pymdown-extensions-9.11 python-dateutil-2.8.2 pyyaml-6.0 pyyaml-env-tag-0.1 regex-2023.3.23 requests-2.29.0 six-1.16.0 urllib3-1.26.15 watchdog-3.0.0 File "<stdin>", line 1 -e import sys\nif sys.version_info < (3,8):\n exit(1) ^^^^^^ SyntaxError: invalid syntax /usr/local/bin/python3.8 python3.8 build python3.8: can't open file 'build': [Errno 2] No such file or directory *** Error code 2 Stop. make: stopped in /usr/home/schrodinger/src/ntfy-2.4.0 ``` I'll go ahead and close the issue and thanks for getting back to me.
Author
Owner

@ifreislich commented on GitHub (Jun 23, 2023):

For what it's worth, I managed to compile 4c7dc4c1ba yesterday using

goreleaser build --snapshot --clean --id ntfy_freebsd_amd64

After the following patch:

diff --git a/.goreleaser.yml b/.goreleaser.yml
index 131a302..911bbd7 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -3,6 +3,16 @@ before:
     - go mod download
     - go mod tidy
 builds:
+  -
+    id: ntfy_freebsd_amd64
+    binary: ntfy
+    env:
+      - CGO_ENABLED=1 # required for go-sqlite3
+    tags: [sqlite_omit_load_extension,osusergo,netgo]
+    ldflags:
+      - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
+    goos: [freebsd]
+    goarch: [amd64]
   -
     id: ntfy_linux_amd64
     binary: ntfy
diff --git a/Makefile b/Makefile
index 8cb7523..f72d764 100644
--- a/Makefile
+++ b/Makefile
@@ -111,7 +111,7 @@ build-deps-ubuntu:
 docs: docs-deps docs-build
 
 docs-build: .PHONY
-       @if ! /bin/echo -e "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \
+       @if ! /usr/bin/printf "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \
          if which python3.8; then \
                echo "python3.8 $(shell which mkdocs) build"; \
            python3.8 $(shell which mkdocs) build; \

I'll clean this up and submit a pull request when I have time, but hopefully this is enough to get you going.

<!-- gh-comment-id:1604760392 --> @ifreislich commented on GitHub (Jun 23, 2023): For what it's worth, I managed to compile 4c7dc4c1ba166c386894c4c199129d9959618319 yesterday using goreleaser build --snapshot --clean --id ntfy_freebsd_amd64 After the following patch: ``` diff --git a/.goreleaser.yml b/.goreleaser.yml index 131a302..911bbd7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,6 +3,16 @@ before: - go mod download - go mod tidy builds: + - + id: ntfy_freebsd_amd64 + binary: ntfy + env: + - CGO_ENABLED=1 # required for go-sqlite3 + tags: [sqlite_omit_load_extension,osusergo,netgo] + ldflags: + - "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}" + goos: [freebsd] + goarch: [amd64] - id: ntfy_linux_amd64 binary: ntfy diff --git a/Makefile b/Makefile index 8cb7523..f72d764 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ build-deps-ubuntu: docs: docs-deps docs-build docs-build: .PHONY - @if ! /bin/echo -e "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \ + @if ! /usr/bin/printf "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \ if which python3.8; then \ echo "python3.8 $(shell which mkdocs) build"; \ python3.8 $(shell which mkdocs) build; \ ``` I'll clean this up and submit a pull request when I have time, but hopefully this is enough to get you going.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#520
No description provided.