Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error on Alpine #225

Closed
mhenrixon opened this issue Aug 30, 2019 · 8 comments
Closed

Compilation error on Alpine #225

mhenrixon opened this issue Aug 30, 2019 · 8 comments
Milestone

Comments

@mhenrixon
Copy link

/app # cat /usr/local/bundle/extensions/x86_64-linux/2.5.0-static/nio4r-2.5.1/gem_make.out
current directory: /usr/local/bundle/gems/nio4r-2.5.1/ext/nio4r
/usr/local/bin/ruby -r ./siteconf20190830-10819-sr2s6k.rb extconf.rb
checking for unistd.h... yes
checking for sys/select.h... yes
checking for port_event_t in poll.h... no
checking for sys/epoll.h... yes
checking for sys/event.h... no
checking for port_event_t in port.h... no
checking for sys/resource.h... yes
creating Makefile

current directory: /usr/local/bundle/gems/nio4r-2.5.1/ext/nio4r
make "DESTDIR=" clean

current directory: /usr/local/bundle/gems/nio4r-2.5.1/ext/nio4r
make "DESTDIR="
compiling bytebuffer.c
compiling monitor.c
compiling nio4r_ext.c
In file included from nio4r_ext.c:7:0:
../libev/ev.c:519:48: warning: "/*" within comment [-Wcomment]
 /*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */

In file included from nio4r_ext.c:7:0:
../libev/ev.c: In function 'ecb_binary32_to_binary16':
../libev/ev.c:1310:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (e < (14 - 24)) /* might not be sharp, but is good enough */
             ^
../libev/ev.c: At top level:
../libev/ev.c:1620:73: fatal error: linux/aio_abi.h: No such file or directory
 # include <linux/aio_abi.h> /* probably only needed for aio_context_t */
                                                                         ^
compilation terminated.
make: *** [Makefile:242: nio4r_ext.o] Error 1

make failed, exit code 2
@mhenrixon
Copy link
Author

Fixed with apk add linux-headers

@esambo
Copy link

esambo commented Sep 16, 2019

This was introduced by version 2.5.0 (linux/aio_abi.h is include'd by ext/libev/ev.c and ext/libev/ev_linuxaio.c)

@ioquatix
Copy link
Member

Do you propose a better solution?

@esambo
Copy link

esambo commented Sep 17, 2019

mentioning it in the changelog would improve the visibility of it, and inform people ahead of time, rather than having to google the error

@ioquatix
Copy link
Member

I just wondered if we can detect if that header exists and avoid compiling that code if not, to avoid any problem at all.

@ioquatix ioquatix reopened this Sep 24, 2019
@ioquatix
Copy link
Member

I'll use extconf.rb to detect if the headers are available and conditionally compile ev_linuxaio.c.

@ioquatix ioquatix added this to the v2.5.2 milestone Sep 24, 2019
@ioquatix
Copy link
Member

ioquatix commented Sep 24, 2019

Okay this has been released in v2.5.2. It was live streamed https://youtu.be/YqYYrpvGWo4

In the future please create new issues for bugs like this.

@esambo
Copy link

esambo commented Sep 24, 2019

It would be nice to maintain the CHANGES.md file

cmur2 added a commit to cmur2/dyndnsd that referenced this issue Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants