I'm facing a weird error while trying to compile fbthrift (https://github.com/facebook/fbthrift) on ubuntu 16.04
make[4]: Entering directory '/home/abhishek/fblualib/fbthrift/thrift/compiler/py'
/bin/bash ../../libtool --tag=CXX --mode=link g++ -std=gnu++1y -module -avoid-version -no-undefined -l -L/usr/lib -lpython2.7 -lfolly -L/usr/local/lib -o frontend.la -rpath /usr/local/lib frontend_la-compiler.lo ../libparse.la ../libthriftcompilerbase.la -lssl -lcrypto -lrt -lpthread -lsasl2 -lmstch -lwangle -lsnappy -lgflags -lglog
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o .libs/frontend_la-compiler.o -Wl,--whole-archive ../.libs/libparse.a ../.libs/libthriftcompilerbase.a -Wl,--no-whole-archive -l -L/usr/lib -lpython2.7 /usr/local/lib/libfolly.so -L/usr/local/lib -lssl -lcrypto -lrt -lpthread -lsasl2 -lmstch -lwangle -lsnappy -lgflags -lglog -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o -Wl,-soname -Wl,frontend.so -o .libs/frontend.so
/usr/bin/ld: cannot find -l-L/usr/lib
collect2: error: ld returned 1 exit status
Makefile:500: recipe for target 'frontend.la' failed
make[4]: *** [frontend.la] Error 1
make[4]: Leaving directory '/home/abhishek/fblualib/fbthrift/thrift/compiler/py'
Makefile:882: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/abhishek/fblualib/fbthrift/thrift/compiler'
Makefile:591: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/abhishek/fblualib/fbthrift/thrift/compiler'
Makefile:498: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/abhishek/fblualib/fbthrift/thrift'
Makefile:430: recipe for target 'all' failed
make: *** [all] Error 2
Why would it not find /usr/lib ?
The makefile is generating a link command that reads:
... -l -L/usr/lib ...
The link command in the makefile is likely specified as -l$(SOMEVARIABLE), here, and the variable is not set for some reason, so it gets expanded as an empty string.
As such, this gets interpreted as a directive to link with a shared library whose name is "-L/usr/lib" which is, of course, utterly bogus.
Unfortunately, there is no universal magic button that can be pushed, and fix this error. It will be necessary to investigate what broke during this package's configuration and/or build, and fix it.
Related
I am trying to install pHash library on ubuntu, i installed libfftw3 and all the required libraries. Everything is Ok when I run ./configure command, but when i try to run the 'make' command this error always appear : undefined reference to `fftw_init_threads'.
make command :
g551683#sst-p1310007fl:~/Documents/pHash-0.2.9.6$ make
make all-recursive
make[1]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6'
Making all in src
make[2]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/src'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/src'
Making all in bindings
make[2]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
make[3]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
make[2]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
Making all in examples
make[2]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/examples'
/bin/sh ../libtool --tag=CXX --mode=link g++ -O2 -ffast-math -O3 -L/usr/local/lib -lssl -lcrypto -o test_texthash test_texthash.o ../src/libpHash.la -lmpg123 -lsamplerate -lsndfile -lswscale -lavformat -lavutil -lavcodec -lpng -ljpeg -lfftw3
libtool: link: g++ -O2 -ffast-math -O3 -o .libs/test_texthash test_texthash.o -L/usr/local/lib ../src/.libs/libpHash.so -lssl -lcrypto /usr/local/lib/libmpg123.so /usr/lib/x86_64-linux-gnu/libltdl.so -ldl /usr/local/lib/libsamplerate.so -lsndfile -lswscale -lavformat -lavutil -lavcodec /usr/local/lib/libpng16.so -lz /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/local/lib/libfftw3.a -lm
test_texthash.o: In function `_GLOBAL__sub_I_main':
test_texthash.cpp:(.text.startup+0x1b1): undefined reference to `fftw_init_threads'
collect2: error: ld returned 1 exit status
Makefile:323: recipe for target 'test_texthash' failed
make[2]: *** [test_texthash] Error 1
make[2]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/examples'
Makefile:419: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6'
Makefile:298: recipe for target 'all' failed
make: *** [all] Error 2
Can someone help me to solve this error!
From the documentation:
First, programs using the parallel complex transforms should be linked with -lfftw3_threads -lfftw3 -lm on Unix, or -lfftw3_omp -lfftw3 -lm if you compiled with OpenMP. You will also need to link with whatever library is responsible for threads on your system (e.g. -lpthread on GNU/Linux) or include whatever compiler flag enables OpenMP (e.g. -fopenmp with gcc).
You are not linking against this fftw3_threads library, nor to the pthread library.
A make of qt-everywhere-opensource-src-5.7.0 on OpenSUSE 13.2 after ./configure -qt-xcb fails with the following:
g++ -c -pipe -O2 -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_BUILD_XCB_PLUGIN -DXCB_USE_XLIB -DXCB_USE_RENDER -DDFLT_XKB_CONFIG_ROOT=\"/usr/share/X11/xkb\" -DDEFAULT_XKB_RULES=\"evdev\" -DDEFAULT_XKB_MODEL=\"pc105\" -DDEFAULT_XKB_LAYOUT=\"us\" -DQT_BUILD_XCB_QPA_LIB_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQ_FONTCONFIGDATABASE -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Igl_integrations -I../../../3rdparty/xcb/include -I../../../3rdparty/xcb/sysinclude -I../../../3rdparty/xkbcommon -I../../../3rdparty/xkbcommon/xkbcommon -I../../../3rdparty/xkbcommon/src -I../../../3rdparty/xkbcommon/src/xkbcomp -I../../../3rdparty/xkbcommon/src/x11 -I../../../../include -I../../../../include/QtPlatformSupport -I../../../../include/QtPlatformSupport/5.7.0 -I../../../../include/QtPlatformSupport/5.7.0/QtPlatformSupport -I../../../../include/QtGui/5.7.0 -I../../../../include/QtGui/5.7.0/QtGui -I../../../../include/QtGui -I../../../../include/QtCore/5.7.0 -I../../../../include/QtCore/5.7.0/QtCore -I../../../../include/QtCore -I.moc -isystem /usr/include/libdrm -I../../../../mkspecs/linux-g++ -o .obj/qxcbxsettings.o qxcbxsettings.cpp
qxcbxsettings.cpp:49:36: fatal error: X11/extensions/XIproto.h: No such file or directory
#include <X11/extensions/XIproto.h>
^
compilation terminated.
Makefile.xcb_qpa_lib:7354: recipe for target '.obj/qxcbxsettings.o' failed
make[6]: *** [.obj/qxcbxsettings.o] Error 1
make[6]: Leaving directory '/home/jan/src/qt-everywhere-opensource-src-5.7.0/qtbase/src/plugins/platforms/xcb'
Makefile:86: recipe for target 'sub-xcb_qpa_lib-pro-make_first-ordered' failed
make[5]: *** [sub-xcb_qpa_lib-pro-make_first-ordered] Error 2
make[5]: Leaving directory '/home/jan/src/qt-everywhere-opensource-src-5.7.0/qtbase/src/plugins/platforms/xcb'
Makefile:97: recipe for target 'sub-xcb-make_first' failed
make[4]: *** [sub-xcb-make_first] Error 2
make[4]: Leaving directory '/home/jan/src/qt-everywhere-opensource-src-5.7.0/qtbase/src/plugins/platforms'
Makefile:99: recipe for target 'sub-platforms-make_first' failed
make[3]: *** [sub-platforms-make_first] Error 2
make[3]: Leaving directory '/home/jan/src/qt-everywhere-opensource-src-5.7.0/qtbase/src/plugins'
Makefile:641: recipe for target 'sub-plugins-make_first' failed
make[2]: *** [sub-plugins-make_first] Error 2
make[2]: Leaving directory '/home/jan/src/qt-everywhere-opensource-src-5.7.0/qtbase/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/jan/src/qt-everywhere-opensource-src-5.7.0/qtbase'
Makefile:77: recipe for target 'module-qtbase-make_first' failed
make: *** [module-qtbase-make_first] Error 2
Add inputproto-devel:
sudo zypper install inputproto-devel
and restart the configuration and build.
i'm trying to build MonetDB from source on CentOS.
Typically the problems occur in the make step,
I run the configuration as follows
./configure -prefix=$HOME/MonetDB--disable-geom --disable-strict
This works perfectly fine. However, using "make" afterwards leads to an error:
...
make[3]: Entering directory `/users/db01/dm/MonetDB/MonetDB-11.19.9/gdk'
/bin/sh ../libtool --tag=CC --mode=link gcc -DLIBGDK -g -O2 -D_REENTRANT -version-info 11:4:0 -o libbat.la -rpath /users/db01/dm/MonetDB/MDB/lib libbat_la-gdk_batop.lo libbat_la-gdk_select.lo libbat_la-gdk_select_legacy.lo libbat_la-gdk_search.lo libbat_la-gdk_tm.lo libbat_la-gdk_align.lo libbat_la-gdk_bbp.lo libbat_la-gdk_heap.lo libbat_la-gdk_setop.lo libbat_la-gdk_utils.lo libbat_la-gdk_atoms.lo libbat_la-gdk_qsort.lo libbat_la-gdk_ssort.lo libbat_la-gdk_storage.lo libbat_la-gdk_bat.lo libbat_la-gdk_delta.lo libbat_la-gdk_cross.lo libbat_la-gdk_system.lo libbat_la-gdk_value.lo libbat_la-gdk_posix.lo libbat_la-gdk_logger.lo libbat_la-gdk_sample.lo libbat_la-gdk_calc.lo libbat_la-gdk_aggr.lo libbat_la-gdk_group.lo libbat_la-gdk_mapreduce.lo libbat_la-gdk_imprints.lo libbat_la-gdk_join.lo libbat_la-gdk_join_legacy.lo libbat_la-gdk_unique.lo libbat_la-gdk_firstn.lo ../common/options/libmoptions.la ../common/stream/libstream.la ../common/utils/libmutils.la -lm -lz -lbz2 -pthread -ldl
libtool: link: gcc -shared -fPIC -DPIC .libs/libbat_la-gdk_batop.o .libs/libbat_la-gdk_select.o .libs/libbat_la-gdk_select_legacy.o .libs/libbat_la-gdk_search.o .libs/libbat_la-gdk_tm.o .libs/libbat_la-gdk_align.o .libs/libbat_la-gdk_bbp.o .libs/libbat_la-gdk_heap.o .libs/libbat_la-gdk_setop.o .libs/libbat_la-gdk_utils.o .libs/libbat_la-gdk_atoms.o .libs/libbat_la-gdk_qsort.o .libs/libbat_la-gdk_ssort.o .libs/libbat_la-gdk_storage.o .libs/libbat_la-gdk_bat.o .libs/libbat_la-gdk_delta.o .libs/libbat_la-gdk_cross.o .libs/libbat_la-gdk_system.o .libs/libbat_la-gdk_value.o .libs/libbat_la-gdk_posix.o .libs/libbat_la-gdk_logger.o .libs/libbat_la-gdk_sample.o .libs/libbat_la-gdk_calc.o .libs/libbat_la-gdk_aggr.o .libs/libbat_la-gdk_group.o .libs/libbat_la-gdk_mapreduce.o .libs/libbat_la-gdk_imprints.o .libs/libbat_la-gdk_join.o .libs/libbat_la-gdk_join_legacy.o .libs/libbat_la-gdk_unique.o .libs/libbat_la-gdk_firstn.o -Wl,--whole-archive ../common/options/.libs/libmoptions.a ../common/utils/.libs/libmutils.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/users/db01/dm/MonetDB/MonetDB-11.19.9/common/stream/.libs -Wl,-rpath -Wl,/users/db01/dm/MonetDB/MDB/lib ../common/stream/.libs/libstream.so -L/usr/kerberos/lib64 -lssl -lcrypto -lm -lz -lbz2 -ldl -O2 -pthread -pthread -Wl,-soname -Wl,libbat.so.11 -o .libs/libbat.so.11.0.4
/usr/bin/ld: .libs/libbat_la-gdk_utils.o: relocation R_X86_64_PC32 against `MT_global_exit' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[3]: *** [libbat.la] Error 1
make[3]: Leaving directory `/users/db01/dm/MonetDB/MonetDB-11.19.9/gdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/users/db01/dm/MonetDB/MonetDB-11.19.9/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users/db01/dm/MonetDB/MonetDB-11.19.9'
make: *** [all] Error 2
I found a similar error, containing MT_global_exit in the web: https://www.monetdb.org/pipermail/users-list/2014-June/007334.html
Trying the mentioned suggestion by deleting __attribute__((__visibility__("hidden")))
from the gdk/gdk_private.h was
lead to several different errors (in gdk_private.h) during the make process.
If you have any suggestions, I'd be happy to hear them!
best regards
I am getting the following error:
../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib/libboost_system.so: file not recognized: File truncated
If I swap the order of boost_filesystem and boost_system I get the following error:
../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib/libboost_filesystem.so: file not recognized: File truncated
Boost built correctly to my knowledge. There were no errors during the build. The makefile that is doing the linking is as follows:
libtool: link: g++ -g -O2 -pthread -Wl,-rpath=../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib -o xml_wrapper_tester xml_wrapper_tester-runner.o - L../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib -lboost_wserialization -lboost_timer -lboost_date_time -lboost_iostreams -lboost_chrono -lboost_atomic -lboost_serialization -lboost_locale -lboost_log -lboost_thread -lboost_regex -lboost_log_setup -lboost_system -lboost_filesystem ../xml_wrapper/.libs/libxml_wrapper.a-pthread
../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib/libboost_system.so: file not recognized: File truncated
collect2: error: ld returned 1 exit status
make[2]: *** [xml_wrapper_tester] Error 1
make[2]: Leaving directory /home/mehoggan/Devel/RuleSimulator/src/xml/xml_wrapper_tester'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mehoggan/Devel/RuleSimulator/src/xml'
make: *** [all] Error 2
It sounds like your libboost* files are corrupt.
Q: Did you build them yourself? If so, I'd suggest "make clean" (or "rm -rf" from your build root), and rebuild from scratch.
Check carefully for any build errors when you do so.
I would very carefully follow these instructions:
http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html
'Hope that helps
I'm trying to launch a test for opengl on my kubuntu 64b.
Opengl, glew and freeglut are installed but when I compile it says that glut is not found.
CLEAN SUCCESSFUL (total time: 52ms)
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/rxp/NetBeansProjects/Cpptest'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/cpptest
make[2]: Entering directory `/home/rxp/NetBeansProjects/Cpptest'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++ -c -g -I../oglpg-8th-edition/include -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/cpptest build/Debug/GNU-Linux-x86/main.o -L../oglpg-8th-edition/lib -lGL -lGLEW -lGLU -lGLUT
/usr/bin/ld: cannot find -lGLUT
collect2: error: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/cpptest] Error 1
make[2]: Leaving directory `/home/rxp/NetBeansProjects/Cpptest'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/rxp/NetBeansProjects/Cpptest'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 358ms)
Could you help me ?
You're using -lGLUT. Note that the libraries are case sensitive, so you need to use -lglut instead.
In build command, the libraries should be linked this way:
-lGL -lGLEW -lGLU -lglut