View previous topic :: View next topic |
Author |
Message |
emtone n00b
Joined: 11 Apr 2017 Posts: 48
|
Posted: Sat Dec 07, 2024 12:10 pm Post subject: libomp build error on loongson 2f |
|
|
报错信息如下:
Code: |
[10/35] /usr/bin/mips64el-unknown-linux-gnu-g++ -Domp_EXPORTS -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp_build-abi_mips_n32.n32/runtime/src -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/i18n -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/include -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/thirdparty/ittnotify -DNDEBUG -O2 -march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -Wall -Wcast-qual -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -Wno-maybe-uninitialized -fno-semantic-interposition -fdata-sections -std=c++17 -fPIC -D _GNU_SOURCE -D _REENTRANT -DNDEBUG -U_GLIBCXX_ASSERTIONS -fno-exceptions -fno-rtti -Wno-class-memaccess -Wno-frame-address -Wno-strict-aliasing -Wstringop-overflow=0 -Wno-stringop-truncation -Wno-switch -Wno-uninitialized -Wno-cast-qual -MD -MT runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o -MF runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o.d -o runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o -c /var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/kmp_global.cpp
FAILED: runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o
/usr/bin/mips64el-unknown-linux-gnu-g++ -Domp_EXPORTS -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp_build-abi_mips_n32.n32/runtime/src -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/i18n -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/include -I/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/thirdparty/ittnotify -DNDEBUG -O2 -march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -Wall -Wcast-qual -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -Wno-maybe-uninitialized -fno-semantic-interposition -fdata-sections -std=c++17 -fPIC -D _GNU_SOURCE -D _REENTRANT -DNDEBUG -U_GLIBCXX_ASSERTIONS -fno-exceptions -fno-rtti -Wno-class-memaccess -Wno-frame-address -Wno-strict-aliasing -Wstringop-overflow=0 -Wno-stringop-truncation -Wno-switch -Wno-uninitialized -Wno-cast-qual -MD -MT runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o -MF runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o.d -o runtime/src/CMakeFiles/omp.dir/kmp_global.cpp.o -c /var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/kmp_global.cpp
In file included from /var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/kmp_global.cpp:14:
/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/kmp_affinity.h:261:2: error: #error Wrong code for setaffinity system call.
261 | #error Wrong code for setaffinity system call.
| ^~~~~
/var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/kmp_affinity.h:266:2: error: #error Wrong code for getaffinity system call.
266 | #error Wrong code for getaffinity system call.
|
|
|
Back to top |
|
|
emtone n00b
Joined: 11 Apr 2017 Posts: 48
|
Posted: Sat Dec 07, 2024 12:12 pm Post subject: |
|
|
解决方法:
vi /var/tmp/portage/sys-libs/libomp-19.1.1/work/openmp/runtime/src/kmp_affinity.h
将261-266行相关内容用//注释掉
Code: |
#elif KMP_ARCH_MIPS64
//#ifndef __NR_sched_setaffinity
//#define __NR_sched_setaffinity 5195
//#elif __NR_sched_setaffinity != 5195
//#error Wrong code for setaffinity system call.
//#endif /* __NR_sched_setaffinity */
//#ifndef __NR_sched_getaffinity
//#define __NR_sched_getaffinity 5196
//#elif __NR_sched_getaffinity != 5196
//#error Wrong code for getaffinity system call.
//#endif /* __NR_sched_getaffinity */
#elif KMP_ARCH_LOONGARCH64
|
然后"ebuild /path/to/ebuild install" and "ebuild /path/to/ebuild qmerge" |
|
Back to top |
|
|
|