rdp / google_hash

wrapper for google's hash functions, for ruby
BSD 3-Clause "New" or "Revised" License
92 stars 16 forks source link

0.8.3 not building on Mac OS X again #28

Closed axos88 closed 10 years ago

axos88 commented 10 years ago

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/avandra/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
building local copy/version of google sparse/dense hash library
sh configure --prefix=/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
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... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for memcpy... yes
checking for memmove... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for uint16_t... yes
checking for u_int16_t... yes
checking for __uint16... no
checking for long long... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking how to run the C++ preprocessor... g++ -E
checking google/malloc_extension.h usability... no
checking google/malloc_extension.h presence... no
checking for google/malloc_extension.h... no
checking whether the compiler implements namespaces... yes
checking the location of hash_map... <tr1/unordered_map>
checking how to include hash_fun directly... <tr1/functional>
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
[ -d src/sparsehash/internal ] || mkdir -p src/sparsehash/internal
echo "/*" > src/sparsehash/internal/_sparsehash_config
echo " * NOTE: This file is for internal use only." >> src/sparsehash/internal/_sparsehash_config
echo " *       Do not use these #defines in your own program!" >> src/sparsehash/internal/_sparsehash_config
echo " */" >> src/sparsehash/internal/_sparsehash_config
awk '{prevline=currline; currline=$0;} \
            /^#/ {in_second_file = 1;} \
            !in_second_file {if (currline !~ /^ *$/) {inc[currline]=0}}; \
            in_second_file { for (i in inc) { \
                               if (index(currline, i) != 0) { \
                                  print "\n"prevline"\n"currline; \
                                  delete inc[i]; \
                               } \
                             } }' \
    ./src/config.h.include ./src/config.h \
    >> src/sparsehash/internal/_sparsehash_config
mv -f src/sparsehash/internal/_sparsehash_config src/sparsehash/internal/sparseconfig.h
make  all-am
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT template_util_unittest.o -MD -MP -MF .deps/template_util_unittest.Tpo -c -o template_util_unittest.o `test -f 'src/template_util_unittest.cc' || echo './'`src/template_util_unittest.cc
mv -f .deps/template_util_unittest.Tpo .deps/template_util_unittest.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o template_util_unittest template_util_unittest.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT type_traits_unittest.o -MD -MP -MF .deps/type_traits_unittest.Tpo -c -o type_traits_unittest.o `test -f 'src/type_traits_unittest.cc' || echo './'`src/type_traits_unittest.cc
src/type_traits_unittest.cc:88:7: warning: private field 'n_' is not used [-Wunused-private-field]
  int n_;
      ^
src/type_traits_unittest.cc:98:7: warning: private field 'n_' is not used [-Wunused-private-field]
  int n_;
      ^
src/type_traits_unittest.cc:112:7: warning: private field 'n_' is not used [-Wunused-private-field]
  int n_;
      ^
src/type_traits_unittest.cc:138:7: warning: private field 'n_' is not used [-Wunused-private-field]
  int n_;
      ^
4 warnings generated.
mv -f .deps/type_traits_unittest.Tpo .deps/type_traits_unittest.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o type_traits_unittest type_traits_unittest.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT libc_allocator_with_realloc_test.o -MD -MP -MF .deps/libc_allocator_with_realloc_test.Tpo -c -o libc_allocator_with_realloc_test.o `test -f 'src/libc_allocator_with_realloc_test.cc' || echo './'`src/libc_allocator_with_realloc_test.cc
mv -f .deps/libc_allocator_with_realloc_test.Tpo .deps/libc_allocator_with_realloc_test.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o libc_allocator_with_realloc_test libc_allocator_with_realloc_test.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT sparsetable_unittest.o -MD -MP -MF .deps/sparsetable_unittest.Tpo -c -o sparsetable_unittest.o `test -f 'src/sparsetable_unittest.cc' || echo './'`src/sparsetable_unittest.cc
mv -f .deps/sparsetable_unittest.Tpo .deps/sparsetable_unittest.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o sparsetable_unittest sparsetable_unittest.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT hashtable_test.o -MD -MP -MF .deps/hashtable_test.Tpo -c -o hashtable_test.o `test -f 'src/hashtable_test.cc' || echo './'`src/hashtable_test.cc
In file included from src/hashtable_test.cc:63:
./src/hash_test_interface.h:436:50: warning: unused parameter 'k' [-Wunused-parameter]
  void set_empty_key(const typename p::key_type& k) { }
                                                 ^
