workaround for ruamel.yaml.clib error (it fails to compile with clang > =16)
Closed this issue · 0 comments
tingox commented
Environment
nikola running in a Python venv
Python Version:
(nikola) tingo@kg-core2:~/personal/projects/nikola % which python
/usr/home/tingo/.venv/nikola/bin/python
(nikola) tingo@kg-core2:~/personal/projects/nikola % python --version
Python 3.11.9
Nikola Version:
(nikola) tingo@kg-core2:~/personal/projects/nikola % nikola version
Nikola v8.3.1
Operating System:
nikola) tingo@kg-core2:~/personal/projects/nikola % freebsd-version -ku
13.4-RELEASE-p1
13.4-RELEASE-p1
(nikola) tingo@kg-core2:~/personal/projects/nikola % uname -a
FreeBSD kg-core2.kg4.no 13.4-RELEASE-p1 FreeBSD 13.4-RELEASE-p1 GENERIC amd64
Description:
There is a bug in ruamel.yaml.clib #22 it fails to compile with clang 16 (or newer). This makes it hard to install nikola on FreeBSD, which has clang as default compiler. FreeBSD 13.4 has clang 18
(nikola) tingo@kg-core2:~/personal/projects/nikola % which cc
/usr/bin/cc
(nikola) tingo@kg-core2:~/personal/projects/nikola % cc --version
FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)
Target: x86_64-unknown-freebsd13.4
Thread model: posix
InstalledDir: /usr/bin
a patch for ruamel.yaml.clib exists in the FreeBSD port, but is not currently in upstream. Until this issue is fixed, the following workaround can be used:
- download ruamel.yaml.clib locally, using
pip download
for example, also download or get the patch file from FreeBSD. - patch the source file with the patch from the FreeBSD port
- install Nikola like this
bin/python -m pip install -U "Nikola[extras]" ./ruamel.yaml.clib-0.2.8
(refer to the location of your locally patched ruamel.yaml.clib source) - profit