Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors doing a gem install on modern gentoo #60

Open
globalcitizen opened this issue Mar 3, 2016 · 5 comments
Open

Errors doing a gem install on modern gentoo #60

globalcitizen opened this issue Mar 3, 2016 · 5 comments
Labels

Comments

@globalcitizen
Copy link

Fetching: phashion-1.1.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing phashion:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby21 extconf.rb
tar xzf /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6.tar.gz 2>&1
env CXXFLAGS=' -pthread' CFLAGS=' -I/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/include  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib  -x c++ ' LDFLAGS=' -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined' ./configure --prefix=/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/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... /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... yes
checking for /etc/redhat-release... no
checking for /etc/slackware-version... no
checking for /etc/debian_version... no
checking for /etc/SuSErelease... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... 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 whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate

*** Configuring image hash ***

checking CImg.h usability... yes
checking CImg.h presence... yes
checking for CImg.h... yes
checking for png_create_read_struct in -lpng... yes
checking for jpeg_read_header in -ljpeg... yes
checking for fftw_plan_dft_r2c_1d in -lfftw3... no
checking for size_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for uint64_t... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating pHash.pc
config.status: creating bindings/Makefile
config.status: creating bindings/java/Makefile
config.status: creating config.h
config.status: creating pHash-config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make || true 2>&1
make  all-recursive
make[1]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6'
Making all in src
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/src'
/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg  -pthread -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c -o pHash.lo pHash.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg -pthread -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c pHash.cpp  -fPIC -DPIC -o pHash.o
mv -f .deps/pHash.Tpo .deps/pHash.Plo
/bin/sh ../libtool --tag=CXX   --mode=link g++  -pthread -ffast-math -O3 -no-undefined -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -L/usr/local/lib -o libpHash.la -rpath /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib pHash.lo    -lpng -ljpeg
libtool: link: ar cru .libs/libpHash.a  pHash.o
libtool: link: ranlib .libs/libpHash.a
libtool: link: ( cd ".libs" && rm -f "libpHash.la" && ln -s "../libpHash.la" "libpHash.la" )
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/src'
Making all in bindings
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[3]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
Making all in examples
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/examples'
g++ -DHAVE_CONFIG_H -I. -I.. -I../src  -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg  -pthread -ffast-math -O3 -MT test_texthash.o -MD -MP -MF .deps/test_texthash.Tpo -c -o test_texthash.o test_texthash.cpp
mv -f .deps/test_texthash.Tpo .deps/test_texthash.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -pthread -ffast-math -O3  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -L/usr/local/lib -o test_texthash test_texthash.o ../src/libpHash.la -lpng -ljpeg
libtool: link: g++ -pthread -ffast-math -O3 -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -o test_texthash test_texthash.o  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. ../src/.libs/libpHash.a -lpng -ljpeg -pthread
g++ -DHAVE_CONFIG_H -I. -I.. -I../src  -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg  -pthread -ffast-math -O3 -MT test_texthash2.o -MD -MP -MF .deps/test_texthash2.Tpo -c -o test_texthash2.o test_texthash2.cpp
mv -f .deps/test_texthash2.Tpo .deps/test_texthash2.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -pthread -ffast-math -O3  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -L/usr/local/lib -o test_texthash2 test_texthash2.o ../src/libpHash.la -lpng -ljpeg
libtool: link: g++ -pthread -ffast-math -O3 -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -o test_texthash2 test_texthash2.o  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. ../src/.libs/libpHash.a -lpng -ljpeg -pthread
g++ -DHAVE_CONFIG_H -I. -I.. -I../src  -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg  -pthread -ffast-math -O3 -MT test_imagephash.o -MD -MP -MF .deps/test_imagephash.Tpo -c -o test_imagephash.o test_imagephash.cpp
mv -f .deps/test_imagephash.Tpo .deps/test_imagephash.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -pthread -ffast-math -O3  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -L/usr/local/lib -o test_image test_imagephash.o ../src/libpHash.la -lpng -ljpeg
libtool: link: g++ -pthread -ffast-math -O3 -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -o test_image test_imagephash.o  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. ../src/.libs/libpHash.a -lpng -ljpeg -pthread
g++ -DHAVE_CONFIG_H -I. -I.. -I../src  -pthread -I/usr/local/include -Dcimg_use_png -Dcimg_use_jpeg  -pthread -ffast-math -O3 -MT test_mhimagehash.o -MD -MP -MF .deps/test_mhimagehash.Tpo -c -o test_mhimagehash.o test_mhimagehash.cpp
mv -f .deps/test_mhimagehash.Tpo .deps/test_mhimagehash.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -pthread -ffast-math -O3  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -L/usr/local/lib -o test_mhimagehash test_mhimagehash.o ../src/libpHash.la -lpng -ljpeg
libtool: link: g++ -pthread -ffast-math -O3 -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -o test_mhimagehash test_mhimagehash.o  -L/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib -L/usr/local/lib -L. ../src/.libs/libpHash.a -lpng -ljpeg -pthread
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/examples'
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6'
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6'
make[1]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6'
make install || true 2>&1
Making install in src
make[1]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/src'
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/src'
 /bin/mkdir -p '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libpHash.la '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib'
libtool: install: /usr/bin/install -c .libs/libpHash.lai /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib/libpHash.la
libtool: install: /usr/bin/install -c .libs/libpHash.a /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib/libpHash.a
libtool: install: chmod 644 /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib/libpHash.a
libtool: install: ranlib /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib/libpHash.a
libtool: finish: PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/sbin" ldconfig -n /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/include'
 /usr/bin/install -c -m 644 pHash.h '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/include'
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/src'
make[1]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/src'
Making install in bindings
make[1]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[3]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
make[1]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/bindings'
Making install in examples
make[1]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/examples'
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/examples'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/examples'
make[1]: Leaving directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6/examples'
make[1]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6'
make[2]: Entering directory '/usr/local/lib64/ruby/gems/2.1.0/gems/phashion-1.1.1/ext/phashion_ext/pHash-0.9.6'
make[2]: Nothing to be done for 'install-exec-am'.
@mlen
Copy link

mlen commented Aug 10, 2016

@globalcitizen were you able to find a workaround for this? Looks like the gem is no longer maintained…

@globalcitizen
Copy link
Author

No recollection, sorry.

@westonplatter
Copy link
Owner

@globalcitizen any chance you can try a more recent version? The most up to date version is 1.2.0.

@globalcitizen
Copy link
Author

I can't even remember what this is and am currently very busy and no longer interested, sorry.

@mlen
Copy link

mlen commented Nov 8, 2016

@westonplatter 1.2.0 was broken too, I patched it locally, but later removed the dependency on phashion and I think I don't have the patch around. The problem was linking order in https://github.com/westonplatter/phashion/blob/master/ext/phashion_ext/extconf.rb#L43. Gentoo uses --as-needed flag of ld(1) by default, adjusting the order should fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants