arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 127 forks source link

Failure to build on powerpc64le #161

Open daxtens opened 8 years ago

daxtens commented 8 years ago

Hi,

When trying to build your gem on powerpc64le, I get the following error:

Configuring libmemcached.
env CFLAGS='-fPIC  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimp$
icit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  -fPIC   -fPIC' LDFLAGS='-fPIC -L. -fstack-protector -rdynamic -Wl,-export-dynamic -L. -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/local/rv$
/rubies/ruby-2.2.2/lib' ./configure --prefix=/usr/local/rvm/gems/ruby-2.2.2/gems/memcached-1.8.0/ext --libdir=/usr/local/rvm/gems/ruby-2.2.2/gems/memcached-1.8.0/ext/lib --without-memcached --disable-shared --disable-utils --disab$
e-dependency-tracking CC="gcc"  2>&1
checking build system type... config/config.guess: unable to guess system type

This script, last modified 2009-04-27, 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/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 = 2009-04-27

uname -m = ppc64le
uname -r = 4.2.0-30-generic
uname -s = Linux
uname -v = #35-Ubuntu SMP Fri Feb 19 13:50:54 UTC 2016

/usr/bin/uname -p = 
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = 
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = ppc64le
UNAME_RELEASE = 4.2.0-30-generic
UNAME_SYSTEM  = Linux
UNAME_VERSION = #35-Ubuntu SMP Fri Feb 19 13:50:54 UTC 2016
configure: error: cannot guess build type; you must specify one
*** extconf.rb failed ***

I think this is because of the version of libmemcached you bundle: if you upgrade the bundled version to the latest (1.0.18) or use the system version if it's available, it should fix things. I can provide a pull request to bundle the latest version if that helps.

arthurnn commented 8 years ago

Are you building the gem from rubygems or from master?

daxtens commented 8 years ago

I was building from rubygems, I've just tried building from master and I get the same message. (I also tried building libmemcached by itself, and verified that any version short of 1.0.18 fails with an outdated config.{sub,guess}.)

jakeonfire commented 2 years ago

i'm having this issue now for ubuntu on M1 (via docker). the correct system type is aarch64-unknown-linux-gnu and with newer config.guess and config.sub (e.g. /usr/share/automake-1.16/config.guess) the extension build works, but i'm not sure how to pass the type into the extension build from gem install memcached -v 1.8.0. is this possible?

jakeonfire commented 2 years ago

ended up switching to dalli

BeatyThomas commented 1 year ago

Having same issue. My company went to m1's across the board and now, we cannot build the Gemfile due to this.