./src/hash_test_interface.h:543:50: warning: unused parameter 'k' [-Wunused-parameter]
  void set_empty_key(const typename p::key_type& k) { }
                                                 ^
./src/hash_test_interface.h:659:50: warning: unused parameter 'k' [-Wunused-parameter]
  void set_empty_key(const typename p::key_type& k) { }
                                                 ^
3 warnings generated.
mv -f .deps/hashtable_test.Tpo .deps/hashtable_test.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o hashtable_test hashtable_test.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT simple_test.o -MD -MP -MF .deps/simple_test.Tpo -c -o simple_test.o `test -f 'src/simple_test.cc' || echo './'`src/simple_test.cc
mv -f .deps/simple_test.Tpo .deps/simple_test.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o simple_test simple_test.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT simple_compat_test.o -MD -MP -MF .deps/simple_compat_test.Tpo -c -o simple_compat_test.o `test -f 'src/simple_compat_test.cc' || echo './'`src/simple_compat_test.cc
mv -f .deps/simple_compat_test.Tpo .deps/simple_compat_test.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o simple_compat_test simple_compat_test.o
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2 -MT time_hash_map-time_hash_map.o -MD -MP -MF .deps/time_hash_map-time_hash_map.Tpo -c -o time_hash_map-time_hash_map.o `test -f 'src/time_hash_map.cc' || echo './'`src/time_hash_map.cc
mv -f .deps/time_hash_map-time_hash_map.Tpo .deps/time_hash_map-time_hash_map.Po
g++ -Wall -W -Wwrite-strings -Woverloaded-virtual -Wshadow -g -O2   -o time_hash_map time_hash_map-time_hash_map.o
echo 'prefix=/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed' > "libsparsehash.pc".tmp
echo 'exec_prefix='`echo '/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed' | sed 's@^/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed@${prefix}@'` >> "libsparsehash.pc".tmp
sed: 1: "s@^/Users/avandra/.rvm/ ...": bad flag in substitute command: '$'
echo 'libdir='`echo '/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed/lib' | sed 's@^/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed@${exec_prefix}@'` >> "libsparsehash.pc".tmp
sed: 1: "s@^/Users/avandra/.rvm/ ...": bad flag in substitute command: '$'
echo 'includedir='`echo '/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed/include' | sed 's@^/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed@${prefix}@'` >> "libsparsehash.pc".tmp
sed: 1: "s@^/Users/avandra/.rvm/ ...": bad flag in substitute command: '$'
echo '' >> "libsparsehash.pc".tmp
echo 'Name: sparsehash' >> "libsparsehash.pc".tmp
echo 'Version: 2.0.2' >> "libsparsehash.pc".tmp
grep '^Summary:' ./packages/rpm/rpm.spec | sed s/^Summary:/Description:/ | head -n1 >> "libsparsehash.pc".tmp
grep '^URL: ' ./packages/rpm/rpm.spec >> "libsparsehash.pc".tmp
echo 'Requires:' >> "libsparsehash.pc".tmp
echo 'Libs:' >> "libsparsehash.pc".tmp
echo 'Cflags: -I${includedir}' >> "libsparsehash.pc".tmp
mv -f "libsparsehash.pc".tmp "libsparsehash.pc"
make  install-am
test -z "/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed/lib" || ./install-sh -c -d "/Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/local_installed/lib"
/bin/sh: ./install-sh: Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 126
make[1]: *** [install-am] Error 2
make: *** [install] Error 2
extconf.rb:109:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:109:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for tr1/functional... yes
checking for functional... yes
checking for tr1/functional... yes
creating Makefile

make "DESTDIR="
compiling dense_double_to_double.cpp
dense_double_to_double.cpp:3:10: fatal error: 'google/dense_hash_map' file not found
#include <google/dense_hash_map>
         ^
1 error generated.
make: *** [dense_double_to_double.o] Error 1

Gem files will remain installed in /Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3 for inspection.
Results logged to /Users/avandra/.rvm/gems/ruby-2.0.0-p353@hit_counter/gems/google_hash-0.8.3/ext/gem_make.out

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