Hi,
Newbie here. I am trying to install middleman on ubuntu.
I have installed all the dependencies that I found: slim,
zlib1g-dev, build-essential, ruby-dev, zlibc.
The makefile part failed. The mkmf log has compilation errors from
stat.h. Googling a bit with error, it appears to be related to multiple
versions of time.h in the include path. I did find a few versions, but
no idea where to change the include path or if this is the right thing
to do.
Here’s the error from the gem install.
Building native extensions. This could take a while…
ERROR: Error installing middleman:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20160528-26401-yni4k9.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may
need configuration options.
I looked at the mkmf.log and it had errors related to stat.h
pkg-config --libs libffi
=> “-lffi\n”
“gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0
-I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu
-L. -Wl,-Bsymbolic-functions -Wl,-z,relro -fstack-protector -rdynamic
-Wl,-export-dynamic -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc”
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:104:0,
from /usr/include/ruby-2.3.0/ruby/defines.h:31,
from /usr/include/ruby-2.3.0/ruby/ruby.h:36,
from /usr/include/ruby-2.3.0/ruby.h:33,
from conftest.c:1:
/usr/include/x86_64-linux-gnu/bits/stat.h:91:21: error: field ‘st_atim’
has incomplete type
struct timespec st_atim; /* Time of last access. /
^
/usr/include/x86_64-linux-gnu/bits/stat.h:92:21: error: field ‘st_mtim’
has incomplete type
struct timespec st_mtim; / Time of last modification. */
^
There are more errors all from stat.h file.
Here are the versions of time.h:
-rw-r–r-- 1 root root 6673 May 28 15:30 /usr/include/time.h
-rw-r–r-- 1 root root 1572 May 12 19:52 /usr/include/linux/time.h
-rw-r–r-- 1 root root 6673 Apr 14 18:09
/usr/include/x86_64-linux-gnu/sys/time.h
-rw-r–r-- 1 root root 3465 Apr 14 18:09
/usr/include/x86_64-linux-gnu/bits/time.h