Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed with glibc 2.34 #359

Open
hdu-sdlzx opened this issue Jun 27, 2022 · 6 comments
Open

Build failed with glibc 2.34 #359

hdu-sdlzx opened this issue Jun 27, 2022 · 6 comments

Comments

@hdu-sdlzx
Copy link
Contributor

[ 95%] Building CXX object tools/hscollider/CMakeFiles/hscollider.dir/sig.cpp.o
/home/sdlzx/rpmbuild/BUILD/hyperscan-5.4.0/tools/hscollider/sig.cpp:178:48: error: array bound is not an integer constant before ‘]’ token
178 | static TLS_VARIABLE char alt_stack_loc[SIGSTKSZ];
| ^
/home/sdlzx/rpmbuild/BUILD/hyperscan-5.4.0/tools/hscollider/sig.cpp: In function ‘void setSignalStack()’:
/home/sdlzx/rpmbuild/BUILD/hyperscan-5.4.0/tools/hscollider/sig.cpp:191:23: error: ‘alt_stack_loc’ was not declared in this scope; did you mean ‘alt_stack’?
191 | alt_stack.ss_sp = alt_stack_loc;
| ^~~~~~~~~~~~~
| alt_stack
make[2]: *** [tools/hscollider/CMakeFiles/hscollider.dir/build.make:221: tools/hscollider/CMakeFiles/hscollider.dir/sig.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:691: tools/hscollider/CMakeFiles/hscollider.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@hdu-sdlzx
Copy link
Contributor Author

@fatchanghao @hongyang7

@vlaci
Copy link

vlaci commented Jun 28, 2022

This has bitten me just today: from the changelog of glibc 2.34 (emphasis mine):

  • Add _SC_MINSIGSTKSZ and _SC_SIGSTKSZ. When _DYNAMIC_STACK_SIZE_SOURCE
    or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are no longer
    constant on Linux.
    MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ)
    and SIGSTKSZ is redefined to sysconf (_SC_SIGSTKSZ). This supports
    dynamic sized register sets for modern architectural features like
    Arm SVE.

@hongyang7
Copy link
Contributor

Thank you for reporting the new glibc change. We'll review your patch.

@JackLiar
Copy link

JackLiar commented Sep 5, 2022

For myself, I have no interested in building hscollider nor any other tools at all. Yeah sure, they are good tools, sometimes. But for compiling shared/static library purpose, I really don't need those things, they just add lots of compile time that I don't wanna spend and require extra library to be taken care of in build environment(libpcap).

So, I honestly suggest dudes would consider about adding a cmake option to let users to disable tools build to save compile time and get out of these out of no where issues. @hongyang7

for example:

cmake -D BUILD_TOOLS=OFF .

@hongyang7
Copy link
Contributor

@hdu-sdlzx

Please refer to latest develop branch.
Commit ids: 564ed6f and a404a41

@hongyang7
Copy link
Contributor

@JackLiar Thanks for the suggestion, we'll think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants