1

I get the following error(s), when building guile. The error is with both the versions, version 2.2.2, version 2.2.0 and version 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 };

I build the package with the following steps:

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

[UPDATE> I had installed libunistring-0.9.7 and gc-7.6.0 to $HOME/.local, so I used the following ./configure command, but to no better result.

$ ./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 says

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

Looking a little deeper, I see that the required file poll.h seems to be defined in lib/poll.h

But I also have a poll.h in the /usr/include/poll.h which redirects to /usr/include/x86_64-linux-gnu/sys/poll.h

There is also libguile/poll.h which redirects to libguile/__scm.h And here is __scm.h there is no definition of struct pollfd

There seems to be something wrong while configuring the package.

I am using an Ubuntu server. And the sysadmin route may take a little more than usual. So I prefer building and installing a local package.

I am trying to compile with gcc-4.8

Does anyone know how to get it to compile?

hell_ical_vortex
  • 361
  • 2
  • 11
  • Why not contact guile maintainers on the mailing list or IRC? `2.2.2` is an 1 day old release when you asked the question. And you should provide the Ubuntu version that you are using. A week ago I've managed to compile the 2.2.0 on Ubuntu 14.04. Are you able to compile 2.2.0 version? – zloster Apr 23 '17 at 14:13
  • I had mailed to the maintainers, and awaiting a reply. Tried with v2.2.0 but the same result. – hell_ical_vortex Apr 23 '17 at 15:50
  • I downloaded the zip file for Guile2.2.2, unzipped into a new directory `~/Guile` (on ubuntu 16.04) then ran `./configure` The resulting script did not post any errors, but `Makefile` was not produced. Now, what do I do? – user3629249 Apr 23 '17 at 18:25
  • 1
    @hell_ical_vortex Here is my snippet with the compile notes: https://gitlab.com/snippets/1657244 You also could check this "Linux from scratch" [guide](http://www.linuxfromscratch.org/blfs/view/svn/general/guile.html). IMO the `poll.h` problems suggest something is not right with the installed kernel headers on your computer: packages `linux-headers-generic`, `linux-headers-X.XX.XXX` and `linux-headers-X.XX.XXX-generic` where X.X.XXX is the version of the `Ubuntu` kernel package you are using. – zloster Apr 24 '17 at 08:03
  • @user3629249 Here is my configure output: https://gitlab.com/snippets/1657244#configure-output Note that you need 3 libraries to be installed before this: `sudo apt-get install libunistring-dev libgc-dev libffi-dev` - these libraries are required. – zloster Apr 24 '17 at 10:22
  • @hell_ical_vortex I've tried to compile `2.2.2` and I'm able to do it using my notes in the snippet above. – zloster Apr 24 '17 at 10:30
  • 1
    @zloster, I installed the three libraries you mentioned. then entered: `./configure && make -f Makefile` it all ran to completion, with on a couple of minor warnings, like a returned value being ignored . So the `guile 2.2.2` works. Suggest you ignore the earlier versions of `guile` – user3629249 Apr 24 '17 at 19:15

1 Answers1

1

I had the same problem on centos 7. I added #include <sys/poll.h> to the source file, fports.c, which had the problem.

Then, ./configure CFLAGS="-std=gnu11"

Daniel Rudy
  • 1,411
  • 12
  • 23
Benjamin
  • 9
  • 1