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

cprofiles: can't compile due to incompatible-pointer-types #9601

Closed
ThomasDevoogdt opened this issue Nov 16, 2024 · 9 comments
Closed

cprofiles: can't compile due to incompatible-pointer-types #9601

ThomasDevoogdt opened this issue Nov 16, 2024 · 9 comments

Comments

@ThomasDevoogdt
Copy link
Contributor

ThomasDevoogdt commented Nov 16, 2024

Bug Report

/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c: In function ‘cprof_profile_destroy’:
/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c:160:18: error: assignment to ‘struct cprof_mapping *’ from incompatible pointer type ‘struct cprof_location *’ [-Wincompatible-pointer-types]
  160 |         location = cfl_list_entry(iterator,
      |                  ^
/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c:166:32: error: passing argument 1 of ‘cprof_location_destroy’ from incompatible pointer type [-Wincompatible-pointer-types]
  166 |         cprof_location_destroy(location);
      |                                ^~~~~~~~
      |                                |
      |                                struct cprof_mapping *
In file included from /home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c:21:
/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/include/cprofiles/cprofiles.h:304:52: note: expected ‘struct cprof_location *’ but argument is of type ‘struct cprof_mapping *’
  304 | void cprof_location_destroy(struct cprof_location *instance);
      |                             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Describe the bug

New toolchains are asserting on it.

To Reproduce

  • Rubular link if applicable:
  • Example log message if applicable:
{"log":"YOUR LOG MESSAGE HERE","stream":"stdout","time":"2018-06-11T14:37:30.681701731Z"}
  • Steps to reproduce the problem:

Expected behavior

Screenshots

Your Environment

  • Version used: 3.2.0
  • Configuration: Buildroot
  • Environment name and version (e.g. Kubernetes? What version?):
  • Server type and version:
  • Operating System and version:
  • Filters and plugins:

Additional context

@leonardo-albertovich can you have a look, since you've added this in 2954908?

@ThomasDevoogdt ThomasDevoogdt changed the title cprofiles: can't compile for a 32-bit architecture cprofiles: can't compile due to incompatible-pointer-types Nov 16, 2024
@edsiper
Copy link
Member

edsiper commented Nov 17, 2024

@ThomasDevoogdt thanks for this report. I have fixed the data type problem, however note that cprofiles still needs other adjustments regarding dependencies (profiles are under active development).

@edsiper edsiper added this to the Fluent Bit v3.2.2 milestone Nov 17, 2024
@ThomasDevoogdt
Copy link
Contributor Author

@ThomasDevoogdt thanks for this report. I have fixed the data type problem, however note that cprofiles still needs other adjustments regarding dependencies (profiles are under active development).

Hi @edsiper, I guess you didn't saw my PR fluent/cprofiles#3, can you have a look, since that one also solves another related issue.

BTW, since it's under active development, why is it already part of the v3.2.0 stable release?

@jeredfloyd
Copy link

I submitted PR #9598 to resolve this a few hours after release, but haven't seen motion. Does the project not accept outside PRs?

@edsiper
Copy link
Member

edsiper commented Nov 19, 2024

@ThomasDevoogdt Didn't see your PR. Note that profiles are not stable in OTel, the feature needs to be enabled manually since it's in experimental mode.

@jeredfloyd for dependencies or external libraries that lives in lib/, the PR needs to be send to the original repository from where we pull that library, in this case is fluent/cprofiles.

@ThomasDevoogdt
Copy link
Contributor Author

@edsiper But why is that experimental issue enabled then? See https://github.com/fluent/fluent-bit/blob/master/CMakeLists.txt#L158-L159. Btw, there is a small typo in the comment line there.

@edsiper
Copy link
Member

edsiper commented Nov 27, 2024

@ThomasDevoogdt Because OpenTelemetry Profiles schema is not stable, it's still flagged as in development mode and they are still adapting it which causes breaking changes:

https://github.com/open-telemetry/opentelemetry-proto/tree/main/opentelemetry/proto/profiles/v1development

@ThomasDevoogdt
Copy link
Contributor Author

ThomasDevoogdt commented Nov 27, 2024

@edsiper I understand, but the issue here is that something which is not yet stable, is enabled by default in the CMakeLists.txt. For me, that's fine, but then it should compile. So either disable this feature in the CMakeLists.txt, or merge the pull request which is linked, so that the compilation gets fixed.

@ThomasDevoogdt
Copy link
Contributor Author

Fixed by 4ab9331, please also read my comment here, fluent/cprofiles#3 (comment), a bit disappointing that contributions gets ignored.

@ThomasDevoogdt
Copy link
Contributor Author

Btw, I have another compile issue, would be nice if someone could have a look at #9600.

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

No branches or pull requests

4 participants