mpromonet / v4l2rtspserver

RTSP Server for V4L2 device capture supporting HEVC/H264/JPEG/VP8/VP9
The Unlicense
1.86k stars 428 forks source link

build assistance for nix package - linker errors #255

Open colemickens opened 3 years ago

colemickens commented 3 years ago

Hi, I am writing a Nix package for this application, as I'd really like to use this - it looks great! thanks!

I do need some help with cmake and building v4l2rtspserver. I'm getting close:

EDIT: see updated log in a reply

Any suggestions?

I'm wondering if live555 doesn't have correct pkg-config config and thus the linker isn't finding what it needs to link against?

colemickens commented 3 years ago

Ignore the reply I deleted, this is the new build log after updating live555 to latest (though, note, we may be building it wrong?)

@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j12 -l12 SHELL=/nix/store/qfb4j7w2fjjq953nd9xncz5mymj5n0kb-bash-5.1-p8/bin/bash
[  9%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/V4l2Capture.cpp.o
[ 13%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/V4l2Access.cpp.o
[ 13%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/V4l2Device.cpp.o
[ 22%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/H264_V4l2DeviceSource.cpp.o
[ 22%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/DeviceSource.cpp.o
[ 36%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/ALSACapture.cpp.o
[ 36%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/V4l2MmapDevice.cpp.o
[ 36%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/HTTPServer.cpp.o
[ 40%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/V4l2Output.cpp.o
[ 45%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/V4l2ReadWriteDevice.cpp.o
[ 50%] Building CXX object CMakeFiles/v4l2wrapper.dir/v4l2wrapper/src/logger.cpp.o
[ 54%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/MJPEGVideoSource.cpp.o
[ 59%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/MemoryBufferSink.cpp.o
[ 63%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/MulticastServerMediaSubsession.cpp.o
[ 68%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/ServerMediaSubsession.cpp.o
[ 72%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/TSServerMediaSubsession.cpp.o
[ 77%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/UnicastServerMediaSubsession.cpp.o
[ 81%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/src/V4l2RTSPServer.cpp.o
/build/source/src/DeviceSource.cpp: In member function 'int V4L2DeviceSource::getNextFrame()':
/build/source/src/DeviceSource.cpp:218:9: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)' declared with attribute 'warn_unused_result' [-Wunused-result]
  218 |    write(m_outfd, buffer, frameSize);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 86%] Linking CXX static library libv4l2wrapper.a
[ 86%] Built target v4l2wrapper
[ 90%] Linking CXX static library liblibv4l2rtspserver.a
[ 90%] Built target libv4l2rtspserver
[ 95%] Building CXX object CMakeFiles/v4l2rtspserver.dir/main.cpp.o
[100%] Linking CXX executable v4l2rtspserver
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(HTTPServer.cpp.o): in function `HTTPServer::HTTPClientConnection::streamSource(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
HTTPServer.cpp:(.text+0x1c2): undefined reference to `ByteStreamMemoryBufferSource::createNew(UsageEnvironment&, unsigned char*, unsigned long, unsigned char, unsigned int, unsigned int)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o): in function `MulticastServerMediaSubsession::sdpLines()':
MulticastServerMediaSubsession.cpp:(.text+0x8d): undefined reference to `PassiveServerMediaSubsession::sdpLines(int)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o): in function `MulticastServerMediaSubsession::createRtpSink(UsageEnvironment&, in_addr, Port, Port, int, StreamReplicator*)':
MulticastServerMediaSubsession.cpp:(.text+0x1bb): undefined reference to `StreamReplicator::createStreamReplica()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o): in function `MulticastServerMediaSubsession::createNew(UsageEnvironment&, in_addr, Port, Port, int, StreamReplicator*)':
MulticastServerMediaSubsession.cpp:(.text+0x378): undefined reference to `PassiveServerMediaSubsession::PassiveServerMediaSubsession(RTPSink&, RTCPInstance*)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o): in function `MulticastServerMediaSubsession::~MulticastServerMediaSubsession()':
MulticastServerMediaSubsession.cpp:(.text._ZN30MulticastServerMediaSubsessionD2Ev[_ZN30MulticastServerMediaSubsessionD5Ev]+0x47): undefined reference to `PassiveServerMediaSubsession::~PassiveServerMediaSubsession()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o): in function `MulticastServerMediaSubsession::~MulticastServerMediaSubsession()':
MulticastServerMediaSubsession.cpp:(.text._ZN30MulticastServerMediaSubsessionD0Ev[_ZN30MulticastServerMediaSubsessionD5Ev]+0x46): undefined reference to `PassiveServerMediaSubsession::~PassiveServerMediaSubsession()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o): in function `MulticastServerMediaSubsession::createNew(UsageEnvironment&, in_addr, Port, Port, int, StreamReplicator*) [clone .cold]':
MulticastServerMediaSubsession.cpp:(.text.unlikely+0x24): undefined reference to `PassiveServerMediaSubsession::~PassiveServerMediaSubsession()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTI30MulticastServerMediaSubsession[_ZTI30MulticastServerMediaSubsession]+0x18): undefined reference to `typeinfo for PassiveServerMediaSubsession'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0x58): undefined reference to `PassiveServerMediaSubsession::sdpLines(int)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0x60): undefined reference to `PassiveServerMediaSubsession::getStreamParameters(unsigned int, sockaddr_storage const&, Port const&, Port const&, int, unsigned char, unsigned char, sockaddr_storage&, unsigned char&, unsigned char&, Port&, Port&, void*&)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0x68): undefined reference to `PassiveServerMediaSubsession::startStream(unsigned int, void*, void (*)(void*), void*, unsigned short&, unsigned int&, void (*)(void*, unsigned char), void*)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0x98): undefined reference to `PassiveServerMediaSubsession::getCurrentNPT(void*)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0xa8): undefined reference to `PassiveServerMediaSubsession::getRTPSinkandRTCP(void*, RTPSink const*&, RTCPInstance const*&)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0xb0): undefined reference to `PassiveServerMediaSubsession::deleteStream(unsigned int, void*&)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MulticastServerMediaSubsession.cpp.o):(.data.rel.ro._ZTV30MulticastServerMediaSubsession[_ZTV30MulticastServerMediaSubsession]+0xd0): undefined reference to `PassiveServerMediaSubsession::rtcpIsMuxed()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(ServerMediaSubsession.cpp.o): in function `BaseServerMediaSubsession::createSource(UsageEnvironment&, FramedSource*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ServerMediaSubsession.cpp:(.text+0xe4): undefined reference to `JPEGVideoSource::JPEGVideoSource(UsageEnvironment&)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(ServerMediaSubsession.cpp.o): in function `BaseServerMediaSubsession::createSink(UsageEnvironment&, Groupsock*, unsigned char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, V4L2DeviceSource*)':
ServerMediaSubsession.cpp:(.text+0x97d): undefined reference to `RawVideoRTPSink::createNew(UsageEnvironment&, Groupsock*, unsigned char, unsigned int, unsigned int, unsigned int, char const*, char const*)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: ServerMediaSubsession.cpp:(.text+0x88a): undefined reference to `JPEGVideoRTPSink::createNew(UsageEnvironment&, Groupsock*)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(TSServerMediaSubsession.cpp.o): in function `TSServerMediaSubsession::getStreamSource(void*)':
TSServerMediaSubsession.cpp:(.text+0xa8): undefined reference to `ByteStreamMemoryBufferSource::createNew(UsageEnvironment&, unsigned char*, unsigned long, unsigned char, unsigned int, unsigned int)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(TSServerMediaSubsession.cpp.o): in function `TSServerMediaSubsession::TSServerMediaSubsession(UsageEnvironment&, StreamReplicator*, StreamReplicator*, unsigned int)':
TSServerMediaSubsession.cpp:(.text+0x317): undefined reference to `StreamReplicator::createStreamReplica()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: TSServerMediaSubsession.cpp:(.text+0x322): undefined reference to `MPEG2TransportStreamFromESSource::createNew(UsageEnvironment&)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: TSServerMediaSubsession.cpp:(.text+0x39d): undefined reference to `MPEG2TransportStreamFromESSource::addNewVideoSource(FramedSource*, int, short)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: TSServerMediaSubsession.cpp:(.text+0x3c5): undefined reference to `MPEG2TransportStreamFromESSource::addNewAudioSource(FramedSource*, int, short)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: TSServerMediaSubsession.cpp:(.text+0x4f5): undefined reference to `MPEG2TransportStreamFromESSource::addNewVideoSource(FramedSource*, int, short)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(UnicastServerMediaSubsession.cpp.o): in function `UnicastServerMediaSubsession::createNewStreamSource(unsigned int, unsigned int&)':
UnicastServerMediaSubsession.cpp:(.text+0x12): undefined reference to `StreamReplicator::createStreamReplica()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(V4l2RTSPServer.cpp.o): in function `V4l2RTSPServer::CreateVideoReplicator(V4L2DeviceParameters const&, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, V4l2IoType, V4l2Output*&)':
V4l2RTSPServer.cpp:(.text+0x10a1): undefined reference to `StreamReplicator::createNew(UsageEnvironment&, FramedSource*, unsigned char)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(V4l2RTSPServer.cpp.o): in function `V4l2RTSPServer::CreateAudioReplicator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<_snd_pcm_format, std::allocator<_snd_pcm_format> > const&, int, int, int, int, int)':
V4l2RTSPServer.cpp:(.text+0x4a99): undefined reference to `StreamReplicator::createNew(UsageEnvironment&, FramedSource*, unsigned char)'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MJPEGVideoSource.cpp.o): in function `MJPEGVideoSource::~MJPEGVideoSource()':
MJPEGVideoSource.cpp:(.text._ZN16MJPEGVideoSourceD2Ev[_ZN16MJPEGVideoSourceD5Ev]+0x23): undefined reference to `JPEGVideoSource::~JPEGVideoSource()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MJPEGVideoSource.cpp.o): in function `MJPEGVideoSource::~MJPEGVideoSource()':
MJPEGVideoSource.cpp:(.text._ZN16MJPEGVideoSourceD0Ev[_ZN16MJPEGVideoSourceD5Ev]+0x22): undefined reference to `JPEGVideoSource::~JPEGVideoSource()'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MJPEGVideoSource.cpp.o):(.data.rel.ro._ZTI16MJPEGVideoSource[_ZTI16MJPEGVideoSource]+0x10): undefined reference to `typeinfo for JPEGVideoSource'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: liblibv4l2rtspserver.a(MJPEGVideoSource.cpp.o):(.data.rel.ro._ZTV16MJPEGVideoSource[_ZTV16MJPEGVideoSource]+0xa0): undefined reference to `JPEGVideoSource::isJPEGVideoSource() const'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(TLSState.o): in function `TLSState::read(unsigned char*, unsigned int)':
(.text+0x49): undefined reference to `SSL_read'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x5f): undefined reference to `SSL_get_error'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(TLSState.o): in function `TLSState::reset()':
(.text+0x84): undefined reference to `SSL_free'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x9a): undefined reference to `SSL_CTX_free'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0xb5): undefined reference to `SSL_shutdown'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(TLSState.o): in function `TLSState::setup(int)':
(.text+0x112): undefined reference to `OPENSSL_init_ssl'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x117): undefined reference to `TLS_client_method'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x124): undefined reference to `SSL_CTX_new'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x135): undefined reference to `SSL_new'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x148): undefined reference to `BIO_new_socket'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x157): undefined reference to `SSL_set_bio'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x160): undefined reference to `SSL_set_connect_state'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(TLSState.o): in function `TLSState::connect(int)':
(.text+0x1ad): undefined reference to `SSL_connect'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x1bb): undefined reference to `SSL_get_error'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(TLSState.o): in function `TLSState::write(char const*, unsigned int)':
(.text+0x35): undefined reference to `SSL_write'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(SRTPCryptographicContext.o): in function `SRTPCryptographicContext::cryptData(SRTPCryptographicContext::derivedKeys&, unsigned long, unsigned int, unsigned char*, unsigned int)':
(.text+0x2bd): undefined reference to `AES_set_encrypt_key'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x2ea): undefined reference to `AES_encrypt'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(SRTPCryptographicContext.o): in function `SRTPCryptographicContext::deriveSingleKey(unsigned char const*, unsigned char const*, SRTPCryptographicContext::SRTPKeyDerivationLabel, unsigned int, unsigned char*)':
(.text+0x7bf): undefined reference to `AES_set_encrypt_key'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x822): undefined reference to `AES_encrypt'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(HMAC_SHA1.o): in function `sha1(unsigned char*, unsigned char const*, unsigned int, unsigned char const*, unsigned int)':
(.text+0x1d): undefined reference to `EVP_MD_CTX_new'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x25): undefined reference to `EVP_sha1'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x30): undefined reference to `EVP_DigestInit'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x3d): undefined reference to `EVP_DigestUpdate'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x50): undefined reference to `EVP_DigestUpdate'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x5d): undefined reference to `EVP_DigestFinal'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(HMAC_SHA1.o): in function `HMAC_SHA1(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char*)':
(.text+0x269): undefined reference to `EVP_MD_CTX_new'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x273): undefined reference to `EVP_sha1'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x280): undefined reference to `EVP_DigestInit'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x297): undefined reference to `EVP_DigestUpdate'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x2a6): undefined reference to `EVP_DigestFinal'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: (.text+0x2b0): undefined reference to `EVP_MD_CTX_free'
/nix/store/fp2h123793bxln4cjxy0mz08sf4nx2m3-binutils-2.35.1/bin/ld: /nix/store/58pxli8qj262mk75hr40zbmd4pdyd7fz-live555-2021.08.24/lib/libliveMedia.a(HMAC_SHA1.o): in function `sha1(unsigned char*, unsigned char const*, unsigned int, unsigned char const*, unsigned int)':
(.text+0x73): undefined reference to `EVP_MD_CTX_free'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/v4l2rtspserver.dir/build.make:105: v4l2rtspserver] Error 1
make[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/v4l2rtspserver.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
colemickens commented 3 years ago

I had to:

  1. patch live555 to output decent pkg-config data
  2. patch this app to find openssl+live555 via pkg-config
  3. patch this app to find VERSION from a passed in cmake variable

This has made it possible to package it in a relatively straightforward way for NixOS: https://github.com/cole-mickens/nixcfg/blob/8af67fa760bae7f8c9a2e2b1dce04634d6da76e0/pkgs/v4l2rtspserver/default.nix

mpromonet commented 3 years ago

Hi,

I know this is a bit confusing, my original idea was to build live555 in order o set the CFLAGS, and PR propose to use pkg-tool to use it. There is some imporovement to do. openssl is needed only without NO_OPENSSL=1.

Feel free to propose some using PR, if it helps you and maybe others users.

Best Regards, Michel.