Caffe-segnet: redefinition of argument 'compiler-bindir' - makefile

It's been days trying to compile caffe-segnet, and now stuck at this error, I m using gcc gcc (Ubuntu 4.8.5-4ubuntu8) 4.8.5
to compile caffe-segnet. I'm using Cuda 9.0, cudnn v2 and opencv 3.3.0 as mentionned in the documentation of caffe and opencv. Disabling cudnn or not in the Makefile.config doesn't change anything as mentioned here.
Before that I was using cuda 10.0 and cudnn 7.0 and deleted all because when starting my model there was so many errors. Here is the output error when using make all:
CXX src/caffe/common.cpp
/usr/bin/g++-4.8 src/caffe/common.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -std=c++11 -MMD -MP -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/common.o 2> .build_release/src/caffe/common.o.warnings.txt \
|| (cat .build_release/src/caffe/common.o.warnings.txt; exit 1)
CXX src/caffe/internal_thread.cpp
/usr/bin/g++-4.8 src/caffe/internal_thread.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -std=c++11 -MMD -MP -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/internal_thread.o 2> .build_release/src/caffe/internal_thread.o.warnings.txt \
|| (cat .build_release/src/caffe/internal_thread.o.warnings.txt; exit 1)
NVCC src/caffe/layers/upsample_layer.cu
/usr/local/cuda/bin/nvcc -D_FORCE_INLINES -ccbin=/usr/bin/g++-4.8 -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -std=c++11 -ccbin=/usr/bin/g++-4.8 -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -M src/caffe/layers/upsample_layer.cu -o .build_release/cuda/src/caffe/layers/upsample_layer.d \
-odir .build_release/cuda/src/caffe/layers
nvcc fatal : redefinition of argument 'compiler-bindir'
Makefile:544: recipe for target '.build_release/cuda/src/caffe/layers/upsample_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/upsample_layer.o] Error 1
and the line 544 in Makefile which the error come from:
...
# cat $#.$(WARNS_EXT)
$(BUILD_DIR)/cuda/%.o: %.cu | $(ALL_BUILD_DIRS)
544> # echo NVCC $<
$(Q)$(CUDA_DIR)/bin/nvcc $(NVCCFLAGS) $(CUDA_ARCH) -M $< -o ${#:.o=.d} \
-odir $(#D)
...
Notice that I tried compiling it with gcc 5 and gcc 7 and the same error occur ! Any idea guys ?
EDIT 1:
I also added this CUSTOM_CXX := /usr/bin/g++-4.8 to Makefile.config

Since no one aswered I finaly found a solution, the error is caused because the same argument is called twice, in my Makefile I added those lines of code:
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
to avoid this error /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
In the same file in the complete build flags, we have the same flag:
...
# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
# mex may invoke an older gcc that is too liberal with -Wuninitalized
...
what I did is commenting my flag I added:
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
#NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
and add -std=c++11 argument to NVCCFLAGS in the complete build flags section, it turned to be something like this:
...
# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
# mex may invoke an older gcc that is too liberal with -Wuninitalized
...
Before doing a make all after editing your Makefile, make sure you do a make clean or you'll get the same error !

Related

Error installing Mike's Arbitrary Precision Math Library (MAPM)

Please I need help, I need to install this library quickly for a project I am working on (https://github.com/LuaDist/mapm) and I don't understand makefile. Per the instructions I run the command "make" and get the following output:
gcc -c -Wall -O2 mapmhsin.c
gcc -c -Wall -O2 mapm_pow.c
gcc -c -Wall -O2 mapm_log.c
gcc -c -Wall -O2 mapm_lg2.c
gcc -c -Wall -O2 mapm_lg4.c
gcc -c -Wall -O2 mapm_exp.c
gcc -c -Wall -O2 mapm_lg3.c
gcc -c -Wall -O2 mapmasin.c
gcc -c -Wall -O2 mapmasn0.c
gcc -c -Wall -O2 mapm_sin.c
gcc -c -Wall -O2 mapm5sin.c
gcc -c -Wall -O2 mapmrsin.c
gcc -c -Wall -O2 mapm_cpi.c
gcc -c -Wall -O2 mapmsqrt.c
gcc -c -Wall -O2 mapmcbrt.c
gcc -c -Wall -O2 mapmgues.c
gcc -c -Wall -O2 mapmfact.c
gcc -c -Wall -O2 mapm_gcd.c
gcc -c -Wall -O2 mapmipwr.c
gcc -c -Wall -O2 mapmpwr2.c
gcc -c -Wall -O2 mapm_rnd.c
gcc -c -Wall -O2 mapm_flr.c
gcc -c -Wall -O2 mapm_fpf.c
gcc -c -Wall -O2 mapm_rcp.c
gcc -c -Wall -O2 mapmstck.c
gcc -c -Wall -O2 mapm_div.c
gcc -c -Wall -O2 mapm_mul.c
gcc -c -Wall -O3 mapmfmul.c
gcc -c -Wall -O2 mapm_fft.c
gcc -c -Wall -O2 mapm_add.c
gcc -c -Wall -O2 mapmistr.c
gcc -c -Wall -O2 mapm_set.c
gcc -c -Wall -O2 mapm_fam.c
gcc -c -Wall -O3 mapmutil.c
gcc -c -Wall -O2 mapmutl2.c
gcc -c -Wall -O2 mapmutl1.c
gcc -c -Wall -O2 mapmcnst.c
rm -f libmapm.a
ar rc libmapm.a mapmhasn.o mapmhsin.o mapm_pow.o mapm_log.o mapm_lg2.o mapm_lg4.o mapm_exp.o mapm_lg3.o mapmasin.o mapmasn0.o mapm_sin.o mapm5sin.o mapmrsin.o mapm_cpi.o mapmsqrt.o mapmcbrt.o mapmgues.o mapmfact.o mapm_gcd.o mapmipwr.o mapmpwr2.o mapm_rnd.o mapm_flr.o mapm_fpf.o mapm_rcp.o mapmstck.o mapm_div.o mapm_mul.o mapmfmul.o mapm_fft.o mapm_add.o mapmistr.o mapm_set.o mapm_fam.o mapmutil.o mapmutl2.o mapmutl1.o mapmcnst.o
gcc -c -Wall -O2 calc.c
gcc -s -static -o calc calc.o libmapm.a -lm
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [Makefile:63: calc] Error 1
It looks like everything goes fine until the end:
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
Is there any way I fix this, and what does the command -lm and -lc do?

iruby kernel can't install rbczmq

Just installed the iRuby kernel following the istructions but when i do jupyter-notebook command and start a new notebook kernel dies and there is a problem reported on the terminal about libczmq:
[I 18:05:11.900 NotebookApp] Kernel started: bcb56cdd-964a-4dae-8a40-76dbcbe7e418
WARNING: ::CZMQ::FFI is not available without libczmq.
Unable to load this gem. The libzmq library (or DLL) could not be found.
If this is a Windows platform, make sure libzmq.dll is on the PATH.
If the DLL was built with mingw, make sure the other two dependent DLLs,
libgcc_s_sjlj-1.dll and libstdc++6.dll, are also on the PATH.
For non-Windows platforms, make sure libzmq is located in this search path:
["/var/lib/gems/2.3.0/gems/ffi-rzmq-core-1.0.6/lib/ffi-rzmq-core/../../ext/libzmq.so", "/home/randomx/anaconda3/bin/libzmq.so", "/home/randomx/bin/libzmq.so", "/home/randomx/.local/bin/libzmq.so", "/usr/local/sbin/libzmq.so", "/usr/local/bin/libzmq.so", "/usr/sbin/libzmq.so", "/usr/bin/libzmq.so", "/sbin/libzmq.so", "/bin/libzmq.so", "/usr/games/libzmq.so", "/usr/local/games/libzmq.so", "/snap/bin/libzmq.so", "/usr/lib/libzmq.so", "/usr/local/lib/libzmq.so", "/opt/local/lib/libzmq.so", "/usr/lib64/libzmq.so"]
You should install cztop, rbczmq or ffi_rzmq before running iruby notebook. See README.
F, [2017-03-26T18:05:12.031981 #13088] FATAL -- : Kernel died: uninitialized constant IRuby::Kernel::Session
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:18:in `initialize'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `new'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'
/var/lib/gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'
/usr/local/bin/iruby:23:in `load'
/usr/local/bin/iruby:23:in `<main>'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:18:in `initialize': uninitialized constant IRuby::Kernel::Session (NameError)
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `new'
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'
from /var/lib/gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'
from /usr/local/bin/iruby:23:in `load'
from /usr/local/bin/iruby:23:in `<main>'
[I 18:05:14.903 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING: ::CZMQ::FFI is not available without libczmq.
So I installed cztop and ffi_rzmq but when i go to install rbczmq I got an error install message like this:
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating src/libczmq.pc
config.status: creating addons/Makefile
config.status: creating src/platform.h
config.status: executing depfiles commands
config.status: executing libtool commands
"make all && make install"
Making all in src
make[1]: ingresso nella directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
make all-am
make[2]: ingresso nella directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c -o zauth.lo zauth.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c zauth.c -o zauth.o
mv -f .deps/zauth.Tpo .deps/zauth.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c -o zbeacon.lo zbeacon.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c zbeacon.c -o zbeacon.o
mv -f .deps/zbeacon.Tpo .deps/zbeacon.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c -o zcert.lo zcert.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c zcert.c -o zcert.o
mv -f .deps/zcert.Tpo .deps/zcert.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c -o zcertstore.lo zcertstore.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c zcertstore.c -o zcertstore.o
mv -f .deps/zcertstore.Tpo .deps/zcertstore.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c -o zchunk.lo zchunk.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c zchunk.c -o zchunk.o
mv -f .deps/zchunk.Tpo .deps/zchunk.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c -o zclock.lo zclock.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c zclock.c -o zclock.o
mv -f .deps/zclock.Tpo .deps/zclock.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c -o zconfig.lo zconfig.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c zconfig.c -o zconfig.o
mv -f .deps/zconfig.Tpo .deps/zconfig.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c -o zctx.lo zctx.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c zctx.c -o zctx.o
mv -f .deps/zctx.Tpo .deps/zctx.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c -o zdir.lo zdir.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c zdir.c -o zdir.o
zdir.c: In function ‘zdir_new’:
zdir.c:156:9: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
int rc = readdir_r (handle, entry, &result);
^~~
In file included from ../include/czmq_prelude.h:257:0,
from ../include/czmq.h:31,
from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
zdir.c:159:13: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
rc = readdir_r (handle, entry, &result);
^~
In file included from ../include/czmq_prelude.h:257:0,
from ../include/czmq.h:31,
from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
cc1: all warnings being treated as errors
Makefile:774: set di istruzioni per l'obiettivo "zdir.lo" non riuscito
make[2]: *** [zdir.lo] Errore 1
make[2]: uscita dalla directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
Makefile:586: set di istruzioni per l'obiettivo "all" non riuscito
make[1]: *** [all] Errore 2
make[1]: uscita dalla directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
Makefile:414: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make: *** [all-recursive] Errore 1
CZMQ compile error!
*** 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=/usr/bin/$(RUBY_BASE_NAME)2.3
--with-system-libs
--without-system-libs
--with-system-libs
--without-system-libs
extconf failed, exit code 1
I also have installed libtool autogen autoconf automake but installation fails anyway..I got the last version of Kubuntu as os
What can I do? Thank you for help
Solved! I had to install the zeromq source from here
http://zeromq.org/intro:get-the-software

Mac OS X linking dynamic library

I am trying to build this library under Mac OS X Lion, gcc4.8, XCode 5.0.2:
https://github.com/zeromq/zmqpp
I built gcc4.8 with:
brew install gcc48 --enable-all-languages
When I try to build it, the linker (in /usr/bin) gives these errors:
$ make
mkdir -p build/max-g++/obj/zmqpp/
g++ -MMD -std=c++0x -pipe -Wall -fPIC -DBUILD_ENV=max -DBUILD_VERSION='"3.2.0"' -DBUILD_VERSION_MAJOR=3 -DBUILD_VERSION_MINOR=2 -DBUILD_VERSION_REVISION=0 -DBUILD_DATESTAMP='"2014-05-13 07:14"' -DBUILD_LIBRARY_NAME='"zmqpp"' -DBUILD_CLIENT_NAME='"zmqpp"' -I./src -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG -c -o build/max-g++/obj/zmqpp/context.o src/zmqpp/context.cpp
mkdir -p build/max-g++/obj/zmqpp/
g++ -MMD -std=c++0x -pipe -Wall -fPIC -DBUILD_ENV=max -DBUILD_VERSION='"3.2.0"' -DBUILD_VERSION_MAJOR=3 -DBUILD_VERSION_MINOR=2 -DBUILD_VERSION_REVISION=0 -DBUILD_DATESTAMP='"2014-05-13 07:14"' -DBUILD_LIBRARY_NAME='"zmqpp"' -DBUILD_CLIENT_NAME='"zmqpp"' -I./src -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG -c -o build/max-g++/obj/zmqpp/frame.o src/zmqpp/frame.cpp
mkdir -p build/max-g++/obj/zmqpp/
g++ -MMD -std=c++0x -pipe -Wall -fPIC -DBUILD_ENV=max -DBUILD_VERSION='"3.2.0"' -DBUILD_VERSION_MAJOR=3 -DBUILD_VERSION_MINOR=2 -DBUILD_VERSION_REVISION=0 -DBUILD_DATESTAMP='"2014-05-13 07:14"' -DBUILD_LIBRARY_NAME='"zmqpp"' -DBUILD_CLIENT_NAME='"zmqpp"' -I./src -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG -c -o build/max-g++/obj/zmqpp/message.o src/zmqpp/message.cpp
mkdir -p build/max-g++/obj/zmqpp/
g++ -MMD -std=c++0x -pipe -Wall -fPIC -DBUILD_ENV=max -DBUILD_VERSION='"3.2.0"' -DBUILD_VERSION_MAJOR=3 -DBUILD_VERSION_MINOR=2 -DBUILD_VERSION_REVISION=0 -DBUILD_DATESTAMP='"2014-05-13 07:14"' -DBUILD_LIBRARY_NAME='"zmqpp"' -DBUILD_CLIENT_NAME='"zmqpp"' -I./src -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG -c -o build/max-g++/obj/zmqpp/poller.o src/zmqpp/poller.cpp
mkdir -p build/max-g++/obj/zmqpp/
g++ -MMD -std=c++0x -pipe -Wall -fPIC -DBUILD_ENV=max -DBUILD_VERSION='"3.2.0"' -DBUILD_VERSION_MAJOR=3 -DBUILD_VERSION_MINOR=2 -DBUILD_VERSION_REVISION=0 -DBUILD_DATESTAMP='"2014-05-13 07:14"' -DBUILD_LIBRARY_NAME='"zmqpp"' -DBUILD_CLIENT_NAME='"zmqpp"' -I./src -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG -c -o build/max-g++/obj/zmqpp/socket.o src/zmqpp/socket.cpp
mkdir -p build/max-g++/obj/zmqpp/
g++ -MMD -std=c++0x -pipe -Wall -fPIC -DBUILD_ENV=max -DBUILD_VERSION='"3.2.0"' -DBUILD_VERSION_MAJOR=3 -DBUILD_VERSION_MINOR=2 -DBUILD_VERSION_REVISION=0 -DBUILD_DATESTAMP='"2014-05-13 07:14"' -DBUILD_LIBRARY_NAME='"zmqpp"' -DBUILD_CLIENT_NAME='"zmqpp"' -I./src -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG -c -o build/max-g++/obj/zmqpp/zmqpp.o src/zmqpp/zmqpp.cpp
g++ -shared -dynamic -Wl,libzmqpp.so.3 -o ./build/max-g++/libzmqpp.so.3 build/max-g++/obj/zmqpp/context.o build/max-g++/obj/zmqpp/frame.o build/max-g++/obj/zmqpp/message.o build/max-g++/obj/zmqpp/poller.o build/max-g++/obj/zmqpp/socket.o build/max-g++/obj/zmqpp/zmqpp.o -lzmq
ld: file not found: libzmqpp.so.3
collect2: error: ld returned 1 exit status
make: *** [libzmqpp.so] Error 1
So I removed the r in front of dynamic so that it just reads
-dynamic
That seems to be ok. However, then I get
Mac-mini:zmqpp ivan$ make
g++ -shared -dynamic -Wl,-soname -Wl,libzmqpp.so.3 -o ./build/max-g++/libzmqpp.so.3 build/max-g++/obj/zmqpp/context.o build/max-g++/obj/zmqpp/frame.o build/max-g++/obj/zmqpp/message.o build/max-g++/obj/zmqpp/poller.o build/max-g++/obj/zmqpp/socket.o build/max-g++/obj/zmqpp/zmqpp.o -lzmq
ld: unknown option: -soname
collect2: error: ld returned 1 exit status
make: *** [libzmqpp.so] Error 1
I don't know how to get rid of this error. If I just remove -soname from the Makefile, I get
Mac-mini:zmqpp ivan$ make
g++ -shared -dynamic -Wl,libzmqpp.so.3 -o ./build/max-g++/libzmqpp.so.3 build/max-g++/obj/zmqpp/context.o build/max-g++/obj/zmqpp/frame.o build/max-g++/obj/zmqpp/message.o build/max-g++/obj/zmqpp/poller.o build/max-g++/obj/zmqpp/socket.o build/max-g++/obj/zmqpp/zmqpp.o -lzmq
ld: file not found: libzmqpp.so.3
collect2: error: ld returned 1 exit status
make: *** [libzmqpp.so] Error 1
libzmqpp.so.3 doen't even look like correct protocol for Mac dynamic libraries.
If I remove the entire line and replace it I get
Mac-mini:zmqpp ivan$ make
g++ -shared -dynamic -o ./build/max-g++/libzmqpp.so.3 build/max-g++/obj/zmqpp/context.o build/max-g++/obj/zmqpp/frame.o build/max-g++/obj/zmqpp/message.o build/max-g++/obj/zmqpp/poller.o build/max-g++/obj/zmqpp/socket.o build/max-g++/obj/zmqpp/zmqpp.o -lzmq
ar crf ./build/max-g++/libzmqpp.a build/max-g++/obj/zmqpp/context.o build/max-g++/obj/zmqpp/frame.o build/max-g++/obj/zmqpp/message.o build/max-g++/obj/zmqpp/poller.o build/max-g++/obj/zmqpp/socket.o build/max-g++/obj/zmqpp/zmqpp.o
ar: illegal option -- f
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make: *** [libzmqpp.a] Error 1
One thing, the ar it is using is the one in /usr/bin not in /usr/local/Cellar/gcc48/4.8.2/bin/gcc, gcc-ar-4.8
g++ -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-current_version,1.0,-install_name,/usr/local/lib/libzmqpp.3.dylib -o libzmqpp.1.dylib ./build/max-g++/obj/zmqpp/context.o ./build/max-g++/obj/zmqpp/frame.o ./build/max-g++/obj/zmqpp/message.o ./build/max-g++/obj/zmqpp/poller.o ./build/max-g++/obj/zmqpp/socket.o ./build/max-g++/obj/zmqpp/zmqpp.o -lzmq
According to this question this should work. I would try with and without the -dynamic. I build shared libraries all day long but don't have a mac. I am not sure why it is trying to build a static library with the ar command.
The mac linker doesn't take the arguments the linux ones do. Here is some information on building shared libraries on Mac.

R package installation is successful on all machines but one

We are a team working on an R package containing C/C++ code. The package can successfully be installed on all the machines but one. These all run the same version of Mac OS X. I have provided the log files for the installation of the package on my computer (success) and a colleague's computer (error). The package depends on the Rcpp package and the GSL library, both of which were successfully installed on both machines.
My Computer
WARNING: ignoring environment value of R_HOME
* installing to library '/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15'
* installing *source* package 'mrenci' ...
** libs
*** arch - x86_64
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c MRMRTree.cc -o MRMRTree.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c Matrix.cc -o Matrix.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c MiMBuilder.cc -o MiMBuilder.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c SymmetricMatrix.cc -o SymmetricMatrix.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c adaptor.cc -o adaptor.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c memory.cc -o memory.o
/opt/local/bin/g++-mp-4.5 -I/opt/local/lib/R/include -I/opt/local/lib/R/include/x86_64 -DNDEBUG -fopenmp -fopenmp -I/opt/local/include -I"/Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/include" -fPIC -pipe -O2 -m64 -c tools.cc -o tools.o
/opt/local/bin/g++-mp-4.5 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/lib -o mrenci.so MRMRTree.o Matrix.o MiMBuilder.o SymmetricMatrix.o adaptor.o memory.o tools.o /Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/Rcpp/lib/x86_64/libRcpp.a -fopenmp -fopenmp -L/opt/local/lib/R/lib/x86_64 -lR
installing to /Users/dejayn/R/x86_64-apple-darwin10.8.0-library/2.15/mrenci/libs/x86_64
** R
** preparing package for lazy loading
** testing if installed package can be loaded
* DONE (mrenci)
Colleague's Computer
WARNING: ignoring environment value of R_HOME
* installing to library '/Library/Frameworks/R.framework/Versions/2.15/Resources/library'
* installing *source* package 'mrenci' ...
** libs
*** arch - x86_64
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c MRMRTree.cc -o MRMRTree.o
MRMRTree.cc: In member function 'double* const MRMRTree::bootstrap(unsigned int)':
MRMRTree.cc:73: warning: iteration variable 'i' is unsigned
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c Matrix.cc -o Matrix.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c MiMBuilder.cc -o MiMBuilder.o
MiMBuilder.cc: In member function 'Matrix* const MiMBuilder::createMiM(unsigned int*, unsigned int, unsigned int*, unsigned int)':
MiMBuilder.cc:102: warning: iteration variable 'i' is unsigned
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c SymmetricMatrix.cc -o SymmetricMatrix.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c adaptor.cc -o adaptor.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c memory.cc -o memory.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -fopenmp -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/include"   -fPIC  -g -O2  -c tools.cc -o tools.o
g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o mrenci.so MRMRTree.o Matrix.o MiMBuilder.o SymmetricMatrix.o adaptor.o memory.o tools.o /Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/lib/x86_64/libRcpp.a -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64
** R
** preparing package for lazy loading
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
 unable to load shared object '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so':
 dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so, 6): Symbol not found: _GOMP_critical_name_end
 Referenced from: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so
 Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci/libs/x86_64/mrenci.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mrenci'
At first, the installation on my colleague's computer would result in the compilation of the package for both architectures, upon which g++ complained about an unknown -arch argument. This issue, however, appears to have been mitigated by forcing the targeting of a single architecture x86_64. It is also worth noting that as a result of these errors, all computers now have several versions of R and g++. Is this an issue with the linker? Does the same compiler need to be used for both R and its packages? In the case of my computer, I never explicitly asked for g++-mp-4.5 to be used rather than the default g++ (version 4.2), so I figured R automatically detects it.
In case this is of any help, here is what my Makevars contains:
PKG_LIBS=`$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(SHLIB_OPENMP_CFLAGS) -fopenmp
PKG_CPPFLAGS=$(SHLIB_OPENMP_CXXFLAGS) -fopenmp
PKG_CFLAGS=$(SHLIB_OPENMP_CFLAGS) -fopenmp
The $(SHLIB_OPENMP_*FLAGS) flags seem to be defined only on my computer; -fopenmp flags were explicitly added for the package to work on all the machines.
Has anyone experienced similar issues? Any help would be appreciated.
I changed my colleague's ~/.R/Makevars to conform to my configs
LDFLAGS=-L/opt/local/lib
CC=/opt/local/bin/gcc-mp-4.5 -std=gnu99
CXX=/opt/local/bin/g++-mp-4.5
CPP=/opt/local/bin/gcc-mp-4.5 -std=gnu99 -E
CXXCPP=/opt/local/bin/g++-mp-4.5 -E
CFLAGS=-pipe -O2 -m64
CXXFLAGS=-pipe -O2 -m64
SHLIB_CXXLD=/opt/local/bin/g++-mp-4.5
SHLIB_CXXLDFLAGS=-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress
SHLIB_LD=/opt/local/bin/gcc-mp-4.5 -std=gnu99
SHLIB_LDFLAGS=-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress
Additionally, the --no-multiarch argument was used when issuing the installation command. And it now works on his computer.
The problem was because the use of openMP was hardwired (no checks) inside the code and clang did not support openMP at the same I asked the question. My colleague's R was installed using the default (Xcode) compiler when we were trying to use gcc via Mac Ports.

pyvlfeat error during installation: /usr/bin/ld: cannot find -lboost_python-mt-py26

I've haven't been successful in finding a solution to the following error which I get during the pyvlfeat 0.1.1a3 installation: /usr/bin/ld: cannot find -lboost_python-mt-py26
I've installed boost python. Here's the console output:
lenovo#lenovo-ThinkPad-T61:~/Downloads/pyvlfeat-0.1.1a3$ ipython
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
Type "copyright", "credits" or "license" for more information.
IPython 0.12 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: run setup.py clean
running clean
removing 'build/temp.linux-i686-2.7' (and everything under it)
In [2]: run setup.py build
running build
running build_py
running build_ext
building '_vlfeat' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/vlfeat
creating build/temp.linux-i686-2.7/vlfeat/vl
creating build/temp.linux-i686-2.7/vlfeat/mser
creating build/temp.linux-i686-2.7/vlfeat/sift
creating build/temp.linux-i686-2.7/vlfeat/imop
creating build/temp.linux-i686-2.7/vlfeat/misc
creating build/temp.linux-i686-2.7/vlfeat/kmeans
creating build/temp.linux-i686-2.7/vlfeat/quickshift
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/aib.c -o build/temp.linux-i686-2.7/vlfeat/vl/aib.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/generic.c -o build/temp.linux-i686-2.7/vlfeat/vl/generic.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/hikmeans.c -o build/temp.linux-i686-2.7/vlfeat/vl/hikmeans.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/ikmeans.c -o build/temp.linux-i686-2.7/vlfeat/vl/ikmeans.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/imopv.c -o build/temp.linux-i686-2.7/vlfeat/vl/imopv.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mathop.c -o build/temp.linux-i686-2.7/vlfeat/vl/mathop.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mathop_sse2.c -o build/temp.linux-i686-2.7/vlfeat/vl/mathop_sse2.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/pgm.c -o build/temp.linux-i686-2.7/vlfeat/vl/pgm.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/rodrigues.c -o build/temp.linux-i686-2.7/vlfeat/vl/rodrigues.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/stringop.c -o build/temp.linux-i686-2.7/vlfeat/vl/stringop.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/getopt_long.c -o build/temp.linux-i686-2.7/vlfeat/vl/getopt_long.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/host.c -o build/temp.linux-i686-2.7/vlfeat/vl/host.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/imopv_sse2.c -o build/temp.linux-i686-2.7/vlfeat/vl/imopv_sse2.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/mser.c -o build/temp.linux-i686-2.7/vlfeat/vl/mser.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/random.c -o build/temp.linux-i686-2.7/vlfeat/vl/random.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/sift.c -o build/temp.linux-i686-2.7/vlfeat/vl/sift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/dsift.c -o build/temp.linux-i686-2.7/vlfeat/vl/dsift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/vl/quickshift.c -o build/temp.linux-i686-2.7/vlfeat/vl/quickshift.o -msse2 -O2 -fPIC -w
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/mser/vl_erfill.cpp -o build/temp.linux-i686-2.7/vlfeat/mser/vl_erfill.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/mser/vl_mser.cpp -o build/temp.linux-i686-2.7/vlfeat/mser/vl_mser.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_sift.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_sift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_dsift.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_dsift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/sift/vl_siftdescriptor.cpp -o build/temp.linux-i686-2.7/vlfeat/sift/vl_siftdescriptor.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/imop/vl_imsmooth.cpp -o build/temp.linux-i686-2.7/vlfeat/imop/vl_imsmooth.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/misc/vl_binsum.cpp -o build/temp.linux-i686-2.7/vlfeat/misc/vl_binsum.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_hikmeans.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeans.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_ikmeans.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeans.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_hikmeanspush.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeanspush.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/kmeans/vl_ikmeanspush.cpp -o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeanspush.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/quickshift/vl_quickshift.cpp -o build/temp.linux-i686-2.7/vlfeat/quickshift/vl_quickshift.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ivlfeat/ -I/usr/include/python2.7 -c vlfeat/py_vlfeat.cpp -o build/temp.linux-i686-2.7/vlfeat/py_vlfeat.o -msse2 -O2 -fPIC -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-i686-2.7/vlfeat/vl/aib.o build/temp.linux-i686-2.7/vlfeat/vl/generic.o build/temp.linux-i686-2.7/vlfeat/vl/hikmeans.o build/temp.linux-i686-2.7/vlfeat/vl/ikmeans.o build/temp.linux-i686-2.7/vlfeat/vl/imopv.o build/temp.linux-i686-2.7/vlfeat/vl/mathop.o build/temp.linux-i686-2.7/vlfeat/vl/mathop_sse2.o build/temp.linux-i686-2.7/vlfeat/vl/pgm.o build/temp.linux-i686-2.7/vlfeat/vl/rodrigues.o build/temp.linux-i686-2.7/vlfeat/vl/stringop.o build/temp.linux-i686-2.7/vlfeat/vl/getopt_long.o build/temp.linux-i686-2.7/vlfeat/vl/host.o build/temp.linux-i686-2.7/vlfeat/vl/imopv_sse2.o build/temp.linux-i686-2.7/vlfeat/vl/mser.o build/temp.linux-i686-2.7/vlfeat/vl/random.o build/temp.linux-i686-2.7/vlfeat/vl/sift.o build/temp.linux-i686-2.7/vlfeat/vl/dsift.o build/temp.linux-i686-2.7/vlfeat/vl/quickshift.o build/temp.linux-i686-2.7/vlfeat/mser/vl_erfill.o build/temp.linux-i686-2.7/vlfeat/mser/vl_mser.o build/temp.linux-i686-2.7/vlfeat/sift/vl_sift.o build/temp.linux-i686-2.7/vlfeat/sift/vl_dsift.o build/temp.linux-i686-2.7/vlfeat/sift/vl_siftdescriptor.o build/temp.linux-i686-2.7/vlfeat/imop/vl_imsmooth.o build/temp.linux-i686-2.7/vlfeat/misc/vl_binsum.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeans.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeans.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_hikmeanspush.o build/temp.linux-i686-2.7/vlfeat/kmeans/vl_ikmeanspush.o build/temp.linux-i686-2.7/vlfeat/quickshift/vl_quickshift.o build/temp.linux-i686-2.7/vlfeat/py_vlfeat.o -o build/lib.linux-i686-2.7/_vlfeat.so -msse -shared -lboost_python-mt-py26
/usr/bin/ld: cannot find -lboost_python-mt-py26
collect2: ld returned 1 exit status
An exception has occurred, use %tb to see the full traceback.
SystemExit: error: command 'g++' failed with exit status 1
In [3]:
A quick fix to this is to simply edit the setup.py for pyvlfeat and modify the LinkArgs line to refer to your installation of boost-python. For my system, (and likely many others) this amounts to just changing -lboost_python-mt-py26 to -lboost_python-mt-py27 to refer to the proper Python revision.

Resources