Skip to content

[INSTALLATION ERROR] glibc version 2.34+ breaks sparse2d compile #182

@ycp21

Description

@ycp21

System setup
OS: Ubuntu 22.04
Python version: v3.9.13
Python environment (if any): [e.g.] conda v22.9.0

Describe the bug
I have a fresh Ubuntu 22.04 install and am trying to install pysap using a conda environment. During the build process I get this error:

      In file included from /usr/include/signal.h:328, 
                       from /tmp/pip-install-wveslvrw/python-pysap_13921de5483849278a21db4da4612bd5/build/temp.linux-x86_64-cpython-39/sparse2d/src/sparse2d/tests/catch.hpp:6467,  
                       from /tmp/pip-install-wveslvrw/python-pysap_13921de5483849278a21db4da4612bd5/build/temp.linux-x86_64-cpython-39/sparse2d/src/sparse2d/tests/mr_transform_test.cpp:3:  
      /tmp/pip-install-wveslvrw/python-pysap_13921de5483849278a21db4da4612bd5/build/temp.linux-x86_64-cpython-39/sparse2d/src/sparse2d/tests/catch.hpp:6490:33: error: size of array ‘altStackMem’ is not 
an integral constant-expression  
       6490 |         static char altStackMem[SIGSTKSZ];  
            |                                 ^~~~~~~~  
      /tmp/pip-install-wveslvrw/python-pysap_13921de5483849278a21db4da4612bd5/build/temp.linux-x86_64-cpython-39/sparse2d/src/sparse2d/tests/catch.hpp:6541:45: error: size of array ‘altStackMem’ is not an integral constant-expression  
       6541 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};  
            |                                             ^~~~~~~~  

also reported, eg here: https://stackoverflow.com/questions/71454588/minsigstksz-error-after-update-in-my-manjaro-linux. It seems to be a general problem with glibc v2.34 or higher (I have 2.35). I managed to get it to compile by editing catch.hpp with the horrible hack suggested in the stack overflow link:

#undef SIGSTKSZ  
#define SIGSTKSZ 16384

But this is clearly not a good long term solution...

To Reproduce
git clone https://github.com/CEA-COSMIC/pysap.git
conda env create -f environment.yml
conda activate pysap
python setup.py install

Are you planning to submit a Pull Request?

  • Yes
  • No

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions