Project

General

Profile

Actions

Bug #12215

closed

pyzfs module does not build with python 3.7

Added by Andy Fiddaman about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

When building gate on a system where the python3 version is 3.7, the pyzfs module fails to build with:

../common/ioctl.c: In function 'dict2nvl':
../common/ioctl.c:147:18: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   char *keystr = PyUnicode_AsUTF8(key);

This is because the function definition for PyUnicode_AsUTF8() changed between python 3.5 and python 3.7:

/usr/include/python3.7m/unicodeobject.h
1165:PyAPI_FUNC(const char *) PyUnicode_AsUTF8(PyObject *unicode);

/usr/include/python3.5m/unicodeobject.h
1162:PyAPI_FUNC(char *) PyUnicode_AsUTF8(PyObject *unicode);

Related issues

Related to illumos gate - Bug #12192: python3 modules treat strings incorrectlyClosed

Actions
Actions #1

Updated by Andy Fiddaman about 3 years ago

  • Related to Bug #12192: python3 modules treat strings incorrectly added
Actions #2

Updated by Andy Fiddaman about 3 years ago

Tested by building on OmniOS r151032, which builds this module with both python 2.7 and 3.5, and on OmniOS bloody which builds with python 3.7 only. The mail_msg was clean for both.

Actions #3

Updated by Electric Monk about 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit dbce3eaafc7c3dceff97b7ab4de9308eb77f5795

commit  dbce3eaafc7c3dceff97b7ab4de9308eb77f5795
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2020-01-21T15:17:45.000Z

    12215 pyzfs module does not build with python 3.7
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Paul Winder <paul@winders.demon.co.uk>
    Reviewed by: Alexander Pyhalov <apyhalov@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF