Joshua Haberman - 2021-03-21

I was able to solve this with the following patch:

diff -r 85a4f0350abb setuptools_zig.py
--- a/setuptools_zig.py Fri Dec 04 22:16:55 2020 +0100
+++ b/setuptools_zig.py Sun Mar 21 15:16:38 2021 -0700
@@ -29,7 +29,7 @@
         target = Path(self.get_ext_fullpath(ext.name))

         zig = os.environ.get('PY_ZIG', 'zig')  # override zig in path with specific version
-        bld_cmd = [zig, 'build-lib', '-dynamic', '-DPYHEXVER={}'.format(sys.hexversion), '--name', output.stem]
+        bld_cmd = [zig, 'build-lib', '-dynamic', '-DPYHEXVER={}'.format(sys.hexversion), '--name', output.stem, '--library', 'c']
         for inc_dir in self.compiler.include_dirs:
             bld_cmd.extend(('-I', inc_dir))
         bld_cmd.extend(('-I', '/usr/include'))