HVML / PurC

The prime HVML interpreter for C Language.
GNU Lesser General Public License v3.0
1.06k stars 54 forks source link

build failed on riscv arch #11

Open atzlinux opened 2 years ago

atzlinux commented 2 years ago

[ 81%] Building C object Source/PurC/CMakeFiles/PurC.dir///DerivedSources/PurC/purc-error-except.c.o [ 81%] Linking CXX shared library libpurc.so /usr/bin/ld: ../WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o: in function .L0 ': /home/atzlinux/HVML-PurC/Source/WTF/wtf/Assertions.cpp:339: undefined reference toatomic_compare_exchange_1' /usr/bin/ld: ../WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o: in function WTFReportError': /home/atzlinux/HVML-PurC/Source/WTF/wtf/Assertions.cpp:349: undefined reference to__atomic_compare_exchange_1' /usr/bin/ld: ../WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o: in function PurCWTF::String::append(char)': /home/atzlinux/HVML-PurC/Source/WTF/wtf/text/WTFString.h:229: undefined reference toatomic_compare_exchange_1' /usr/bin/ld: ../WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o: in function .L0 ': /usr/include/riscv64-linux-gnu/c++/12/bits/gthr-default.h:700: undefined reference toatomic_compare_exchange_1' /usr/bin/ld: ../WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o: in function .L0 ': /home/atzlinux/HVML-PurC/Source/WTF/wtf/Assertions.cpp:127: undefined reference to__atomic_compare_exchange_1' /usr/bin/ld: ../WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o:/usr/include/riscv64-linux-gnu/c++/12/bits/gthr-default.h:702: more undefined references to `atomic_compare_exchange_1' follow collect2: error: ld returned 1 exit status gmake[2]: [Source/PurC/CMakeFiles/PurC.dir/build.make:6289:Source/PurC/libpurc.so.0.8.0] 错误 1 gmake[1]: [CMakeFiles/Makefile2:941:Source/PurC/CMakeFiles/PurC.dir/all] 错误 2 gmake: *** [Makefile:156:all] 错误 2

CMakeError.log CMakeOutput.log

atzlinux commented 2 years ago

Debian sid riscv porter

gcc version 12.1.0 (Debian 12.1.0-7) ldd (Debian GLIBC 2.33-8) 2.33

uname -a Linux unmatched 5.16.0-5-riscv64 #1 SMP Debian 5.16.14-1 (2022-03-15) riscv64 GNU/Linux

VincentWei commented 2 years ago

It seems that stdatomic.h on this platform is bad implemented.