先看了报错

常见导致该测试失败的原因包括:

测试对 Vim/GVim 运行环境的假设不同
例如测试环境中可能缺少预期加载的脚本(ftdetect/*.vim 等),或者 $VIMRUNTIME 路径与脚本里硬编码的不一致,导致测试时找不到相关文件、功能。

终端尺寸/cmdheight/输出截断方式
这个签名截断测试通常依赖 Vim 在命令行里如何处理很长的函数名。如果测试时 Vim 判断到命令行或窗口大小不同,就会发生「根本没显示函数名、只显示了空行」的情况,于是与预期不符。

Upstream 测试脚本的脆弱性
上游 vim-jedi 测试脚本本身设计得比较「依赖环境」,在某些发行版或架构(riscv64)的 CI 环境下经常会发生类似问题。
有时上游项目会把这类对环境/屏幕宽度敏感的测试标记为「可选」或跳过;也可能需要贴补丁跳过此用例。

插件测试没正确加载
“not found in ‘runtimepath’: ftdetect/*.vim” 说明插件可能还没被正确安装到 Vim 的 runtimepath,导致测试脚本实际没跑到相应逻辑,输出自然也与预期对不上。

发现自己以前误删root花了一小时重装,主要是挂了梯子导致的连接镜像网络问题,对虚拟容器干净环境的理解稍微加深了一点点。
继续构建,发现我自己镜像源的连接确实很有问题

镜像源解决了,而且似乎找到了问题,调试的时候需要用python,在pip和python3的链接上好像出了问题。链接处理干净,bashrc处理干净后还是不行,报错成找不到,结果是版本问题,把python和pip全部卸载了重下一边就可以了。
但是archlinux环境下又不推荐pip
在使用 pytest 进行测试时遇到了一个 PermissionError,具体的错误信息是 [Errno 13] Permission denied: ‘/home/jedi-vim-0.11.2/build/vim-vspec-1.9.0/bin/vspec’。这意味着在尝试执行位于 /home/jedi-vim-0.11.2/build/vim-vspec-1.9.0/bin/vspec 的可执行文件时,你的测试环境没有足够的权限来执行这个文件。

解释错误
PermissionError:通常发生于尝试访问或执行没有足够权限的文件或目录时。在这个场景中,错误发生在尝试运行 vspec 命令的时候,这是一个用于测试 Vim 插件的工具。
[Errno 13]:这是一个标准的 Unix/Linux 错误代码,表示 “Permission denied”(权限被拒绝)。
文件路径:指示出问题的文件是 vspec 可执行文件。
ls -l /home/jedi-vim-0.11.2/build/vim-vspec-1.9.0/bin/vspec
-rw-r–r– 1 root root 1564 Jan 20 07:08 /home/jedi-vim-0.11.2/build/vim-vspec-1.9.0/bin/vspec
为了解决这个问题,你需要给 vspec 文件添加执行权限。作为 root 用户,你可以使用以下命令来修改文件的权限:

chmod +x /home/jedi-vim-0.11.2/build/vim-vspec-1.9.0/bin/vspec
这条命令会给所有用户添加对 vspec 文件的执行权限。
没啥变化。
分析问题
权限问题:即使你为 vspec 文件设置了执行权限,还需要确保运行测试的用户具有访问和执行这个文件的权限。此外,如果 vspec 试图访问其他没有相应权限的文件或目录,也可能出现这种错误。
文件系统限制:如果所在的文件系统以特殊模式挂载(如 noexec),即使文件权限正确,也无法执行。这在某些受保护的环境中可能会发生,尤其是在使用临时文件系统或某些类型的网络文件系统时。
Python 环境:可能的原因还包括 Python 环境本身的权限设置。如果 Python 被安装或配置为只允许特定用户或组执行,则可能需要相应地调整权限。
挂载问题吗?我mount | grep home
发现是空的。
在容器技术(如 Docker)的环境中,如果你观察到挂载列表为空,但仍然可以访问所有目录和文件,这主要是因为容器使用了一种特殊的文件系统隔离技术.在容器中,”挂载” 通常指的是将宿主机的文件系统或特定路径挂载到容器内的路径上。如果你的容器挂载列表为空,这可能意味着没有宿主机的目录被显式挂载到容器中。然而,容器的基本文件系统仍然是通过其镜像层构建和访问的

可以访问了但是还是报错,原来是我jedi-vim压根没装到vim里.要测试真是难啊.

看了一下,qumu只是用来局部测试,正常测试应该还是在主机
extra-riscv64-build – -d “$CACHE_DIR:/var/cache/pacman/pkg/“ – -A 命令的作用是:

解析命令:
extra-riscv64-build:这是用于构建 Arch Linux 包(PKGBUILD)的命令工具,通常用于 Arch Linux 的交叉构建环境中。
-d “$CACHE_DIR:/var/cache/pacman/pkg/“:这部分将指定的缓存目录($CACHE_DIR)映射到构建环境中的 /var/cache/pacman/pkg/,这样可以让构建环境重用已有的包缓存,避免重新下载相同的包。$CACHE_DIR 是你自己设置的路径。
– -A:这个参数会传递给构建命令,-A 表示使用 makepkg 来进行全平台构建(即包括所有架构的包),并不是限制于某一特定架构。
用途:
这条命令用于在创建构建环境后,进行包的构建。通过指定包缓存路径,可以加速构建过程,避免重新下载已经存在的包。

如果已经构建好了环境只想测试包:
如果您的环境已经构建好了,而且只想测试一个包或跳过构建,只进行测试步骤,您可以通过以下几步:

跳过构建:通过跳过构建阶段,您可以仅执行测试。

您可以使用如下命令来执行测试,避免重新构建包:

extra-riscv64-build --skip -- -A
–skip 参数允许您跳过包的构建步骤。

单独执行 check() 阶段:

在 PKGBUILD 文件中,check() 函数是运行测试的地方。如果您只想运行测试,可以使用 makepkg 的 –check 选项:

makepkg --check
这会运行测试脚本(如果 check() 函数存在)而不会构建或安装软件包。

运行特定测试:

如果您只想运行包中的特定测试脚本(比如 test/test_integration.py),您可以进入构建目录,直接运行测试脚本:

cd /path/to/build/directory
pytest test/test_integration.py
如果您使用的是 pytest,这种方式可以让您只运行测试而不进行包的构建。
最终是把源代码和pkg全部拷贝到chroot里用makepkg进行测试.感觉这个测试方式很熟悉,应该是我没好好看教材导致的.

然后就是先useradd再改密码再给权限
看来您遇到了两个常见的权限问题。首先是 makepkg 不允许以 root 用户身份运行,因为这可能对系统造成无法挽回的损害。其次,您在非 root 用户环境下没有写入 $BUILDDIR 的权限。

为解决这些问题,您可以:

  1. 更改 $BUILDDIR 的权限
    您需要确保您的普通用户(在这里是 gyx1)有权限写入 $BUILDDIR,也就是您存放 PKGBUILD 的目录。您可以使用 chmod 或 chown 命令来修改目录的权限或所有权。例如,如果您的用户是 gyx1,您可以执行:
    sudo chown -R gyx1:gyx1 /home/gyx1/vim-jedi
    再改文件权限

软件包文件损坏:下载的 python-parso 和 python-jedi 软件包文件校验和错误,表明文件在下载或存储过程中可能已损坏。这通常发生在网络连接不稳定或软件仓库镜像有问题时。这个问题也总是遇到,是网络的问题,删掉损坏的软件包再来一次就可以了
又出现网络错误大概是因为我复制到测试的软件包是早版本没搞好镜像源的?太垃圾了.我关了个梯子试试看.但是wsl好像也不能实时应用来着.
然后碰到了一个假文件指向空,碰到了一个重新从网上下载的问题,这个是因为我没好好看PKGBUILD文件
终于能在chroot跑测试了,但是又碰到了服务端拒绝连接的问题.
我忙了一天都没开始修..悲伤
还是网络问题.
怎么改输出都没有任何响应
一是找错误输出在哪里日志在哪里
二是找怎么输出成现在这个样子的.
不然根本没办法开始调试

进入root环境
sudo arch-nspawn /var/lib/archbuild/extra-riscv64/root bash

uname -m

努力报了一个bug到上游
There is a problem with the test code of the vim-jedi 0.11.2-3 package. The package build failed under both the riscv64 and x86-64 architectures. According to the log output, the signature test file reported an error when entering the test phase.

Image

Image

  • package version(s):vim-jedi 0.11.2-3,Attached is a patch:python-3.13-accept-test-results.patch
  • config and/or log files:

vim-jedi-0.11.2-3-riscv64-prepare.log

vim-jedi-0.11.2-3-riscv64-check.log

My operating environment is an x86-64 environment virtual machine of the arch architecture of Windows WSL.
The process is as follows:

  1. Enter the folder where the jedi-vim-0.11.2 source code folder and PKGBUILD file exist, then enter the jedi-vim-0.11.2 source code folder, and execute patch -Np1 -i ../python-3.13-accept-test-results.patch
  2. Then execute py.test
  3. Wait for about 7 seconds and find an error

I modified the test file. Here are my ideas for modification:

Image
This is the relevant code for the command line truncation error in the eighth test of /test/vsepr/sinagature.vim

Image
Here is the relevant code for the show_call_signatures function called by this test

After debugging, I found that according to the original test code, the process should have entered the fourth if function to execute g:jedi#show_call_signatures = 2, but in fact it returned in the third if, and no content was output, resulting in the return of \n.
The reason is that signatures = get_script().get_signatures(*get_pos()) is an empty list
And the signature cannot be read. I think it is related to <BS> returning to the end of the previous line and directly inputting, and it is impossible to return the signature according to the independently input function name.

I deleted the <BS> in the code in the patch, and then performed the same operation as above, and found that the test passed

Image

here are my patch

fix-jedi-vim.patch

问潘老板进行了格式修改

Description:

There is a problem with the test code of the vim-jedi 0.11.2-3 package. The package build failed under both the riscv64 and x86-64 architectures. According to the log output, the signature test file reported an error when entering the test phase.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<buffer=5>
call jedi#clear_call_signatures()
Last set from ~/vim-jedi/jedi-vim-0.11.2/autoload/jedi.vim line 604
if exists('b:_jedi_orig_updatetime') | let &updatetime = b:_jedi_orig_updatetime | unlet b:_jedi_orig_updatetime | endif
Last set from ~/vim-jedi/jedi-vim-0.11.2/autoload/jedi.vim line 608
ok 2 - signatures multiple buffers
2 buffers wiped out
ok 3 - signatures simple after CursorHoldI with only parenthesis
ok 4 - signatures highlights correct argument
ok 5 - signatures no signature
ok 6 - signatures signatures disabled
staticmethod(f: Callable[..., Any])
foo(a, b)
ok 7 - signatures command line simple
not ok 8 - signatures command line truncation
Expected Signature() == "\n".funcname."(arg1, …)" at line 15
Actual value: "\n"
Expected value: "\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(arg1, …)"
ok 9 - signatures command line no signature
1
2
FAILED test_integration.py::test_integration[vspec/signatures.vim] - Failed: vspec/signatures.vim failed:
======================================= 1 failed, 7 passed, 3 warnings in 6.73s ============================
  • package version(s):vim-jedi 0.11.2-3,Attached is a patch:python-3.13-accept-test-results.patch
  • config and/or log files:

vim-jedi-0.11.2-3-riscv64-prepare.log

vim-jedi-0.11.2-3-riscv64-check.log

My operating environment is an x86-64 environment virtual machine of the arch architecture of Windows WSL.
The process is as follows:

  1. I cloned your project and installed the dependencies
  2. Then execute py.test
  3. Wait for about 7 seconds and find an error

Patch

I modified the test file. Here are my ideas for modification:

This is the relevant code for the command line truncation error in the eighth test of /test/vsepr/sinagature.vim

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
it 'command line truncation'
let g:jedi#show_call_signatures = 2
call jedi#configure_call_signatures()

function! Signature()
redir => msg
python3 jedi_vim.show_call_signatures()
redir END
return msg
endfunction

let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0)))
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
put = ' pass'
execute "normal o\<BS>".funcname."( "
Expect Signature() == "\n".funcname."(arg1, …)"

exe 'normal sarg1, '
Expect Signature() == "\n".funcname."(…, arg2, …)"

exe 'normal sarg2, arg3, '
Expect Signature() == "\n".funcname."(…, a, b, c)"

exe 'normal sa, b, '
Expect Signature() == "\n".funcname."(…, c)"

g/^/d
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
put = ' pass'
execute "normal o\<BS>".funcname."( "
Expect Signature() == "\n".funcname."(…)"
end

Here is the relevant code for the show_call_signatures function called by this test

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def show_call_signatures(signatures=()):
if int(vim_eval("has('conceal') && g:jedi#show_call_signatures")) == 0:
return

#We need to clear the signatures before we calculate them again. The
#reason for this is that call signatures are unfortunately written to the
#buffer.
clear_call_signatures()
if signatures == ():
signatures = get_script().get_signatures(*get_pos())

if not signatures:
return

if int(vim_eval("g:jedi#show_call_signatures")) == 2:
return cmdline_call_signatures(signatures)

After debugging, I found that according to the original test code, the process should have entered the fourth if function to execute g:jedi#show_call_signatures = 2, but in fact it returned in the third if, and no content was output, resulting in the return of \n.
The reason is that signatures = get_script().get_signatures(*get_pos()) is an empty list
And the signature cannot be read. I think it is related to <BS> returning to the end of the previous line and directly inputting, and it is impossible to return the signature according to the independently input function name.

I deleted the <BS> in the code in the patch, and then performed the same operation as above,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0)))
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
put = ' pass'
execute "normal o".funcname."( "
Expect Signature() == "\n".funcname."(arg1, …)"

exe 'normal sarg1, '
Expect Signature() == "\n".funcname."(…, arg2, …)"

exe 'normal sarg2, arg3, '
Expect Signature() == "\n".funcname."(…, a, b, c)"

exe 'normal sa, b, '
Expect Signature() == "\n".funcname."(…, c)"

g/^/d
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
put = ' pass'
execute "normal o".funcname."( "
Expect Signature() == "\n".funcname."(…)"

and found that the test passed

Do you think this is a good career change? If you think it is, I will open a PR.

sbcl riscv64 callback unspported

Description:

There is a failure when attempting to load or run the cl-cffi test suite on the RISC-V 64-bit (rv64gc) architecture using SBCL 2.5.2. The process fails with an unhandled SIMPLE-ERROR: please implement.

The error originates from the internal function SB-ALIEN-INTERNALS:ALIEN-CALLBACK-ASSEMBLER-WRAPPER when trying to handle a CFFI callback, specifically during the loading of the compiled callbacks.fasl file from the cffi-tests system via ASDF.

This suggests that the necessary low-level assembly code generation for C-to-Lisp callbacks has not yet been implemented for the RISC-V 64-bit architecture in this version of SBCL.
Relevant C compilation command showing target architecture:

1
2
cc -o /build/cl-cffi/src/cl-cffi/tests/libfsbv.so -shared -march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -g -ffile-prefix-map=/build/sbcl/src=/usr/src/debug/sbcl -flto=auto -D_GNU_SOURCE -fno-omit-frame-pointer -DSBCL_HOME=/usr/lib/sbcl -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 /build/cl-cffi/src/cl-cffi/tests/libfsbv.o
SBCL Error and Backtrace:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD tid=3659 "main thread" RUNNING
{50A912C3}>:
please implement

Backtrace for: #<SB-THREAD:THREAD tid=3659 "main thread" RUNNING {50A912C3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-ERROR "please implement" {529F14B3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* #<SIMPLE-ERROR "please implement" {529F14B3}>)
2: (INVOKE-DEBUGGER #<SIMPLE-ERROR "please implement" {529F14B3}>)
3: (ERROR "please implement")
4: (SB-ALIEN-INTERNALS:ALIEN-CALLBACK-ASSEMBLER-WRAPPER #<unused argument> #<unused argument> #<unused argument>)
5: (SB-ALIEN::%ALIEN-CALLBACK-ALIEN #<ALIEN-TYPE (FUNCTION (:CDECL (SB-ALIEN:SIGNED 8)) (SB-ALIEN:SIGNED 8) (SB-ALIEN:SIGNED 8) &REST)> (FUNCTION (:CDECL #1=(SB-ALIEN:SIGNED 8)) #1# #1# &REST) #<FUNCTION (LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER) :IN "/build/cl-cffi/src/cl-cffi/tests/callbacks.lisp") {529EF9AB}>)
6: ("top level form") [toplevel]
7: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for "file /build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/build/cl-cffi/src/cl-cffi/tests/callbacks.fasl" {529E62A3}> :TABLE #(261 #1="/build/cl-cffi/src/cl-cffi/tests/callbacks.lisp" #<PACKAGE "SB-INT"> SB-INT:FIND-UNDELETED-PACKAGE-OR-LOSE "CFFI-TESTS" *PACKAGE* #2="top level form" #<PACKAGE "CFFI-TESTS"> #(12 79 0 6 71 48 69 24 70 4 0 0 ...) #3=#() SB-INT:SFUNCTION NULL ...) :STACK #(0 #<FUNCTION #2# {529EF72B}> #<FUNCTION (LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER) :IN #1#) {529EF9AB}> NIL #(8 79 4 32 40 32 48 3 103 40 3 14 ...) #3# NIL NIL NIL ((SB-INT:SFUNCTION (T T) (INTEGER 0 0)) . #(#(9 3 41 133 2 132 2 131 2 130 2 138 ...) SB-ALIEN:SAP-ALIEN SB-ALIEN-INTERNALS:%SET-DEREF SB-ALIEN-INTERNALS:%SAP-ALIEN SB-SYS:SAP+ SB-ALIEN:DEREF SB-INT:DESCRIPTOR-SAP)) 0 #<SB-KERNEL:LAYOUT (ID=-53) for SB-C::COMPILED-DEBUG-INFO {4F0B7903}> ...) :NAME-BUFFER #("EXPECT-UNSIGNED-LONG-LONG-SUM" "DESCRIPTOR-SAPK-ALIENPEOR-LOSE ") :PRINT NIL :PARTIAL-SOURCE-INFO #S(SB-C::DEBUG-SOURCE :NAMESTRING #1# :CREATED 3952431163 :START-POSITIONS NIL :PLIST NIL)))
8: ((LAMBDA NIL :IN SB-FASL::LOAD-AS-FASL))
9: (SB-IMPL::CALL-WITH-LOADER-PACKAGE-NAMES #<FUNCTION (LAMBDA NIL :IN SB-FASL::LOAD-AS-FASL) {529EA3FB}>)
10: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/build/cl-cffi/src/cl-cffi/tests/callbacks.fasl" {529E62A3}> NIL NIL)
11: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<SB-SYS:FD-STREAM for "file /build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/build/cl-cffi/src/cl-cffi/tests/callbacks.fasl" {529E62A3}> T)
12: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) {7FD2C9FD04CB}> #<SB-SYS:FD-STREAM for "file /build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/build/cl-cffi/src/cl-cffi/tests/callbacks.fasl" {529E62A3}> T #<SB-SYS:FD-STREAM for "file /build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/build/cl-cffi/src/cl-cffi/tests/callbacks.fasl" {529E62A3}>)
13: (LOAD #P"/build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/build/cl-cffi/src/cl-cffi/tests/callbacks.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
14: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<FUNCTION (LAMBDA NIL :IN UIOP/LISP-BUILD:LOAD*) {529E5C8B}> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-FINALIZERS)))
15: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi-tests" "tests" "callbacks">)
16: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
17: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi-tests" "tests" "callbacks">) [fast-method]
18: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi-tests" "tests" "callbacks">) [fast-method]
19: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {4F8E08B3}>) [fast-method]
20: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
21: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {4F8E08B3}>) [fast-method]
22: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "cffi-tests"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
23: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "cffi-tests"> :VERBOSE NIL)
24: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
25: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "cffi-tests"> :VERBOSE NIL) [fast-method]
26: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/LISP-ACTION:LOAD-OP "cffi-tests" :VERBOSE NIL)
27: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
28: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "cffi-tests" :VERBOSE NIL) [fast-method]
29: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {4F8E068B}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
30: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
31: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {4F8E059B}> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
32: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "cffi-tests" :VERBOSE NIL) [fast-method]
33: (ASDF/OPERATE:LOAD-SYSTEM "cffi-tests" :VERBOSE NIL)
34: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/OPERATE:LOAD-SYSTEM "cffi-tests" :VERBOSE NIL) #<NULL-LEXENV>)
35: (SB-EXT:EVAL-TLF (ASDF/OPERATE:LOAD-SYSTEM "cffi-tests" :VERBOSE NIL) 5 NIL)
36: ((LABELS SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (ASDF/OPERATE:LOAD-SYSTEM "cffi-tests" :VERBOSE NIL) 5)
37: ((LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) (ASDF/OPERATE:LOAD-SYSTEM "cffi-tests" :VERBOSE NIL) :CURRENT-INDEX 5)
38: (SB-C::%DO-FORMS-FROM-INFO #<FUNCTION (LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) {7FD2C9FCEE0B}> #<SB-C::SOURCE-INFO {4F8E03B3}> SB-C::INPUT-ERROR-IN-LOAD)
39: (SB-INT:LOAD-AS-SOURCE #<SB-SYS:FD-STREAM for "file /build/cl-cffi/src/cl-cffi/tests/run-tests.lisp" {4F8E00D3}> :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
40: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<SB-SYS:FD-STREAM for "file /build/cl-cffi/src/cl-cffi/tests/run-tests.lisp" {4F8E00D3}> NIL)
41: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) {7FD2C9FCE9CB}> #<SB-SYS:FD-STREAM for "file /build/cl-cffi/src/cl-cffi/tests/run-tests.lisp" {4F8E00D3}> NIL #<SB-SYS:FD-STREAM for "file /build/cl-cffi/src/cl-cffi/tests/run-tests.lisp" {4F8E00D3}>)
42: (LOAD #<SB-SYS:FD-STREAM for "file /build/cl-cffi/src/cl-cffi/tests/run-tests.lisp" {4F8E00D3}> :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
43: ((FLET SB-IMPL::LOAD-SCRIPT :IN SB-IMPL::PROCESS-SCRIPT) #<SB-SYS:FD-STREAM for "file /build/cl-cffi/src/cl-cffi/tests/run-tests.lisp" {4F8E00D3}>)
44: ((FLET SB-UNIX::BODY :IN SB-IMPL::PROCESS-SCRIPT))
45: ((FLET "WITHOUT-INTERRUPTS-BODY-" :IN SB-IMPL::PROCESS-SCRIPT))
46: (SB-IMPL::PROCESS-SCRIPT "tests/run-tests.lisp")
47: (SB-IMPL::TOPLEVEL-INIT)
48: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
49: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
50: (SB-IMPL::%START-LISP)

environment

  • SBCL Version: 2.5.2 (from cache path: /build/.cache/common-lisp/sbcl-2.5.2-linux-rv64g/)
  • Platform: RISC-V 64 bit
  • Library Involved: cl-cffi (specifically the :cffi-tests system)
  • log files:

cl-cffi-0.24.1.r23.gac07d76-2-riscv64-check.log

My operating environment is an riscv64 environment virtual machine of the arch architecture of Windows WSL.

reproduce

The process is as follows:

  1. Obtain the cl-cffi source code and installed all dependencies
  2. Attempt to load the cffi-tests ASDF system, running the provided test script: sbcl –script tests/run-tests.lisp

Expected Result:

The cffi-tests system should load without error, or if callbacks are unsupported, perhaps fail with a more specific “Unsupported feature” error.

Actual Result:

An unhandled SIMPLE-ERROR: please implement is signaled from internal FFI callback machinery.

“please implement” error: This error message appears in ALIEN-CALLBACK-ASSEMBLER-WRAPPER and means that the SBCL developers have not yet written the assembly wrapper code required to generate callbacks for the current target platform (RISC-V 64-bit).