# compiling python3.13 alpha release on openbsd

**URL:** <https://discuss.python.org/t/compiling-python3-13-alpha-release-on-openbsd/50273>\
**Category:** Core Development\
**Created:** [April 4, 2024, 1:34pm UTC](https://discuss.python.org/t/compiling-python3-13-alpha-release-on-openbsd/50273 "2024-04-04T13:34:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KabiraK](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@KabiraK](https://discuss.python.org/u/KabiraK)\
**Post date:** [April 4, 2024, 1:34pm UTC](https://discuss.python.org/t/compiling-python3-13-alpha-release-on-openbsd/50273/1 "2024-04-04T13:34:39Z")

</div>

I just wanted to raise an issue regarding compiling Python on openbsd. I know that it is not supported but uptil 3.12 I have been able to compile and run on openbsd.  
However, I tried to checkout 3.13 and it seems Python may be introducing changes that will  
make compiling infeasible on openbsd.

```python
In file included from Objects/mimalloc/prim/prim.c:22,
                 from Objects/mimalloc/static.c:37,
                 from Objects/obmalloc.c:22:
Objects/mimalloc/prim/unix/prim.c: In function 'mi_prim_open':
Objects/mimalloc/prim/unix/prim.c:67:10: error: implicit declaration of function 'syscall'; did you mean 'sysconf'? [-Werror=implicit-function-declaration]
   return syscall(SYS_open,fpath,open_flags,0);
          ^ ~~~~~~
          sysconf

```

The error is same for both clang and gcc. Can’t we use expressions that are the same for both openbsd and linux?

If feasible, please consider the request.  
Thanks

---

<div class="post-metadata">

**Author:** ![guido](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guido/32/21_2.png) [@guido](https://discuss.python.org/u/guido)\
**Post date:** [April 4, 2024, 2:19pm UTC](https://discuss.python.org/t/compiling-python3-13-alpha-release-on-openbsd/50273/2 "2024-04-04T14:19:01Z")

</div>

Maybe @colesbury can help? Or you may have to file an issue with upstream mimalloc.

---

<div class="post-metadata">

**Author:** ![colesbury](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/colesbury/32/28031_2.png) [@colesbury](https://discuss.python.org/u/colesbury)\
**Post date:** [April 4, 2024, 3:03pm UTC](https://discuss.python.org/t/compiling-python3-13-alpha-release-on-openbsd/50273/3 "2024-04-04T15:03:52Z")

</div>

The `configure` script checks if mimalloc can be built, but I guess that’s not working on OpenBSD. We should be able to fix that as well as the underlying compile error in `mimalloc`.

For now, please use `./configure --without-mimalloc`

I’ve filed [mimalloc compile error on OpenBSD · Issue #117547 · python/cpython · GitHub](https://github.com/python/cpython/issues/117547) to track this.

---

<div class="post-metadata">

**Author:** ![colesbury](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/colesbury/32/28031_2.png) [@colesbury](https://discuss.python.org/u/colesbury)\
**Post date:** [April 4, 2024, 5:20pm UTC](https://discuss.python.org/t/compiling-python3-13-alpha-release-on-openbsd/50273/4 "2024-04-04T17:20:09Z")

</div>

@KabiraK, would you please verify that [gh-117547: Fix mimalloc compile error on OpenBSD by colesbury · Pull Request #117548 · python/cpython · GitHub](https://github.com/python/cpython/pull/117548) fixes the compile error on OpenBSD?
