Bug 2168154 - python-yara: relies on implicit function declarations due to python3-setuptools usage
Summary: python-yara: relies on implicit function declarations due to python3-setuptoo...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-yara
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ali Erdinc Koroglu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2153037
Blocks: PortingToModernCHelpNeeded
TreeView+ depends on / blocked
 
Reported: 2023-02-08 10:23 UTC by Florian Weimer
Modified: 2023-04-21 09:59 UTC (History)
3 users (show)

Fixed In Version: python-setuptools-67.6.1-1.fc39
Clone Of:
Environment:
Last Closed: 2023-04-21 09:21:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2023-02-08 10:23:03 UTC
The setup.py file contains this:

def has_function(function_name, include_dirs=None, libraries=None, library_dirs=None):
  """Checks if a given functions exists in the current platform."""
  compiler = distutils.ccompiler.new_compiler()
  with muted(sys.stdout, sys.stderr):
      result = compiler.has_function(
          function_name,
          include_dirs=include_dirs,
          libraries=libraries,
          library_dirs=library_dirs)
  if os.path.exists('a.out'):
    os.remove('a.out')
  return result

And with the current Fedora version of python3-setuptools, this triggers an implicit function declaration for memmem:

    if has_function('memmem'):
      module.define_macros.append(('HAVE_MEMMEM', '1'))

(And for strlcpy, strlcat as well, but those are fine because we do not actually implement them.)

I hope we can patch python3-setuptools soon, so that we do not need to workaround this in python-yara.

Comment 1 Florian Weimer 2023-04-21 09:21:41 UTC
Verified as fixed via bug 2153037.


Note You need to log in before you can comment on or make changes to this bug.