Skip to content

Undefined reference to core::panicking::panic #476

@pgowda-cve

Description

@pgowda-cve

Hi,

We are trying to build mozjs-91 in debug mode on Yocto framework.

However, the build fails with the following error on compiler_builtins.

/libexec/i686-linux/gcc/i686-linux/12.1.0/ld: mozjs-91/91.8.0-r0/build/i686-linux/release/libjsrust.a(compiler_builtins-3fc4b4898efc1e1d.compiler_builtins.b3f4713f-cgu.3.rcgu.o): in function compiler_builtins::int::specialized_div_rem::u64_div_rem': compiler_builtins.b3f4713f-cgu.3:(.text._ZN17compiler_builtins3int19specialized_div_rem11u64_div_rem17ha9ef929772c35813E+0x178): undefined reference to core::panicking::panic'

The issue is not seen when built without debug mode (DEBUG_BUILD = "1")
Tried to debug the issue and observed that building libstd-rs in release mode
fixed the issue.

The following issues were referred that are related to the same error
#347
#79

Tweaked the files to modify for
overflow-checks = false
opt-level = 1
However, it did not fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions