FS#70446 - [metis] linking to libmetis.so results in undefined references to several math functions
Attached to Project:
Arch Linux
Opened by Jakub Klinkovský (lahwaacz) - Wednesday, 14 April 2021, 19:32 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 14 April 2021, 20:20 GMT
Opened by Jakub Klinkovský (lahwaacz) - Wednesday, 14 April 2021, 19:32 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 14 April 2021, 20:20 GMT
|
Details
Minimal reproducible example in C:
#include <stdio.h> #include <metis.h> int main(int argc, char **argv) { METIS_NodeND(NULL, NULL, NULL, NULL, NULL, NULL, NULL); return 0; } Compilation fails at the link stage: $ cc metis_test.c -o metis_test -lmetis /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libmetis.so: undefined reference to `powf' /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libmetis.so: undefined reference to `sqrtf' /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libmetis.so: undefined reference to `log' /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libmetis.so: undefined reference to `pow' /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libmetis.so: undefined reference to `sqrt' collect2: error: ld returned 1 exit status Adding -lm to the build works, but libmetis.so should link to all libraries it depends on. |
This task depends upon
Closed by Antonio Rojas (arojas)
Wednesday, 14 April 2021, 20:20 GMT
Reason for closing: Fixed
Additional comments about closing: metis 5.1.0.p10-2
Wednesday, 14 April 2021, 20:20 GMT
Reason for closing: Fixed
Additional comments about closing: metis 5.1.0.p10-2