Bootsnap not compiling on branch main ( FreeBSD 10.0 ) [ fatal error: sys/xattr.h: No such file or directory #include <sys/xattr.h> ]

(HugeSpider) #1

branch: master

since bootsnap was added on May 11 when i try to

env GYP_DEFINES="make_clang_dir=" CXX=/usr/bin/clang++ CC=/usr/bin/clang bundle install --without development test

I get error

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/home/spider/.rvm/gems/ruby-2.3.3/gems/bootsnap-0.2.14/ext/bootsnap
/home/spider/.rvm/rubies/ruby-2.3.3/bin/ruby -r ./siteconf20170515-61851-u8spxp.rb extconf.rb
creating Makefile

current directory: /usr/home/spider/.rvm/gems/ruby-2.3.3/gems/bootsnap-0.2.14/ext/bootsnap
make "DESTDIR=" clean

current directory: /usr/home/spider/.rvm/gems/ruby-2.3.3/gems/bootsnap-0.2.14/ext/bootsnap
make "DESTDIR="
compiling bootsnap.c
bootsnap.c:3:23: fatal error: sys/xattr.h: No such file or directory
 #include <sys/xattr.h>
compilation terminated.
*** Error code 1

make: stopped in /usr/home/spider/.rvm/gems/ruby-2.3.3/gems/bootsnap-0.2.14/ext/bootsnap

make failed, exit code 1

Gem files will remain installed in /home/spider/.rvm/gems/ruby-2.3.3/gems/bootsnap-0.2.14 for inspection.
Results logged to /home/spider/.rvm/gems/ruby-2.3.3/extensions/x86_64-freebsd-10/2.3.0/bootsnap-0.2.14/gem_make.out

An error occurred while installing bootsnap (0.2.14), and Bundler cannot continue.
Make sure that `gem install bootsnap -v '0.2.14'` succeeds before bundling.

I assume that it’s something similar to issue with platform triplet as mentioned in Exceeding max allowed process count on accounts with limits when trying to `gem install libv8` · Issue #236 · cowboyd/libv8 · GitHub

Before bootsnap was added I had no issues.

(HugeSpider) #2

I submited bug report also to bootsnap:

(Sam Saffron) #3

Note, I had not intention of breaking anything but we are going to need your help here submitting a PR to bootsnap. the xattr stuff is not needed for a lot of what it does, if it is not detected in mkmf it should just skip that part.

(Sam Saffron) #4

This is now sorted per:

(Sam Saffron) #5