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

Building C code fails due to -pedantic flag #1923

Closed
tmfink opened this issue Jan 16, 2024 · 3 comments
Closed

Building C code fails due to -pedantic flag #1923

tmfink opened this issue Jan 16, 2024 · 3 comments

Comments

@tmfink
Copy link
Contributor

tmfink commented Jan 16, 2024

Ring fails to build in my company's build environment due to the -pedantic compiler flag for "non MSVC" targets. Our build sysroot has wrapper headers headers that use #include_next.

Since include_next is a GCC extension (which is disabled with -pedantic), this results in an error when compiling the C code:

error: #include_next is a GCC extension
   28 | #include_next <stdint.h>
      |  ^~~~~~~~~~~~

Problematic line:

ring/build.rs

Line 114 in 73fb637

"-pedantic",

At a minimum, I think there should be a way to disable this with an environment variable. However, since whether or not the -pedantic flag can be used depends on the target sysroot , I don't think the -pedantic flag should be enabled by default (although I understand if you want to enable in CI builds).

I'm happy to submit a PR if you tell me how you would want to conditionally enable it.

@briansmith
Copy link
Owner

I would take a PR to remove the -pedantic completely from build.rs.

tmfink added a commit to tmfink/ring that referenced this issue Jan 17, 2024
In some build systems, target sysroots may use non-standard C extentions
like `#include_next`. In such cases, the `-pedantic` flag breaks the
compilation.

Resolves issue briansmith#1923.
briansmith pushed a commit that referenced this issue Jan 18, 2024
In some build systems, target sysroots may use non-standard C extentions
like `#include_next`. In such cases, the `-pedantic` flag breaks the
compilation.

Resolves issue #1923.
@emabee
Copy link

emabee commented Jan 22, 2024

A new ring version with this fix would be highly appreciated :-)
Is there some timeline planned already?

@tmfink
Copy link
Contributor Author

tmfink commented Jan 22, 2024

Fixed in #1926

@tmfink tmfink closed this as completed Jan 22, 2024
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

3 participants