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

Linker errors while using ncnn with Ingenic T40 #5932

Open
jvasanthan opened this issue Mar 13, 2025 · 3 comments
Open

Linker errors while using ncnn with Ingenic T40 #5932

jvasanthan opened this issue Mar 13, 2025 · 3 comments

Comments

@jvasanthan
Copy link

Hi @MarsTechHAN ,

I am able to compile ncnn for Ingenic T40 and when I try to compile yolov5 example I get the following linker errors
expression.cpp:(.text+0x15ec): undefined reference to __acosf_finite' expression.cpp:(.text+0x1b0c): undefined reference to __atan2f_finite'
expression.cpp:(.text+0x1b6c): undefined reference to __fmodf_finite' expression.cpp:(.text+0x1bc4): undefined reference to __powf_finite'
expression.cpp:(.text+0x1ca8): undefined reference to `__expf_finite'

all these are related to math lib. mips uclibc doesn't support these functions.

How did you compile the examples for T40? what changes I should do to fix these errors?

Regards,
James

@nihui
Copy link
Member

nihui commented Mar 13, 2025

cmake -DNCNN_SIMPLEMATH=ON
may help

@jvasanthan
Copy link
Author

Hi @nihui,

I am getting below error when I turn on NCNN_SIMPLEMATH, can I use atan2f instead of atan2?
/ncnn/src/layer/mips/msa_mathfun.h:263:15: error: 'atan2' was not declared in this scope

@nihui
Copy link
Member

nihui commented Mar 14, 2025

Hi @nihui,

I am getting below error when I turn on NCNN_SIMPLEMATH, can I use atan2f instead of atan2? /ncnn/src/layer/mips/msa_mathfun.h:263:15: error: 'atan2' was not declared in this scope

yeah, atan2f is fine

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

2 participants