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

Define _POSIX_C_SOURCE for crfsuite source files #159

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

karcherm
Copy link
Contributor

gcc-14 has "-Werror=implicit-function-declaration" enabled by default. crfsuite uses posix_memalign which only gets defined when _POSIX_C_SOURCE is defined, so make sure the flag is set when compiling crfsuite.

On the other hand, openSUSE Tumbleweed has _POSIX_C_SOURCE defined in pyconfig.h, so you must not add "-D_POSIX_C_SOURCE" when compiling the python binding source code. So add it only for the subdir crfsuite.

Fixes #158

karcherm and others added 2 commits June 12, 2024 23:32
gcc-14 has "-Werror=implicit-function-declaration" enabled by default.
crfsuite uses posix_memalign which only gets defined when _POSIX_C_SOURCE is
defined, so make sure the flag is set when compiling crfsuite.

On the other hand, openSUSE Tumbleweed has _POSIX_C_SOURCE defined
in pyconfig.h, so you must not add "-D_POSIX_C_SOURCE" when compiling
the python binding source code. So add it only for the subdir crfsuite.
@fgregg fgregg merged commit adfb0bd into scrapinghub:master Sep 30, 2024
20 checks passed
@fgregg
Copy link
Contributor

fgregg commented Sep 30, 2024

thanks!

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

Successfully merging this pull request may close these issues.

Fails to build with GCC 14 due to -Wimplicit-function-declaration
2 participants