Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Link error "undefined symbol" when using some cmath functions with interprocedural optimisation

Sebastien_B_1
Beginner
1,320 Views

My setup: VS2017, Intel C++ Compiler 2021 (OneAPI base toolkit 2021.2)

 

Hi all,

When I try to compile an application the uses acosh or cbrt from cmath (and probably other cmath functions), it works when interprocedural optimisation is disabled.

If I set Interprocedural optimisation to "Multi-File (/Qipo)", I get undefined symbol error:

1>lld-link: : error : undefined symbol: __declspec(dllimport) __svml_acosh32

1>lld-link: : error : undefined symbol: __declspec(dllimport) __svml_acosh64

 

Here is a minimal example:

#include <iostream>

#include "cmath"


int main() {
  std::cout << "success " << std::acosh(2.0) << std::endl;
  return 0;
}

 

It seems like a bug. Any idea?

0 Kudos
5 Replies
ShivaniK_Intel
Moderator
1,279 Views

Hi,


Thanks for reaching out to us.


We are unable to reproduce the error at our end with the same version of the OneAPI Base Toolkit. Could you please provide your vsx project file so we can check the configuration and debug it?


Thanks & Regards

Shivani


0 Kudos
Sebastien_B_1
Beginner
1,276 Views

Thanks for your reply.

See attached a complete project that fails on my side. Note that it fails in Release mode.

0 Kudos
ShivaniK_Intel
Moderator
1,242 Views

Hii,


We are able to reproduce the error on our end. We are working on it and will get back to you soon.


Thanks&Regards

Shivani




0 Kudos
Viet_H_Intel
Moderator
977 Views

Can you try with the latest oneAPI to see if the issue is resolved?


0 Kudos
Viet_H_Intel
Moderator
917 Views

Looks like this issue no longer reproduces in oneAPI. Thus, we are going to close this thread.

If you need anything else, please create a new one.

Thanks,

 

0 Kudos
Reply