Skip to content

Main builds fail with error: symbol init___rust_ctor___ctor is already defined #6495

Closed

Description

@alamb

Describe the bug

https://github.com/apache/arrow-datafusion/actions/runs/5125505760/jobs/9218772590

Fails with


error: symbol `init___rust_ctor___ctor` is already defined
   --> datafusion/optimizer/src/scalar_subquery_to_join.rs:311:5
    |
311 |     #[ctor::ctor]
    |     ^^^^^^^^^^^^^
    |
    = note: this error originates in the attribute macro `ctor::ctor` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `datafusion-optimizer` due to previous error

To Reproduce

If you run cargo update

    Updating ctor v0.2.0 -> v0.2.1

Then the link error will happen

It appears this crate was released about the same time as our CI started failing: https://crates.io/crates/ctor/0.2.1

Expected behavior

No response

Additional context

No response

Activity

  1. alamb commented on May 30, 2023

    @alamb
    ContributorAuthor

    I filed mmastrac/linktime#283 upstream

  2. jiangzhx commented on May 31, 2023

    @jiangzhx
    Contributor

    I am facing the same problem.
    If you have already performed a cargo update, you can fix this issue by running the command:

    cargo update -p ctor --precise v0.2.0

  3. alamb commented on May 31, 2023

    @alamb
    ContributorAuthor

    I plan to work on this in 3-4 hours if no one else beats me to it

  4. alamb commented on May 31, 2023

    @alamb
    ContributorAuthor
  5. mmastrac commented on May 31, 2023

    @mmastrac

    ctor 0.2.2 is pushed without #[no_mangle]. Please let me know if this fixes it.

  6. alamb commented on Jun 1, 2023

    @alamb
    ContributorAuthor

    Thanks @mmastrac -- we have found a workaround.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions