Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pgowda-cve opened this issue Jul 14, 2022 · 6 comments
Closed

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

pgowda-cve opened this issue Jul 14, 2022 · 6 comments

Comments

@pgowda-cve
Copy link

pgowda-cve commented Jul 14, 2022

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.

@Amanieu
Copy link
Member

Amanieu commented Jul 14, 2022

Can you try with the latest nightly? According to rust-lang/rust#96486 (comment) it might have been fixed recently.

@pgowda-cve
Copy link
Author

Thanks very much for the pointer.
Will check the issue with the latest sources as per your suggestion and try

@Yashinde145
Copy link

I checked the issue recently and it still exists with rust version 1.75 and 1.77.2 as well.

@Amanieu
Copy link
Member

Amanieu commented Apr 22, 2024

This should be fixed on the latest nightly.

@Yashinde145
Copy link

Is there any commit that handles the issue?

Do we need to switch to rust nightly channel?

@Amanieu
Copy link
Member

Amanieu commented Apr 29, 2024

This was fixed by rust-lang/rust#122580 and should be in 1.79.

@Amanieu Amanieu closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants