tcpreplay installation failed, libpcap/collect - tcpreplay

I could not install tcpreplay on RHEL 6.6
When I try to run ./configure I got following error
checking for inet_addr... yes
checking for libpcap... no
configure: error: libpcap not found
[root#tcpreplay-4.1.0]# ldconfig -p | grep libpca
libpcap.so.1 (libc6,x86-64) => /usr/lib64/libpcap.so.1
[root#tcpreplay-4.1.0]#
ldconfig output shows that there is installed libpcap
I also tried with --with-libpcap=/usr/lib64 option but I got same error.
I have another RHEL 6.6 with similar config, I uninstalled tcpdump, libpcap with yum. Installed latest libpcap and tcpdump from tarball without error. I got no error on ./configure command of tcpreplay tarball. (In this installation libpcap installed into /usr/local/lib)
But when I try to make I got following error.
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_activate':
/directory/libpcap-1.7.4/./pcap-dbus.c:185: undefined reference to `dbus_connection_open'
/directory/libpcap-1.7.4/./pcap-dbus.c:191: undefined reference to `dbus_bus_register'
/directory/libpcap-1.7.4/./pcap-dbus.c:230: undefined reference to `dbus_bus_add_match'
/directory/libpcap-1.7.4/./pcap-dbus.c:231: undefined reference to `dbus_error_is_set'
/directory/libpcap-1.7.4/./pcap-dbus.c:232: undefined reference to `dbus_error_free'
/directory/libpcap-1.7.4/./pcap-dbus.c:235: undefined reference to `dbus_bus_add_match'
/directory/libpcap-1.7.4/./pcap-dbus.c:236: undefined reference to `dbus_error_is_set'
/directory/libpcap-1.7.4/./pcap-dbus.c:238: undefined reference to `dbus_error_free'
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_cleanup':
/directory/libpcap-1.7.4/./pcap-dbus.c:143: undefined reference to `dbus_connection_unref'
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_activate':
/directory/libpcap-1.7.4/./pcap-dbus.c:169: undefined reference to `dbus_bus_get'
/directory/libpcap-1.7.4/./pcap-dbus.c:178: undefined reference to `dbus_error_free'
/directory/libpcap-1.7.4/./pcap-dbus.c:227: undefined reference to `dbus_connection_set_max_received_size'
/directory/libpcap-1.7.4/./pcap-dbus.c:176: undefined reference to `dbus_bus_get'
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_cleanup':
/directory/libpcap-1.7.4/./pcap-dbus.c:143: undefined reference to `dbus_connection_unref'
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_activate':
/directory/libpcap-1.7.4/./pcap-dbus.c:193: undefined reference to `dbus_error_free'
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_write':
/directory/libpcap-1.7.4/./pcap-dbus.c:114: undefined reference to `dbus_message_demarshal'
/directory/libpcap-1.7.4/./pcap-dbus.c:120: undefined reference to `dbus_connection_send'
/directory/libpcap-1.7.4/./pcap-dbus.c:121: undefined reference to `dbus_connection_flush'
/directory/libpcap-1.7.4/./pcap-dbus.c:123: undefined reference to `dbus_message_unref'
/directory/libpcap-1.7.4/./pcap-dbus.c:116: undefined reference to `dbus_error_free'
/usr/local/lib/libpcap.a(pcap-dbus.o): In function `dbus_read':
/directory/libpcap-1.7.4/./pcap-dbus.c:70: undefined reference to `dbus_connection_read_write'
/directory/libpcap-1.7.4/./pcap-dbus.c:66: undefined reference to `dbus_connection_pop_message'
/directory/libpcap-1.7.4/./pcap-dbus.c:83: undefined reference to `dbus_message_is_signal'
/directory/libpcap-1.7.4/./pcap-dbus.c:88: undefined reference to `dbus_message_marshal'
/directory/libpcap-1.7.4/./pcap-dbus.c:100: undefined reference to `dbus_free'
collect2: ld returned 1 exit status
make[3]: *** [tcpreplay] Error 1
make[3]: Leaving directory `/directory/tcpreplay-4.1.0/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/directory/tcpreplay-4.1.0/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/directory/tcpreplay-4.1.0/src'
make: *** [all-recursive] Error 1
Do you have any idea / solution to install tcpreplay
Thanks

sudo apt-get install tcpreplay

Related

Compiling opencv3 get "libgdal.so.20 undefined reference"

While I try to compile opencv3 I got this error:
../../lib/libopencv_imgcodecs.so.3.4.2: undefined reference
"TIFFReadDirectory#LIBTIFF_4.0" //usr/lib/libgdal.so.20: undefined
reference "TIFFLastDirectory#LIBTIFF_4.0"
../../lib/libopencv_imgcodecs.so.3.4.2: undefined reference
"TIFFWriteEncodedStrip#LIBTIFF_4.0"
../../lib/libopencv_imgcodecs.so.3.4.2: undefined reference
"TIFFIsTiled#LIBTIFF_4.0" //usr/lib/libgdal.so.20: undefined reference
"TIFFSwabArrayOfShort#LIBTIFF_4.0" //usr/lib/libgdal.so.20: undefined
reference "TIFFIsByteSwapped#LIBTIFF_4.0" //usr/lib/libgdal.so.20:
undefined reference "TIFFFlushData#LIBTIFF_4.0"
//usr/lib/libgdal.so.20: undefined reference
"TIFFFreeDirectory#LIBTIFF_4.0"
../../lib/libopencv_imgcodecs.so.3.4.2: undefined reference
"TIFFScanlineSize#LIBTIFF_4.0" //usr/lib/libgdal.so.20: undefined
reference "TIFFWriteEncodedTile#LIBTIFF_4.0"
OS: Ubuntu 18.04
How can I solve? I already installed libgdal20 and libgdal-dev
I solved using this (modules) https://github.com/opencv/opencv_contrib
As the README shows I did this:
$ cd <opencv_build_directory>
$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
$ make -j5
Having directory "opencv" and opencv_contrib in the same directory (my home directory) I typed:
$ cd opencv/build
$ cmake -DOPENCV_EXTRA_MODULES_PATH=/home/helias/opencv/modules /home/helias/opencv
$ make -j 8
Note: 8 = is the number of my CPU cores

Compile error with ESP8266 SDK in KAA 0.10.0

I have built the ESP8266 SDK according to this document.
But the compile report shows the error below. Attachemnt is the ld file. Would you please help me to resolve it? Thanks a lot!
/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: esp8266_app section `.text' will not fit in region `iram1_0_seg'
/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 43955 bytes
kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj):(.text.mbedtls_platform_entropy_poll+0x8): undefined reference to `fopen'
kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj):(.text.mbedtls_platform_entropy_poll+0xc): undefined reference to `fread'
kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj):(.text.mbedtls_platform_entropy_poll+0x10): undefined reference to `fclose'
kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj): In function `mbedtls_platform_entropy_poll':
entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x33): undefined reference to `fopen'
entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x48): undefined reference to `fread'
entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x56): undefined reference to `fclose'
entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x62): undefined reference to `fclose'
collect2: error: ld returned 1 exit status
make[2]: *** [esp8266_app] Error 1
make[1]: *** [CMakeFiles/esp8266_app.dir/all] Error 2
make: *** [all] Error 2
Regards
Bobby
To build the C SDK application correctly for the ESP8266 platform, disable the Encryption feature with -DWITH_ENCRYPTION=OFF CMake command line argument.
Furthermore, disable unused SDK extensions. For example, to disable the notification extension, you should pass the -DWITH_EXTENSION_NOTIFICATION=OFF to CMake. For more information about C SDK build configuration, see this file -- https://github.com/kaaproject/kaa/blob/master/client/client-multi/client-c/CMakeLists.txt
Also, don't forget to pass the -DCMAKE_BUILD_TYPE=MinSizeRel to CMake so that the resulting executable will be optimized for size.

Error installing OpenCV on Ubuntu 16.04

I have being trying to install OpenCV on Ubuntu 16.04 unsing several tutorials and i always end up with an error. This is the last one i've got following this tutorial:
https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-OpenCV-3.1-Installation-Guide
What can i do?
[ 48%] Linking CXX executable ../../bin/opencv_test_viz
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFReadDirectory#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFIsTiled#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFDefaultStripSize#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFReadTile#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFWriteScanline#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `_TIFFfree#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFGetField#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFScanlineSize#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFTileSize#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFClose#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFClientOpen#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFGetFieldDefaulted#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFNumberOfDirectories#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFOpen#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFReadRGBAImage#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFSetField#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFSetWarningHandler#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFSetErrorHandler#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `_TIFFmalloc#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFSetDirectory#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFReadScanline#LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `TIFFNumberOfTiles#LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
modules/viz/CMakeFiles/opencv_test_viz.dir/build.make:236: recipe for target 'bin/opencv_test_viz' failed
make[2]: *** [bin/opencv_test_viz] Error 1
CMakeFiles/Makefile2:3306: recipe for target 'modules/viz/CMakeFiles/opencv_test_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/opencv_test_viz.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
I followed the same tutorial for install opencv and I had the same problem.
This works for me:
sudo apt-get autoremove libtiff5-dev
sudo apt-get install libtiff5-dev
Enter the opencv directory.
cd build/ (I guess that is already created,otherwise create it)
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make
then continue with the tutorial.
According to this, OpenCV needs libtiff4, which Ubuntu has dropped, i.e. the package that replaced it is libtiff5-dev.
As a temporary workaround you can specify -DBUILD_TIFF=ON on cmake when configuring, in order to build the libtiff4 version that is distributed with OpenCV.
This worked for me in Ubuntu 16.04, with OpenCV 3.2.1.
Looks like you need to install/reinstall libpng.
Try make clean ,and then again execute the make command. Generally after one failure if you try the make command without cleaning the earlier installation, you get errors.
I had similar issue. I was building openCV 3.3.0 together with opencv_contrib repository. It turned out that including the flag -D BUILD_TIFF=ON with cmake command resolved the issue as pointed out by gevang already.
Ps.: Since I'm only acknowledging the solution provided by gevang, this should rather a be comment instead of an answer, but I'm missing the corresponding rights. Sorry for that.

