cryptape / ckb-crypto-demo

Fundamental cryptography libraries for CKB
4 stars 4 forks source link

CMake test在riscv下无法使用 #13

Closed timfaner closed 4 years ago

timfaner commented 4 years ago

CMake 使用CTest作为测试,测试不能在riscv环境里运行,有什么比较好的办法运行测试吗

timfaner commented 4 years ago

尝试编译riscv-glibc 并找到其中的pthread ,build指南

timfaner commented 4 years ago

riscv工具链不支持 某些功能 需要添加编译参数。

Is this a compiler that you built yourself, or one that you downloaded from somewhere?

I would guess that the libraries were not compiled -mcmodel=medany, and you are linking to an address at or above 0x80000000. If this is a compiler you built yourself, then add --with-cmodel=medany when configuring.

Originally posted by @jim-wilson in https://github.com/riscv/riscv-gnu-toolchain/issues/457#issuecomment-504835065


同时g++ 编译时候文件有顺序,

g++ TestAll.cpp functions.cpp functionsTest.cpp -o mm -lgtest -lpthread
timfaner commented 4 years ago

编译成功 新的问题:运行时候

assertion failed - (addr & (nr_bytes - 1)) == 0

timfaner commented 4 years ago

pthread 不支持,放弃这个路线