Skip to content

Compilation failure with GLIBC 2.34+ #4

@martin-g

Description

@martin-g

Hi,

The build of CancerInSilico fails on Linux at Bioconductor since a while:

g++ -std=gnu++17 -I"/home/biocbuild/bbs-3.18-bioc/R/include" -DNDEBUG  -I'/home/biocbuild/bbs-3.18-bioc/R/site-library/Rcpp/include' -I'/home/biocbuild/bbs-3.18-bioc/R/site-library/BH/include' -I/usr/local/include    -fpic  -g -O2  -Wall -c test-runner.cpp -o test-runner.o
In file included from /usr/include/signal.h:328,
                 from Tests/catch.h:6450,
                 from test-runner.cpp:2:
Tests/catch.h:6473:33: error: size of array ‘altStackMem’ is not an integral constant-expression
 6473 |         static char altStackMem[SIGSTKSZ];
      |                                 ^~~~~~~~
Tests/catch.h:6524:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 6524 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                             ^~~~~~~~
make: *** [/home/biocbuild/bbs-3.18-bioc/R/etc/Makeconf:198: test-runner.o] Error 1
ERROR: compilation failed for package ‘CancerInSilico’

It is because SIGSTKSZ is no longer a constant in glibc 2.34+, so it cannot be used as a size of an array allocation.

Some people solved the problem by dynamically allocate the array: doctest/doctest@8ee91f3

Please let me know if you'd be interested in applying such fix and I can send it as a Pull Request!

Thank you!

Metadata

Metadata

Assignees

No one assigned

    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