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

[HELP] prompts "undefined referenc to _impure_prt" #12907

Closed
1 task done
superxyxiao opened this issue Aug 14, 2024 · 6 comments
Closed
1 task done

[HELP] prompts "undefined referenc to _impure_prt" #12907

superxyxiao opened this issue Aug 14, 2024 · 6 comments
Labels
Community: Question Further information is requested

Comments

@superxyxiao
Copy link

superxyxiao commented Aug 14, 2024

Description

I have to use nuttx version 8.2. Using libm in newlibc, the link prompts an "undefined referenc to _impure_prt" error when using the lagmma function. How can I solve this?

Verification

  • I have verified before submitting the report.
@superxyxiao superxyxiao added the Community: Question Further information is requested label Aug 14, 2024
@superxyxiao superxyxiao changed the title [HELP] <title>prompts "undefined referenc to _impure_prt" [HELP] prompts "undefined referenc to _impure_prt" Aug 14, 2024
@acassis
Copy link
Contributor

acassis commented Aug 14, 2024

@superxyxiao it seems something used by newlibc reentrancy, see: https://embdev.net/topic/what-is-_impure_ptr
lagmma is not part of NuttX libc yet

@xiaoxiang781216
Copy link
Contributor

mainline already fix this problem: https://github.com/apache/nuttx/blob/master/libs/libc/misc/lib_impure.c
8.2 is very very old release, I would suggest you upgrade to the new release.

@superxyxiao
Copy link
Author

Thank you very much.

When calling log2() in protected build mode, the User.map file does not have log2() symbols and cannot compile the elf file. But log2() works fine in app.bin, How can I solve this?

gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded Processors 7-2018-q2-update)

@xiaoxiang781216
Copy link
Contributor

which libm library are use using?

@superxyxiao
Copy link
Author

Using libm from newlib

@xiaoxiang781216
Copy link
Contributor

do you add libm to the ld command line when you build user space bin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants