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

Profiler compilation failure related to malloc_stats function missing #3499

Open
ivoanjo opened this issue Mar 1, 2024 · 1 comment
Open
Labels
bug Involves a bug community Was opened by a community member

Comments

@ivoanjo
Copy link
Member

ivoanjo commented Mar 1, 2024

Current behaviour

Reported by @mintuhouse. It seems there may be an issue with the change from #3425, as reported in
#3425 (comment) .

I'm opening this ticket to investigate the issue.

When I try to install the gem inside docker on M1/ARM Mac, getting error


LD_LIBRARY_PATH=.:/opt/rubies/ruby-3.3.0/lib "gcc -o conftest -I/opt/rubies/ruby-3.3.0/include/ruby-3.3.0/aarch64-linux -I/opt/rubies/ruby-3.3.0/include/ruby-3.3.0/ruby/backward -I/opt/rubies/ruby-3.3.0/include/ruby-3.3.0 -I.    -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef -std=gnu99 -Wno-unused-function -Wno-declaration-after-statement -Werror-implicit-function-declaration -fvisibility=hidden -Wold-style-definition -Wall -Wextra conftest.c  -L. -L/opt/rubies/ruby-3.3.0/lib -Wl,-rpath,/opt/rubies/ruby-3.3.0/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic     -Wl,-rpath,/opt/rubies/ruby-3.3.0/lib -L/opt/rubies/ruby-3.3.0/lib -lruby-static -lz -lrt -lrt -ldl -lcrypt -lm -lpthread   -lm -lpthread  -lc"
conftest.c: In function ‘t’:
conftest.c:14:57: error: ‘malloc_stats’ undeclared (first use in this function)
   14 | int t(void) { void ((*volatile p)()); p = (void ((*)()))malloc_stats; return !p; }
      |                                                         ^~~~~~~~~~~~

Expected behaviour

Profiler compilation should not be affected by missing malloc_stats.

Steps to reproduce

Still trying to figure this out.

Environment

  • ddtrace version: 1.20.0?
  • Configuration block (Datadog.configure ...): ?
  • Ruby version: 3.3.0
  • Operating system: macOS, arm64
  • Relevant library versions: ?
@ivoanjo ivoanjo added bug Involves a bug community Was opened by a community member labels Mar 1, 2024
@ivoanjo
Copy link
Member Author

ivoanjo commented Mar 1, 2024

A compilation failure caused by malloc_stats being missing is not expected at all, since the code is supposed to gracefully degrade when it's not available.

@mintuhouse I noticed the log you shared is a snippet for Ruby's mkmf.log. Could you share the full mkmf.log you get, as well as any other messages you see when installing the gem fails?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

No branches or pull requests

1 participant