在 debian Bulleye 上编译 ocaml 项目时出现问题:对 shm_unlink 和 shm_open 的未定义引用

问题描述

尝试从编译 ocaml 项目

https://gitlab.com/benjgregoire/maskverif/

我(对 ocaml 一无所知)在安装了所有缺失的库后得到错误消息

name_list = ['John','Mike','Smith','Adam']

user_input = input('Please input a name: ')

if not user_input in name_list:
    print('Please input a valid name')

从我在互联网上找到的内容来看,看起来库 rt 是通过 -lrt 在错误的位置提供给 gcc 链接器的,但我不知道如何解决这个问题,因为它被一些 ocaml 二进制文件调用

我该如何解决这个问题?

解决方法

this issue 中报告了同样的问题。

维护者的回应如下:

这个问题很难解决。 您可以在 SPINI 分支上找到当前的修复。

因此,您可以尝试检出 SPINI 分支并尝试构建。


据我所知,问题是在 Makefile 中,他们无法正确地将 -lrt 传递给链接器。在 SPINI 分支,他们switched 使用沙丘构建系统并解决了这个问题。