Unable to install phashion gem on ubuntu
Caleb-Mantey opened this issue · comments
Don't know why i get this error even after installing image magic libjpeg-dev and libpng-dev
Building native extensions. This could take a while...
ERROR: Error installing phashion:
ERROR: Failed to build gem native extension.
current directory: /home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext
/home/dunga/.rvm/rubies/ruby-2.6.6/bin/ruby -I /home/dunga/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0 -r ./siteconf20220216-26314-1va1abb.rb extconf.rb
tar xzf /home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/pHash-0.9.6.tar.gz 2>&1
env CXXFLAGS=' -pthread' CFLAGS=' -I/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/include -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -x c++ ' LDFLAGS=' -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic' ./configure --prefix=/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext --disable-audio-hash --disable-video-hash --disable-shared --with-pic 2>&1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking dependency style of gcc... gcc3
checking for /etc/gentoo-release... no
checking for /etc/redhat-release... no
checking for /etc/slackware-version... no
checking for /etc/debian_version... yes
checking for /etc/SuSErelease... no
checking build system type... ./config.guess: unable to guess system type
This script, last modified 2008-01-23, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
config.guess timestamp = 2008-01-23
uname -m = aarch64
uname -r = 5.4.0-99-generic
uname -s = Linux
uname -v = #112-Ubuntu SMP Wed Feb 2 17:13:12 UTC 2022
/usr/bin/uname -p = aarch64
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch = aarch64
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = aarch64
UNAME_RELEASE = 5.4.0-99-generic
UNAME_SYSTEM = Linux
UNAME_VERSION = #112-Ubuntu SMP Wed Feb 2 17:13:12 UTC 2022
configure: error: cannot guess build type; you must specify one
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/dunga/.rvm/rubies/ruby-2.6.6/bin/$(RUBY_BASE_NAME)
extconf.rb:24:in `block (2 levels) in <main>': 'env CXXFLAGS=' -pthread' CFLAGS=' -I/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/include -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -x c++ ' LDFLAGS=' -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic' ./configure --prefix=/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext --disable-audio-hash --disable-video-hash --disable-shared --with-pic 2>&1' failed (RuntimeError)
from extconf.rb:22:in `chdir'
from extconf.rb:22:in `block in <main>'
from extconf.rb:14:in `chdir'
from extconf.rb:14:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0 for inspection.
Results logged to /home/dunga/.rvm/gems/ruby-2.6.6/extensions/aarch64-linux/2.6.0/phashion-1.2.0/gem_make.out
Don't know why i get this error even after installing image magic libjpeg-dev and libpng-dev
Building native extensions. This could take a while... ERROR: Error installing phashion: ERROR: Failed to build gem native extension. current directory: /home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext /home/dunga/.rvm/rubies/ruby-2.6.6/bin/ruby -I /home/dunga/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0 -r ./siteconf20220216-26314-1va1abb.rb extconf.rb tar xzf /home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/pHash-0.9.6.tar.gz 2>&1 env CXXFLAGS=' -pthread' CFLAGS=' -I/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/include -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -x c++ ' LDFLAGS=' -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic' ./configure --prefix=/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext --disable-audio-hash --disable-video-hash --disable-shared --with-pic 2>&1 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... unsupported checking dependency style of gcc... gcc3 checking for /etc/gentoo-release... no checking for /etc/redhat-release... no checking for /etc/slackware-version... no checking for /etc/debian_version... yes checking for /etc/SuSErelease... no checking build system type... ./config.guess: unable to guess system type This script, last modified 2008-01-23, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run (./config.guess) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> in order to provide the needed information to handle your system. config.guess timestamp = 2008-01-23 uname -m = aarch64 uname -r = 5.4.0-99-generic uname -s = Linux uname -v = #112-Ubuntu SMP Wed Feb 2 17:13:12 UTC 2022 /usr/bin/uname -p = aarch64 /bin/uname -X = hostinfo = /bin/universe = /usr/bin/arch -k = /bin/arch = aarch64 /usr/bin/oslevel = /usr/convex/getsysinfo = UNAME_MACHINE = aarch64 UNAME_RELEASE = 5.4.0-99-generic UNAME_SYSTEM = Linux UNAME_VERSION = #112-Ubuntu SMP Wed Feb 2 17:13:12 UTC 2022 configure: error: cannot guess build type; you must specify one *** 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. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/dunga/.rvm/rubies/ruby-2.6.6/bin/$(RUBY_BASE_NAME) extconf.rb:24:in `block (2 levels) in <main>': 'env CXXFLAGS=' -pthread' CFLAGS=' -I/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/include -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -x c++ ' LDFLAGS=' -L/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic' ./configure --prefix=/home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0/ext/phashion_ext --disable-audio-hash --disable-video-hash --disable-shared --with-pic 2>&1' failed (RuntimeError) from extconf.rb:22:in `chdir' from extconf.rb:22:in `block in <main>' from extconf.rb:14:in `chdir' from extconf.rb:14:in `<main>' extconf failed, exit code 1 Gem files will remain installed in /home/dunga/.rvm/gems/ruby-2.6.6/gems/phashion-1.2.0 for inspection. Results logged to /home/dunga/.rvm/gems/ruby-2.6.6/extensions/aarch64-linux/2.6.0/phashion-1.2.0/gem_make.out
I got the issue fixed on a mac m1 from here
#19 (comment)