Skip to content

Cython Compile failure on RHEL8 with PySlurm 21.08.4. #236

@bviviano

Description

@bviviano

Details

  • Slurm Version: 21.08.8
  • Python Version: 3.6.8
  • Cython Version: 0.29.30
  • PySlurm Branch: Release 21.08.4
  • Linux Distribution: RHEL8

Issue

I am attempting to build PySlurm from release tar.gz 21.08.4 against Slurm 21.08.8, for use with with Slurm-web 2.4.0, but am getting a cython error on build of pyslurm 21.08.4. I've created a python virtual environment and installed cython into it:

$ /bin/python3 -m venv /local/slurm-web
$ /local/slurm-web/bin/pip3 install --upgrade pip
$ /local/slurm-web/bin/pip3 install Cython

When I go to "build" PySlurm from that virtual environment, it errors out:

$ /local/slurm-web/bin/python3 setup.py build --slurm-lib=/usr/local/lib64 --slurm-inc=/usr/local/include
INFO: 
INFO: Building PySlurm (21.08.4.0)
INFO: ------------------------------
INFO: 
INFO: Cython version 0.29.30 installed
INFO: 
INFO: Clean - checking for objects to clean
INFO: Clean - completed
INFO: Build - Found Slurm header in /usr/local/include/slurm
INFO: Build - Detected Slurm version - 0x150808 21.08.08
INFO: Build - Found Slurm shared library in /usr/local/lib64
INFO: Build - Generating pyslurm/bluegene.pxi file
/local/slurm-web/lib64/python3.6/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '21.08.4.0' to '21.8.4.0'
  normalized_version,
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/pyslurm
copying pyslurm/__init__.py -> build/lib.linux-x86_64-3.6/pyslurm
copying pyslurm/__version__.py -> build/lib.linux-x86_64-3.6/pyslurm
running build_ext
cythoning pyslurm/pyslurm.pyx to pyslurm/pyslurm.c
warning: pyslurm/slurm.pxd:3801:8: 'SLURMDB_USER_FLAG_NONE' redeclared 
warning: pyslurm/slurm.pxd:3802:8: 'SLURMDB_USER_FLAG_DELETED' redeclared 
warning: pyslurm/slurm.pxd:3834:8: 'SLURMDB_WCKEY_FLAG_NONE' redeclared 
warning: pyslurm/slurm.pxd:3835:8: 'SLURMDB_WCKEY_FLAG_DELETED' redeclared 

Error compiling Cython file:
------------------------------------------------------------
...
#
# Trigger Get/Set/Update Class
#


cdef class trigger:
    ^
------------------------------------------------------------

pyslurm/pyslurm.pyx:3819:5: Compiler crash in AnalyseDeclarationsTransform

ModuleNode.body = StatListNode(pyslurm.pyx:4:0)
StatListNode.stats[133] = StatListNode(pyslurm.pyx:3819:5)
StatListNode.stats[0] = CClassDefNode(pyslurm.pyx:3819:5,
    as_name = 'trigger',
    class_name = 'trigger',
    module_name = '',
    visibility = 'private')

Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/local/slurm-web/lib64/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 1636, in visit_CClassDefNode
    self._inject_pickle_methods(node)
  File "/local/slurm-web/lib64/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 1719, in _inject_pickle_methods
    for mkchecksum in checksum_algos
  File "/local/slurm-web/lib64/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 1719, in <listcomp>
    for mkchecksum in checksum_algos
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
building 'pyslurm.pyslurm' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/pyslurm
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/local/include -I. -I/local/slurm-web/include -I/usr/include/python3.6m -c pyslurm/pyslurm.c -o build/temp.linux-x86_64-3.6/pyslurm/pyslurm.o
pyslurm/pyslurm.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^~~~~
error: command 'gcc' failed with exit status 1

Any suggestions on what I might be missing would be appreciated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions