private-schrijfsels-en-noti.../2024/So you wanna do FreeBSD?.md

6.9 KiB
Raw Blame History

I have encountered several project now which are Linux container/docker "native" installation. Like PhotoPrism and HomeAssistant. Yeah software dependencies are hard for developers and maintainers. But ending your software on just one install method is a "quick-fix". Apple macOS tries to "fix this" by putting everything of an application in a folder suffixed as .app. No this are no containers but all application dependencies reside in this folder. The price you pay is more disk space when multiple applications use same "Apple .framework" or libraries and other executables.

It seems nowadays the quick-fix is to enforce people using Docker for production and when that is not available it will be wrapped again in a native Linux virtual machine. So you are almost out of luck running it otherwise. Gitlab is another beast, it runs on ruby and it has "omnibus" host installer. Which just basicly Gitlab-fies your whole OS.

Why on earth do people think we can get rid of ALL software written in C/C++ converted to the promised better language Rust. As Python is executing cc ?

last pid:  5386;  load averages:  1.48,  1.51,  1.61                                                                   up 35+20:47:26  17:47:34
14 processes:  2 running, 12 sleeping
CPU: 24.9% user, 20.4% nice,  6.5% system,  0.0% interrupt, 48.2% idle
Mem: 810M Active, 773M Inact, 506M Laundry, 1627M Wired, 385M Buf, 111M Free
ARC: 282M Total, 98M MFU, 50M MRU, 599K Anon, 6378K Header, 123M Other
     75M Compressed, 415M Uncompressed, 5.57:1 Ratio
Swap: 2689M Total, 500M Used, 2190M Free, 18% Inuse

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
 4564 homeassist    1 135    0   239M   159M CPU1     1   0:41  99.88% cc
78755 homeassist    1  20    0    17M  5072K select   1   0:01   0.20% tmux
 2726 homeassist    1  20    0    14M  2980K CPU2     2   0:00   0.17% top
96466 homeassist   10  20    0   183M   115M kqread   0   0:06   0.03% python3.11
  674 homeassist    1  68    0   208M   180M wait     0   1:43   0.00% python3.11
97272 homeassist    1  20    0    99M    77M piperd   1   0:05   0.00% python3.11
99599 homeassist    1  68    0    57M    40M wait     0   0:01   0.00% python3.11
   25 homeassist    1  21    0    16M  3616K pause    2   0:00   0.00% csh
89135 homeassist    1  20    0    13M  2612K wait     2   0:00   0.00% sh
81771 homeassist    1  20    0    13M  2664K ttyin    1   0:00   0.00% sh
79030 homeassist    1  63    0    13M  2672K wait     0   0:00   0.00% sh
 1361 homeassist    1  24    0    13M  2752K wait     3   0:00   0.00% sh
98234 homeassist    1  20    0    13M  2656K ttyin    1   0:00   0.00% sh
81501 homeassist    1  20    0    14M  3644K select   1   0:00   0.00% tmux

The "modern" software landscape is getting messy!

It is such a mess to run HomeAssistant native on FreeBSD you need to install some binary packages with pkg from FreeBSD binary ports. Then Python pip install some extra packages in a virtual environment and finally the application Python runs the cc (c compiler) itself! Even using meson build system as intermediate. We need Python cryptography dependency to use the Rust compiler as the devs have decided to not proceed with (accelerated) crypto implemented in C. I think if you further want to get into the dependency hell we need Library X written in C++ and wrap it under Python. Then a C++ runtime is also needed...

https://devhumor.com/media/monkeyuser-npm-package-delivery

https://developer.apple.com/library/archive/documentation/General/Conceptual/DevPedia-CocoaCore/Framework.html

ImportError: /data/homeassistant/lib/python3.11/site-packages/numpy/core/_multiarray_tests.cpython-311.so: Undefined symbol "ccosl"

https://github.com/numpy/numpy/issues/24873

note: This error originates from a subprocess, and is likely not a problem with pip.
2024-11-08 19:00:58.632 INFO (SyncWorker_5) [homeassistant.util.package] Attempting install of webrtc-noise-gain==1.2.3
2024-11-08 19:01:13.568 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package webrtc-noise-gain==1.2.3: error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/data/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/data/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/data/homeassistant/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ih3jdwtb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ih3jdwtb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 303, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-ih3jdwtb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 521, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-ih3jdwtb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 319, in run_setup
          exec(code, locals())
        File "<string>", line 384, in <module>
      ValueError: Unsupported system: freebsd
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
2024-11-08 19:02:25.055 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package ha-av==10.1.1: error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      Package libavformat was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavformat.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libavformat' not found
      Package 'libavcodec' not found
      Package 'libavdevice' not found
      Package 'libavutil' not found
      Package 'libavfilter' not found
      Package 'libswscale' not found
      Package 'libswresample' not found
      pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
pkg install py311-ffmpeg-python-0.2.0_1