OpenCV build undefined reference to protobuf built from source

I'm trying to build OpenCV from source. I have protobuf installed to my home directory; it was built with --enable-shared. LD_LIBRARY_PATH has $HOME/lib at the head; LIBRARY_PATH and LD_RUN_PATH are set to $LD_LIBRARY_PATH, and CPATH is set to $HOME/include. PKG_CONFIG_PATH is to $HOME/lib/pkgconfig.
Here are some relevant versions:
opencv==3.1.0
gcc==4.8.5
g++==4.8.5
python==3.5.2
protobuf==2.6.1
My CMake command is
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$HOME -D OPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib-3.1.0/modules -D PYTHON_DEFAULT_EXECUTABLE=$HOME/bin/python -D CMAKE_PREFIX_PATH=$HOME ..
cmake succeeds and even says that it found PROTOBUF at <~>/lib/libprotobuf.so. But make fails to find it.
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::InitEmptyString()'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::empty_string_once_init_'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::empty_string_'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilTotalBytesLimit() const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_test_dnn] Error 1
make[1]: *** [modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2
A couple of other places mention that multiple versions of protobuf can cause problems. There is another protobuf in /lib64, but I can't remove it since I don't have root access. So I'm not sure what the workaround is.
I met the same issue recently because I installed the latest protobuf (3.1.0) and built my opencv with GCC 4.9. When I switched back to GCC 5, OpenCV 3.1 can be built successfully.
If you want to use Matlab together with OpenCV 3.1 I think you may need to downgrade your protobuf version, like protobuf-2.5.0, then you can use GCC 4.9 to rebuilt the OpenCV.

sqlite undefined error in apportable when convert ios project to android

When i compile project tis issuse will be created. does sqlite support apportable
?
Linking Build/android-armeabi-debug/touchandmove22/apk/lib/armeabi/libverde.so
/Users/idc0013/touchandmove22/Database.m:28: error: undefined reference to 'sqlite3_open'
/Users/idc0013/touchandmove22/Database.m:29: error: undefined reference to 'sqlite3_prepare_v2'
/Users/idc0013/touchandmove22/Database.m:32: error: undefined reference to 'sqlite3_step'
/Users/idc0013/touchandmove22/Database.m:34: error: undefined reference to 'sqlite3_column_count'
/Users/idc0013/touchandmove22/Database.m:37: error: undefined reference to 'sqlite3_column_text'
/Users/idc0013/touchandmove22/Database.m:40: error: undefined reference to 'sqlite3_column_name'
/Users/idc0013/touchandmove22/Database.m:50: error: undefined reference to 'sqlite3_finalize'
/Users/idc0013/touchandmove22/Database.m:52: error: undefined reference to 'sqlite3_close'
/Users/idc0013/touchandmove22/Database.m:70: error: undefined reference to 'sqlite3_open'
/Users/idc0013/touchandmove22/Database.m:71: error: undefined reference to 'sqlite3_prepare_v2'
/Users/idc0013/touchandmove22/Database.m:72: error: undefined reference to 'sqlite3_step'
/Users/idc0013/touchandmove22/Database.m:76: error: undefined reference to 'sqlite3_finalize'
/Users/idc0013/touchandmove22/Database.m:78: error: undefined reference to 'sqlite3_close'
scons: *** [Build/android-armeabi-debug/touchandmove22/apk/lib/armeabi/libverde.so] Error 1
scons: building terminated because of errors.
Exception AttributeError: "'NoneType' object has no attribute 'pack'" in <bound method ZipFile.__del__ of <zipfile.ZipFile instance at 0x10951aab8>> ignored
how can I solve this issue?
This was a regression in the Apportable SDK 1.1.04 release. The workaround is to add a dep to configuration.json of "sqlite_3_7_5" (or go back to 1.1.03).
More details in this bug report.

Resources