#SIGSEGV in rustc when compiling Bevy

5 messages · Page 1 of 1 (latest)

lean falcon
#

don't know if this is the right spot, but it's segmentation faulting when I try to compile a plain Bevy project using the optimizations in the Bevy Book:

package]
name = "musi-usawi-rs"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[dependencies.bevy]
version = "0.12.0"
default_features = false
features = [
    "multi-threaded",
    "bevy_asset",
    "bevy_audio",
    "bevy_gilrs",
    "bevy_scene",
    "bevy_winit",
    "bevy_render",
    "bevy_core_pipeline",
    "bevy_gizmos",
    "bevy_sprite",
    "bevy_text",
    "bevy_ui",
    "animation",
    "default_font",
    "png",
    "vorbis",
    "x11",
    "subpixel_glyph_atlas",
    "serialize",
    "wayland",
    "accesskit_unix",
    "dynamic_linking",
]

# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1

# Enable high optimizations for dependencies, but not for our code:
[profile.dev.package."*"]
opt-level = 3

see the attached build.log, which is a text file of cargo build after running cargo clean
main.rs is an empty main function (fn main() {})

I tried disabling mold but it still happens.
if this is a rustc bug, I can try getting help there. sorry if it's the wrong place!

#

distro is fedora

#

do ping me with any response

lyric knoll
#

Hey, I have similar issue on mac m1. Try changing config like this:

[profile.dev.package."*"]
opt-level = 2 # set to 2