Skip to content

Features "jpeg" and "dynamic_linking" cause linking error in 0.14-rc.4 on linux #14117

Closed
@Sorseg

Description

@Sorseg

Bevy version

0.14.0-rc.4

Relevant system information

Linux host 6.9.3-76060903-generic #202405300957~1718348209~22.04~7817b67 SMP PREEMPT_DYNAMIC Mon J x86_64 x86_64 x86_64 GNU/Linux

rustc 1.79.0 (129f3b996 2024-06-10)

What you did

I've updated to new bevy rc on my project and started getting compilation errors after running a cargo clean once.
I've made a repro repo that is a hello world project, with only bevy as the dependency and it also fails to link.

What went wrong

Linking error on stable is

  = note: /usr/bin/ld: __rust_realloc: undefined version: 
          /usr/bin/ld: __rust_no_alloc_shim_is_unstable: undefined version: 
          /usr/bin/ld: __rust_dealloc: undefined version: 
          /usr/bin/ld: __rust_alloc_zeroed: undefined version: 
          /usr/bin/ld: __rust_alloc_error_handler_should_panic: undefined version: 
          /usr/bin/ld: __rust_alloc_error_handler: undefined version: 
          /usr/bin/ld: __rust_alloc: undefined version: 
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status

and on nightly with lld it is

  = note: rust-lld: error: version script assignment of 'global' to symbol '__rust_alloc' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__rust_alloc_error_handler' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__rust_alloc_error_handler_should_panic' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__rust_alloc_zeroed' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__rust_dealloc' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__rust_no_alloc_shim_is_unstable' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__rust_realloc' failed: symbol not defined
          collect2: error: ld returned 1 exit status
          

error: could not compile `bevy_dylib` (lib) due to 1 previous error

Additional information

A workaround in my case was to get rid of the jpeg feature as I don't use it anymore.

Thank you for maintaining this amazing engine!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AssetsLoad files from disk to use for things like images, models, and soundsA-Build-SystemRelated to build systems or continuous integrationC-BugAn unexpected or incorrect behaviorC-DependenciesA change to the crates that Bevy depends onO-LinuxSpecific to the Linux desktop operating systemP-Compile-FailureA failure to compile Bevy appsP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions