Guile在Linux上构建错误

Guile build error on linux

本文关键字:构建 错误 Linux Guile      更新时间:2023-10-16

我在构建Guile时会收到以下错误。错误是版本,版本2.2.2,版本2.2.0和版本2.0.14

fports.c: In function 'fport_input_waiting':
fports.c:626:10: error: variable 'pollfd' has initializer but incomplete type
   struct pollfd pollfd = { fdes, POLLIN, 0 };
fports.c:626:34: error: 'POLLIN' undeclared (first use in this function)
   struct pollfd pollfd = { fdes, POLLIN, 0 };
fports.c:626:17: error: storage size of 'pollfd' isn't known
   struct pollfd pollfd = { fdes, POLLIN, 0 };

我通过以下步骤构建包裹:

$ wget "$DOWNLOAD_URL"
$ tar xzf guile-{$VERSION}.tar.gz
$ cd guile-${VERSION}
$ ./configure --prefix=$HOME/.local --disable-static --disable-networking
$ make -j 12

[UPDATE> 我已将libunistring-0.9.7gc-7.6.0安装到$HOME/.local,因此我使用了以下./configure命令,但没有更好的结果。

$ ./configure --prefix=$HOME/.local 
              --with-libunistring-prefix=$HOME/.local 
              --with-sysroot=$HOME/.local 
              --with-libgmp-prefix=$HOME/.local 
              --with-threads                              ## updated configure command

config.log

451 configure:8023: checking for poll.h
452 configure:8023: gcc -c -g -O2  conftest.c >&5
453 configure:8023: $? = 0
454 configure:8023: result: yes

看起来更深一些,我看到所需的文件poll.h似乎是在lib/poll.h

中定义

,但我在/usr/include/poll.h中也有一个poll.h重定向到/usr/include/x86_64-linux-gnu/sys/poll.h

也有libguile/poll.h重定向到libguile/__scm.h这是__scm.h struct pollfd

没有定义

配置软件包时似乎有问题。

我正在使用Ubuntu服务器。Sysadmin路线可能会采用比平时更重要。因此,我更喜欢建造和安装本地软件包。

我试图用gcc-4.8

编译

有人知道如何使其编译吗?

我在CentOS 7上也有相同的问题。我将#include <sys/poll.h>添加到源文件fports.c,该文件有问题。

然后,./configure CFLAGS="-std=gnu11"