Skip to content

DD_PROFILING_NO_EXTENSION needed because of error: invalid use of ‘__builtin_va_arg_pack ()’ #1799

@ivoanjo

Description

@ivoanjo

Originally reported by @harmdewit in #1792 (comment) .


Having a similar issue with ddtrace 0.54.1 and ruby 2.7.4.

Setting DD_PROFILING_NO_EXTENSION=true does fix the issue

[31mGem::Ext::BuildError: ERROR: Failed to build gem native extension.
�[0m
current directory:
/home/semaphore/Behandel-Ons/vendor/bundle/ruby/2.7.0/gems/ddtrace-0.54.1/ext/ddtrace_profiling_native_extension
/home/semaphore/.rbenv/versions/2.7.4/bin/ruby -I
/home/semaphore/.rbenv/versions/2.7.4/lib/ruby/site_ruby/2.7.0 -r
./siteconf20211201-4804-b0r2qq.rb extconf.rb

+------------------------------------------------------------------------------+
| **Preparing to build the ddtrace native extension...**                       |
|                                                                              |
| If you run into any failures during this step, you can set the               |
| `DD_PROFILING_NO_EXTENSION` environment variable to `true` e.g.              |
| `$ DD_PROFILING_NO_EXTENSION=true bundle install` to skip this step.         |
|                                                                              |
| Disabling the extension will lead to the ddtrace profiling features not      |
| working in future releases.                                                  |
| If you needed to use this, please tell us why on                             |
| <https://github.com/DataDog/dd-trace-rb/issues/new> so we can fix it :)      |
|                                                                              |
| Thanks for using ddtrace! You rock!                                          |
+------------------------------------------------------------------------------+

creating extconf.h
creating Makefile

current directory:
/home/semaphore/Behandel-Ons/vendor/bundle/ruby/2.7.0/gems/ddtrace-0.54.1/ext/ddtrace_profiling_native_extension
make DESTDIR\= clean

current directory:
/home/semaphore/Behandel-Ons/vendor/bundle/ruby/2.7.0/gems/ddtrace-0.54.1/ext/ddtrace_profiling_native_extension
make DESTDIR\=
compiling clock_id_from_pthread.c
compiling clock_id_noop.c
compiling private_vm_api_access.c
In file included from private_vm_api_access.c:13:0:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘sprintf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:406:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __builtin___sprintf_chk (__s, 2 - 1,
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘snprintf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:424:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __builtin___snprintf_chk (__s, __n, 2 - 1,
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘fprintf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:443:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __fprintf_chk (__stream, 2 - 1, __fmt,
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘printf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:449:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘dprintf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:470:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __dprintf_chk (__fd, 2 - 1, __fmt,
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘asprintf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:496:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __asprintf_chk (__ptr, 2 - 1, __fmt,
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘__asprintf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:502:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __asprintf_chk (__ptr, 2 - 1, __fmt,
   ^
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:
In function ‘obstack_printf’:
/home/semaphore/.rbenv/versions/2.7.4/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.4.h:508:3:
error: invalid use of ‘__builtin_va_arg_pack ()’
   return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
   ^
Makefile:244: recipe for target 'private_vm_api_access.o' failed
make: *** [private_vm_api_access.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/semaphore/Behandel-Ons/vendor/bundle/ruby/2.7.0/gems/ddtrace-0.54.1 for
inspection.
Results logged to
/home/semaphore/Behandel-Ons/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/ddtrace-0.54.1/gem_make.out

�[0m�[31mAn error occurred while installing ddtrace (0.54.1), and Bundler cannot
continue.
Make sure that `gem install ddtrace -v '0.54.1' --source
'https://rubygems.org/'` succeeds before bundling.�[0m

Metadata

Metadata

Assignees

Labels

profilingInvolves Datadog profiling

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions