I need to build SimpleStreamer application of iDS
I have archive with follow structure:
.
├── bin
│ └── ueye_streamer
├── doc
. .
. .
│ └── ueye__stream_8h_source.html
├── include
│ └── ueye_stream.h
├── lib
│ ├── ffmpeg
│ │ ├── libavcodec.so
│ │ ├── libavcodec.so.56
│ │ ├── libavcodec.so.56.60.100
│ │ ├── libavdevice.so
│ │ ├── libavdevice.so.56
│ │ ├── libavdevice.so.56.4.100
│ │ ├── libavfilter.so
│ │ ├── libavfilter.so.5
│ │ ├── libavfilter.so.5.40.101
│ │ ├── libavformat.so
│ │ ├── libavformat.so.56
│ │ ├── libavformat.so.56.40.101
│ │ ├── libavutil.so
│ │ ├── libavutil.so.54
│ │ ├── libavutil.so.54.31.100
│ │ ├── libswresample.so
│ │ ├── libswresample.so.1
│ │ ├── libswresample.so.1.2.101
│ │ ├── libswscale.so
│ │ ├── libswscale.so.3
│ │ └── libswscale.so.3.1.101
│ ├── libueye_stream.so -> libueye_stream.so.2
│ ├── libueye_stream.so.2 -> libueye_stream.so.2.0
│ ├── libueye_stream.so.2.0
│ └── live555
│ ├── libBasicUsageEnvironment.so
│ ├── libBasicUsageEnvironment.so.1
│ ├── libBasicUsageEnvironment.so.1.0.0
│ ├── libgroupsock.so
│ ├── libgroupsock.so.8
│ ├── libgroupsock.so.8.1.0
│ ├── libliveMedia.so
│ ├── libliveMedia.so.52
│ ├── libliveMedia.so.52.0.4
│ ├── libUsageEnvironment.so
│ ├── libUsageEnvironment.so.3
│ └── libUsageEnvironment.so.3.1.0
├── licenses
│ ├── thirdparty_copyrights.txt
│ ├── thirdparty_licenses.txt
│ └── thirdparty_rights.txt
├── README.txt
├── src
│ ├── SimpleStreamer
│ │ ├── build
│ │ ├── CMakeLists.txt
│ │ ├── libueye_stream.so
│ │ ├── libueye_stream.so.2.0
│ │ ├── main.cpp
│ │ └── ueye_stream.h
│ └── uEyeStreamer
│ ├── build
│ ├── CMakeLists.txt
│ ├── res
│ ├── src
│ ├── streamer.qrc
│ ├── streamer.rc.in
│ └── uEye_Streamer.ico
└── ueye_streamer.sh
This is the contents of SimpleStreamer's CMakeLists.txt
:
project(SimpleStream)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ueye_api ueye_stream)
I copied project's common lib
and include
folders to system-wide lib
and include
:
sudo cp include/ueye_stream.h /usr/local/include/
sudo cp lib/libueye_stream.so.2.0 /usr/local/lib/
I made symlinks in same manner as it stays in /usr/local/lib
and project's lib
:
lrwxrwxrwx 1 olga olga 19 июн 21 2016 libueye_stream.so -> libueye_stream.so.2
lrwxrwxrwx 1 olga olga 21 июн 21 2016 libueye_stream.so.2 -> libueye_stream.so.2.0
-rwxr-xr-x 1 olga olga 151018 июн 21 2016 libueye_stream.so.2.0
I made sudo ldconfig
without any error.
I did cmake ..
from SimpleStreamer's build
dir:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/olga/camera/ueye/ueye_stream/ueye_stream_x64/src/SimpleStreamer/build
But when I continue to make
phase, I get much errors:
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/src/SimpleStreamer/build$ make
[ 50%] Linking CXX executable SimpleStream
/usr/bin/ld: warning: libliveMedia.so.52, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgroupsock.so.8, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libBasicUsageEnvironment.so.1, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libUsageEnvironment.so.3, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavcodec.so.56, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavfilter.so.5, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavutil.so.54, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libswscale.so.3, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavformat.so.56, needed by //usr/local/lib/libueye_stream.so, not found (try using -rpath or -rpath-link)
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::doStopGettingFrames()'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_decode_video2@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isServerMediaSession() const'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::afterGetting(FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `BasicUsageEnvironment::createNew(TaskScheduler&)'
//usr/local/lib/libueye_stream.so: undefined reference to `avpicture_get_size@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::setStreamSourceDuration(FramedSource*, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_free@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSession::addSubsession(ServerMediaSubsession*)'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::~FramedSource()'
//usr/local/lib/libueye_stream.so: undefined reference to `typeinfo for OnDemandServerMediaSubsession'
//usr/local/lib/libueye_stream.so: undefined reference to `av_frame_free@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStream(unsigned int, void*, char*&, char*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_get_context_defaults3@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::startStream(unsigned int, void*, void (*)(void*), void*, unsigned short&, unsigned int&, void (*)(void*, unsigned char), void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSubsession::testScaleFactor(float&)'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::JPEGVideoSource(UsageEnvironment&)'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::~JPEGVideoSource()'
//usr/local/lib/libueye_stream.so: undefined reference to `H264VideoRTPSink::createNew(UsageEnvironment&, Groupsock*, unsigned char)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isRTSPClient() const'
//usr/local/lib/libueye_stream.so: undefined reference to `RTSPServer::rtspURL(ServerMediaSession const*, int) const'
//usr/local/lib/libueye_stream.so: undefined reference to `GenericMediaServer::addServerMediaSession(ServerMediaSession*)'
//usr/local/lib/libueye_stream.so: undefined reference to `sws_freeContext@LIBSWSCALE_3'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getCurrentNPT(void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::restartInterval()'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isRTPSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::deleteStream(unsigned int, void*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getRTPSinkandRTCP(void*, RTPSink const*&, RTCPInstance const*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isDVVideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `Port::Port(unsigned short)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_new_packet@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getStreamParameters(unsigned int, unsigned int, Port const&, Port const&, int, unsigned char, unsigned char, unsigned int&, unsigned char&, unsigned char&, Port&, Port&, void*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isMPEG1or2VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::sdpLines()'
//usr/local/lib/libueye_stream.so: undefined reference to `BasicTaskScheduler::createNew(unsigned int)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStreamSource(FramedSource*, double&, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::maxFrameSize() const'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_open2@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::~OnDemandServerMediaSubsession()'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isAMRAudioSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isH265VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::nullSeekStream(unsigned int, void*, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_frame_alloc@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `avpicture_fill@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::OnDemandServerMediaSubsession(UsageEnvironment&, unsigned char, unsigned short, unsigned char)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::createGroupsock(in_addr const&, Port)'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSubsession::getAbsoluteTimeRange(char*&, char*&) const'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSession::createNew(UsageEnvironment&, char const*, char const*, char const*, unsigned char, char const*)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isRTCPInstance() const'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoRTPSink::createNew(UsageEnvironment&, Groupsock*)'
//usr/local/lib/libueye_stream.so: undefined reference to `GenericMediaServer::deleteServerMediaSession(ServerMediaSession*)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_free_packet@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `ServerMediaSubsession::duration() const'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isRTSPServer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `av_register_all@LIBAVFORMAT_56'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::getAttributes() const'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_encode_video2@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `avformat_new_stream@LIBAVFORMAT_56'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::isFramedSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `H264VideoStreamDiscreteFramer::createNew(UsageEnvironment&, FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isSink() const'
//usr/local/lib/libueye_stream.so: undefined reference to `typeinfo for JPEGVideoSource'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::setStreamSourceScale(FramedSource*, float)'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStream(unsigned int, void*, double&, double, unsigned long&)'
//usr/local/lib/libueye_stream.so: undefined reference to `OutPacketBuffer::maxSize'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::close(Medium*)'
//usr/local/lib/libueye_stream.so: undefined reference to `UsageEnvironment::reclaim()'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::MIMEtype() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getAuxSDPLine(RTPSink*, FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_close@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `av_init_packet@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::closeStreamSource(FramedSource*)'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isMPEG4VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::pauseStream(unsigned int, void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isJPEGVideoSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_find_decoder@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `av_malloc@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `Medium::isMediaSession() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::createRTCP(Groupsock*, unsigned int, unsigned char const*, RTPSink*)'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_alloc_context3@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `avcodec_find_encoder@LIBAVCODEC_56'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::setStreamScale(unsigned int, void*, float)'
//usr/local/lib/libueye_stream.so: undefined reference to `sws_getContext@LIBSWSCALE_3'
//usr/local/lib/libueye_stream.so: undefined reference to `JPEGVideoSource::isJPEGVideoSource() const'
//usr/local/lib/libueye_stream.so: undefined reference to `MediaSource::isH264VideoStreamFramer() const'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::getStreamSource(void*)'
//usr/local/lib/libueye_stream.so: undefined reference to `FramedSource::FramedSource(UsageEnvironment&)'
//usr/local/lib/libueye_stream.so: undefined reference to `av_log_set_level@LIBAVUTIL_54'
//usr/local/lib/libueye_stream.so: undefined reference to `OnDemandServerMediaSubsession::seekStreamSource(FramedSource*, char*&, char*&)'
//usr/local/lib/libueye_stream.so: undefined reference to `RTSPServer::createNew(UsageEnvironment&, Port, UserAuthenticationDatabase*, unsigned int)'
//usr/local/lib/libueye_stream.so: undefined reference to `typeinfo for FramedSource'
//usr/local/lib/libueye_stream.so: undefined reference to `sws_scale@LIBSWSCALE_3'
collect2: error: ld returned 1 exit status
CMakeFiles/SimpleStream.dir/build.make:94: recipe for target 'SimpleStream' failed
make[2]: *** [SimpleStream] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/SimpleStream.dir/all' failed
make[1]: *** [CMakeFiles/SimpleStream.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
In README.md project's root I have nothing about installation of headers and libraries...
UPDATE
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ nm -C -u libwx_baseu-2.8.so libueye_stream.so.2.0
nm: 'libwx_baseu-2.8.so': No such file
libueye_stream.so.2.0:
U avcodec_alloc_context3@@LIBAVCODEC_56
.
.
System version:
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ lsb_release -a
\No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ uname -r
4.18.0-16-generic
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$
Result of ldd
:
olga@olga-MS-7758:~/camera/ueye/ueye_stream/ueye_stream_x64/lib$ ldd libueye_stream.so.2.0
linux-vdso.so.1 (0x00007fff56183000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f215cbb5000)
libliveMedia.so.52 => not found
libgroupsock.so.8 => not found
libBasicUsageEnvironment.so.1 => not found
libUsageEnvironment.so.3 => not found
libavcodec.so.56 => not found
libavfilter.so.5 => not found
libavutil.so.54 => not found
libswscale.so.3 => not found
libavformat.so.56 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f215c82c000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f215c48e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f215c276000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f215be85000)
/lib64/ld-linux-x86-64.so.2 (0x00007f215cfee000)
OK, after reading some theoretical material and "Deduction Thinking" (c), I found the solution:
/usr/local/lib/ueye_olga
lib
and its subfolders toueye_olga
, see output below./etc/ld.so.conf.d/ueye_olga.conf with path to the
/usr/local/lib/ueye_olga`, see below.sudo ldconfig
libueye_stream.so
is linked properly (see below)libueye_stream.so
and it's links folder up, I don't know why, see error below.sudo ldconfig
make
works properly/usr/local/lib/ueye_olga`:
Unnecessary files removing:
If you will not create soft links, you will get error such as:
The reason:
Taken from here.
/etc/ld.so.conf.d/ueye_olga.conf
:Proprly linked ueye_stream:
Not, that
libueye_stream.so
with soft links moved to/usr/local/lib
.make
succeed: