Attempting to install FBLuaLib - build

FbLuaLib: https://github.com/facebook/fblualib
To install FBLuaLib, I need to install thpp: https://github.com/facebook/thpp
I can build folly, fbthrift just fine, but when I run ./build.sh for thpp I get the following error message:
Linking CXX executable tensor_serialization_test
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libthriftcpp2.so: undefined reference to `virtual thunk to folly::AsyncSSLSocket::closeNow()'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libthriftcpp2.so: undefined reference to `virtual thunk to
folly::AsyncSSLSocket::getRawBytesWritten() const'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libthriftcpp2.so: undefined reference to `virtual thunk to
folly::AsyncSSLSocket::setEorTracking(bool)'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libthriftcpp2.so:
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libthriftcpp2.so: undefined reference to `virtual thunk to
folly::AsyncSSLSocket::performRead(void*, unsigned long)'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libthriftcpp2.so
collect2: error: ld returned 1 exit status
test/CMakeFiles/tensor_serialization_test.dir/build.make:95: recipe for
target 'test/tensor_serialization_test' failed
make[2]: *** [test/tensor_serialization_test] Error 1
CMakeFiles/Makefile2:240: recipe for target 'test/CMakeFiles
/tensor_serialization_test.dir/all' failed
make[1]: *** [test/CMakeFiles/tensor_serialization_test.dir/all] Error 2
Makefile:123: recipe for target 'all' failed
make: *** [all] Error 2

Related

Want to build openthread for linux

I want to build openthread for Linux (POSIX) and using the library, I want to develop a CoAP client application.
Right now I have disabled UDP_FORWARD in Makefile-posix and enabled OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 1 in src/core/config/platform.h file.
My build is failing with the following error:
Making all in apps Making all in cli CC ot_cli_ftd-main.o C
C ot_cli_mtd-main.o CCLD ot-cli-mtd CCLD ot-cli-ftd
../../../src/core/libopenthread-mtd.a(libopenthread_mtd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Open(void (*)(void*, otMessage*,
otMessageInfo const*), void*)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:84:
undefined reference to `otPlatUdpSocket'
../../../src/core/libopenthread-mtd.a(libopenthread_mtd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Bind(ot::Ip6::SockAddr const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:107:
undefined reference to `otPlatUdpBind'
../../../src/core/libopenthread-mtd.a(libopenthread_mtd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Close()':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:141:
undefined reference to `otPlatUdpClose'
../../../src/core/libopenthread-mtd.a(libopenthread_mtd_a-udp6.o): In
function `ot::Ip6::UdpSocket::SendTo(ot::Message&,
ot::Ip6::MessageInfo const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:193:
undefined reference to `otPlatUdpSend'
../../../src/core/libopenthread-mtd.a(libopenthread_mtd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Bind(ot::Ip6::SockAddr const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:114:
undefined reference to `otPlatUdpBind'
../../../src/core/libopenthread-mtd.a(libopenthread_mtd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Connect(ot::Ip6::SockAddr const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:130:
undefined reference to `otPlatUdpConnect' collect2: error: ld returned
1 exit status Makefile:1284: recipe for target 'ot-cli-mtd' failed
make[5]: *** [ot-cli-mtd] Error 1 make[5]: *** Waiting for unfinished
jobs....
../../../src/core/libopenthread-ftd.a(libopenthread_ftd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Open(void (*)(void*, otMessage*,
otMessageInfo const*), void*)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:84:
undefined reference to `otPlatUdpSocket'
../../../src/core/libopenthread-ftd.a(libopenthread_ftd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Bind(ot::Ip6::SockAddr const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:107:
undefined reference to `otPlatUdpBind'
../../../src/core/libopenthread-ftd.a(libopenthread_ftd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Close()':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:141:
undefined reference to `otPlatUdpClose'
../../../src/core/libopenthread-ftd.a(libopenthread_ftd_a-udp6.o): In
function `ot::Ip6::UdpSocket::SendTo(ot::Message&,
ot::Ip6::MessageInfo const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:193:
undefined reference to `otPlatUdpSend'
../../../src/core/libopenthread-ftd.a(libopenthread_ftd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Bind(ot::Ip6::SockAddr const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:114:
undefined reference to `otPlatUdpBind'
../../../src/core/libopenthread-ftd.a(libopenthread_ftd_a-udp6.o): In
function `ot::Ip6::UdpSocket::Connect(ot::Ip6::SockAddr const&)':
/home/projects/KNX/openthread/examples/../src/core/net/udp6.cpp:130:
undefined reference to `otPlatUdpConnect' collect2: error: ld returned
1 exit status Makefile:1280: recipe for target 'ot-cli-ftd' failed
make[5]: *** [ot-cli-ftd] Error 1 Makefile:442: recipe for target
'all-recursive' failed make[4]: *** [all-recursive] Error 1
Makefile:444: recipe for target 'all-recursive' failed make[3]: ***
[all-recursive] Error 1 Makefile:601: recipe for target
'all-recursive' failed make[2]: *** [all-recursive] Error 1
Makefile:527: recipe for target 'all' failed make[1]: *** [all] Error
2 examples/Makefile-posix:295: recipe for target
'do-build-x86_64-unknown-linux-gnu' failed make: ***
[do-build-x86_64-unknown-linux-gnu] Error 2
My ultimate goal is to use openthread library and develop a Coap Client application. Can anybody help me on this?
Enabling OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE requires an implementation of the otPlatUdp* APIs.
For Linux, you can look to the POSIX app https://github.com/openthread/openthread/tree/master/src/posix.

Trying to install qt-pods on windows

Im trying to install qt-pods on windows.
I downloaded the qt-pods package from github to my pc.
then i went into the folder and tried to run qmake && make.
the qmake succeed with no errors (i did it also alone for checking) but the 'make' threw me the following errors:
...a lot of errors like this...
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.text$_ZN10PodManagerD0Ev[_ZN10PodManagerD0Ev]+0x14): undefined reference to `__imp__ZN7QObjectD2Ev'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.text.startup+0x3): undefined reference to `__imp__ZN7QObject16staticMetaObjectE'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x38): undefined reference to `QObject::event(QEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x40): undefined reference to `QObject::eventFilter(QObject*, QEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x48): undefined reference to `QObject::timerEvent(QTimerEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x50): undefined reference to `QObject::childEvent(QChildEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x58): undefined reference to `QObject::customEvent(QEvent*)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x60): undefined reference to `QObject::connectNotify(QMetaMethod const&)'
F:\Users\matan_000\Documents\Programming\c++-libraries\qt-pods\qt-pods-core\release/libqt-pods-core.a(moc_podmanager.o):moc_podmanager.cpp:(.rdata$_ZTV10PodManager[_ZTV10PodManager]+0x68): undefined reference to `QObject::disconnectNotify(QMetaMethod const&)'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile.Release:87: release\qt-pods-gui.exe] Error 1
make[2]: Leaving directory 'F:/Users/matan_000/Documents/Programming/c++-libraries/qt-pods/qt-pods-gui'
make[1]: *** [Makefile:36: release] Error 2
make[1]: Leaving directory 'F:/Users/matan_000/Documents/Programming/c++-libraries/qt-pods/qt-pods-gui'
make: *** [Makefile:95: sub-qt-pods-gui-make_first] Error 2
and a lot of errors like this before...
Im almost hopeless...
I will be happy to help! thank you! :)

undefined reference error while installing OpenCV not compiling

I tried to find the same case as mine, but I couldn't. Most of them here are about undefined reference error during compiling their own code, but in my case this error occurred while installing OpenCV.
I referred to this page :
http://milq.github.io/install-opencv-ubuntu-debian/
I use armv7l and debian-scratch 9.3.
I tried to install OpenCV 3.4.0
I have this error :
[ 31%] Building CXX object modules/features2d/CMakeFiles/opencv_features2d.dir/src/akaze.cpp.o
//usr/lib/libgdal.so.20: undefined reference to `XML_SetUserData'
//usr/lib/libgdal.so.20: undefined reference to `XML_SetUnknownEncodingHandler'
//usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0: undefined reference to `FT_Set_Char_Size'
//usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: undefined reference to `glGenerateMipmap'
//usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: undefined reference to `glUniform2fv'
//usr/lib/arm-linux-gnueabihf/libbluray.so.1: undefined reference to `FT_GlyphSlot_Embolden'
...
//usr/lib/arm-linux-gnueabihf/libavcodec.so.57: undefined reference to `deflateReset'
/usr/bin/ld: ../../bin/opencv_annotation: hidden symbol `atexit' in /usr/lib/arm-linux-gnueabihf/libc_nonshared.a(atexit.oS) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:100: recipe for target 'bin/opencv_annotation' failed
make[2]: *** [bin/opencv_annotation] Error 1
CMakeFiles/Makefile2:4690: recipe for target 'apps/annotation/CMakeFiles/opencv_annotation.dir/all' failed
make[1]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I found out it's from a linking library error, but as I'm a beginner of Linux, it couldn't help me.
I hope this question is clear.

Normaliz undefined reference to `boost::system::system_category()'

I'm trying to install the library Normaliz having dependencies like CocoALib, SCIP. I've made its dependencies according to their guidances. However, I get the error while make of Normaliz on both Ubuntu and Mac OSX,
[ 81%] Linking CXX executable normaliz
libnormaliz/libnormaliz.so.3.4.0: undefined reference to `boost::system::system_category()'
libnormaliz/libnormaliz.so.3.4.0: undefined reference to `boost::system::generic_category()'
collect2: error: ld returned 1 exit status
CMakeFiles/normaliz.dir/build.make:99: recipe for target 'normaliz' failed
make[2]: *** [normaliz] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/normaliz.dir/all' failed
make[1]: *** [CMakeFiles/normaliz.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I really fed up with it since two weeks! How can it be overcome?
Even if it is boost linkage problem, how can it be linked? There is no option for it. That kinda headaches cause apathy to open-source at least for young programmers like me.

libx264.so.146 not found while compiling C++ code or x264 itself

I just upgraded my system from Ubuntu 15.10 to Ubuntu 16.04 LTS. Now, for some reason my C++ project won't compile anymore. CLion keeps saying it's missing 'libx264.so.146 as you can see in the compile log:
/home/lorre851/CLion/bin/cmake/bin/cmake --build /home/lorre851/.CLion12/system/cmake/generated/ce7171e4/ce7171e4/Release --target main -- -j 8
[ 20%] Linking CXX executable build/main
/usr/bin/ld: warning: libx264.so.146, needed by /usr/local/lib/libavcodec.so.57, not found (try using -rpath or -rpath-link)
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_open_146'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_close'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_bit_depth'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_headers'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_encode'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_reconfig'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_parse'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_apply_profile'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_apply_fastfirstpass'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_levels'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_picture_init'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_default'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_param_default_preset'
/usr/local/lib/libavcodec.so.57: undefined reference to `x264_encoder_delayed_frames'
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:172: recipe for target 'build/main' failed
make[3]: *** [build/main] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[2]: *** [CMakeFiles/main.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/main.dir/rule' failed
make[1]: *** [CMakeFiles/main.dir/rule] Error 2
Makefile:118: recipe for target 'main' failed
make: *** [main] Error 2
Most people seem to give 'reinstalling x264' as a solution. However, reinstalling x264 with the following commands leads to the same error while compiling x264 itself.
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
/usr/bin/ld: warning: libx264.so.146, needed by /usr/local/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_open_146'
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'x264' failed
make: *** [x264] Error 1
Does anyone have an idea how I could get around this?
Okay, after a day of trying to remove and recompile the liavcodec-dev library, without result, I decided to format the drive and reinstall Ubuntu from scratch.
Everything is working fine now.