Built Python 3.14 Dragonfly 6.4

Autumn Jolitz autumn.jolitz at gmail.com
Sun Mar 1 12:07:49 PST 2026


I was able to compile Python 3.14 just now. It took some finagling.

I’ve added a patch for getting process memory usage.

I created a hammer2 pfs at /opt/python3.14 as my experimental bed (hammer2 pfs-create opt.python3.14 && mkdir /opt/python3.14 && mount @opt.python3.14 /opt/python3.14)

Steps:

- pkg install gcc14
- git clone -b 3.14 https://github.com/python/cpython.git
- cd cpython
- apply the attached patch (or not lol)
- env \
    PATH=$PATH \
    CC=gcc14     \
    CXX=c++14     \
    CPP=cpp14     \
    LDFLAGS='-L/usr/local/lib' \
    CPPFLAGS='-I/usr/local/include' \
    LIBS='-lkvm -lintl' \
    ./configure \
        --prefix=/opt/python3.14 \
        --sysconfdir /usr/local/etc \
        --localstatedir /var \
        --with-ensurepip=no \
        --disable-gil \
        --with-strict-overflow \
        --enable-shared \
        --enable-safety \
        --enable-big-digits=30 \
        --with-remote-debug \
        --with-openssl-rpath=auto \
        --with-hash-algorithm=siphash24 \
        --with-mimalloc \
        --with-computed-gotos \
        --enable-pystats \
        --enable-loadable-sqlite-extensions \
        --with-builtin-hashlib-hashes=md5,sha1,sha2,sha3,blake2
- make
- sudo -H make install
- echo '/opt/python3.14/lib' | sudo tee /usr/local/libdata/ldconfig/python3.14


Issues:
- had to add `-lkvm` to LIBS which in turn forced `-lintl` to be added to LIBS or else it would fail to add libintl into the modules
- had to add `-L/usr/local/lib` for `-lkvm` to work
- the tests have some failures
- the build flag `—enable-optimizations` requires the tests to pass
- building with gcc15 doesn’t work, nor does llvm18

I would have liked to do this on dragonfly/master instead of dragonfly/6_4_RELEASE but the latest kernel doesn’t seem to recognize disklabels for MBR formatted SATA drives.

Autumn



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20260301/4f20d963/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-Python-gc_freethreading.c
Type: application/octet-stream
Size: 1400 bytes
Desc: not available
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20260301/4f20d963/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20260301/4f20d963/attachment-0001.htm>


More information about the Users mailing list