Skip to content

Unable to generate bindings due to a delegation cycle #993

Open
@helloqirun

Description

I am using this script https://gist.github.com/fitzgen/187381e358f60efa8194d0b276b4d11a.

The hashtag for my bindgen version is 4dd4ac7 .

$ ./b.sh bindgen abc.h

clang-4.0: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
abc.h:5:14: error: constructor for 'a' creates a delegation cycle [-Wdelegating-ctor-cycles]
abc.h:5:14: error: constructor for 'a' creates a delegation cycle [-Wdelegating-ctor-cycles], err: true
thread 'main' panicked at 'Unable to generate bindings: ()', /checkout/src/libcore/result.rs:860:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:380
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:396
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic_new
             at /checkout/src/libstd/panicking.rs:553
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:521
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:497
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:92
   9: core::result::unwrap_failed
             at /checkout/src/libcore/macros.rs:41
  10: <core::result::Result<T, E>>::expect
             at /checkout/src/libcore/result.rs:762
  11: bindgen::main::{{closure}}
             at src/main.rs:55
  12: std::panicking::try::do_call
             at /checkout/src/libstd/panicking.rs:479
  13: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  14: std::panicking::try
             at /checkout/src/libstd/panicking.rs:458
  15: std::panic::catch_unwind
             at /checkout/src/libstd/panic.rs:361
  16: bindgen::main
             at src/main.rs:54
  17: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  18: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:458
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:59
  19: main
  20: __libc_start_main
  21: _start
Interesting: bindgen failed to generate bindings for the test case!

$ cat abc.h

namespace
{
  struct a
  {
    a (bool):a (new int)
    {
    }
  };
}

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions