febiosoftware / FEBio

FEBio Suite Solver
https://febio.org/
MIT License
184 stars 68 forks source link

How to resolve this compilation error? #83

Closed blog-guang closed 6 months ago

blog-guang commented 8 months ago
build] [ 99%] Building CXX object CMakeFiles/febio4.dir/FEBio/ping.cpp.o
[build] [ 99%] Building CXX object CMakeFiles/febio4.dir/FEBio/stdafx.cpp.o
[build] [100%] Linking CXX executable bin/febio4
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_loop_nonmonotonic_guided_start'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_critical_start'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_critical_name_end'
[build] /usr/bin/ld: lib/libfebiolib.so: undefined reference to `dlsym'
[build] /usr/bin/ld: /workspaces/FEBio/build/lib/libfebiomix.so: undefined reference to `GOMP_barrier'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_critical_end'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_parallel'
[build] /usr/bin/ld: lib/libfebiolib.so: undefined reference to `dlopen'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'
[build] /usr/bin/ld: lib/libfebiolib.so: undefined reference to `dlerror'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_critical_name_start'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_loop_nonmonotonic_dynamic_start'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_loop_end_nowait'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `omp_get_thread_num'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `omp_get_num_threads'
[build] /usr/bin/ld: lib/libfecore.so: undefined reference to `GOMP_loop_nonmonotonic_guided_next'
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [CMakeFiles/febio4.dir/build.make:221: bin/febio4] Error 1
[build] make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/febio4.dir/all] Error 2
[build] make: *** [Makefile:84: all] Error 2
michaelrossherron commented 7 months ago

I just got a ping from this issue, and it looks like I didn't see it when it first came up. It's been long enough, that perhaps you no longer need this answer, but here it is anyway. These linker errors are due to missing the Intel OMP library, libiomp5.so. Someone else had similar issues recently on our forums, and I gave them a response here. Give that a try, and let me know if that doesn't fix the issue.