Dafang-Hacks / Main

138 stars 63 forks source link

ImpEncoder.cpp compile error #68

Closed claud9999 closed 3 years ago

claud9999 commented 3 years ago

Building on Ubuntu:

% uname -a
Linux nuc10 5.4.0-62-generic #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
% more /etc/debian_version
bullseye/sid

Compiling ImpEncoder.cpp via ./compile.sh results in:

/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../toolchain/bin/mips-linux-gnu-g++   -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/v4l2wrapper/inc -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../live555/liveMedia/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../v4l2rtspserver-tools -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/filter -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/groupsock/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/UsageEnvironment/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/BasicUsageEnvironment/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../_install/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/freetype2/freetype2/include  -std=c++11 -Wall -O3 -g   -o CMakeFiles/v4l2rtspserver-master.dir/src/ImpEncoder.cpp.o -c /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/ImpEncoder.cpp
In file included from /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/HTTPServer.cpp:27:0:
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h: In constructor 'HTTPServer::HTTPClientConnection::HTTPClientConnection(RTSPServer&, int, sockaddr_in)':
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h:126:138: error: no matching function for call to 'RTSPServer::RTSPClientConnection::RTSPClientConnection(RTSPServer&, int&, sockaddr_in&)'
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h:126:138: note: candidates are:
In file included from /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/HTTPServer.cpp:19:0:
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:157:5: note: RTSPServer::RTSPClientConnection::RTSPClientConnection(RTSPServer&, int, const sockaddr_storage&)
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:157:5: note:   no known conversion for argument 3 from 'sockaddr_in' to 'const sockaddr_storage&'
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:135:9: note: RTSPServer::RTSPClientConnection::RTSPClientConnection(const RTSPServer::RTSPClientConnection&)
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:135:9: note:   candidate expects 1 argument, 3 provided
In file included from /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/HTTPServer.cpp:27:0:
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h: In static member function 'static HTTPServer* HTTPServer::createNew(UsageEnvironment&, Port, UserAuthenticationDatabase*, unsigned int, unsigned int, std::string)':
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h:154:48: error: no matching function for call to 'HTTPServer::setUpOurSocket(UsageEnvironment&, Port&)'
...
nik0 commented 3 years ago

I guess live555 have been updated and does not compile anymore Please check https://github.com/mpromonet/v4l2rtspserver that have been updated for that

claud9999 commented 3 years ago

I guess live555 have been updated and does not compile anymore Please check https://github.com/mpromonet/v4l2rtspserver that have been updated for that

This does compile.

However it looks like the live555 that the above repo uses does not cross-compile (link fails with strlcpy/strlcat refs).

nik0 commented 3 years ago

Try removing the live555 folder And recompile only this one

claud9999 commented 3 years ago

Unclear what I should do...

% cd Main/Modules/live
% rm -rf live555
% ./compile.sh

results in...

home/cdknight/Dafang-Hacks-Main/toolchain/bin/mips-linux-gnu-g++ -otestMP3Streamer -L.  testMP3Streamer.o ../liveMedia/libliveMedia.so ../groupsock/libgroupsock.so ../BasicUsageEnvironment/libBasicUsageEnvironment.so ../UsageEnvironment/libUsageEnvironment.so  /home/cdknight/Dafang-Hacks-Main/_install/lib/libssl.a /home/cdknight/Dafang-Hacks-Main/_install/lib/libcrypto.a /home/cdknight/Dafang-Hacks-Main/_install/lib/libtls.a  -pthread  
/home/cdknight/Dafang-Hacks-Main/_install/lib/libcrypto.a(libcrypto_la-ui_lib.o): In function `UI_set_result':
ui_lib.c:(.text+0x2bf0): undefined reference to `strlcpy'
ui_lib.c:(.text+0x2bf8): undefined reference to `strlcpy'
/home/cdknight/Dafang-Hacks-Main/_install/lib/libssl.a(ssl_lib.o): In function `SSL_get_shared_ciphers':
ssl_lib.c:(.text+0x2ec0): undefined reference to `strlcat'
ssl_lib.c:(.text+0x2ec4): undefined reference to `strlcat'
ssl_lib.c:(.text+0x2ed8): undefined reference to `strlcat'
ssl_lib.c:(.text+0x2ee4): undefined reference to `strlcat'
...

(Same problem as with the version in mpromonet's repo.)

nik0 commented 3 years ago

It seems that the problem is from the lib crypto Try rm _install/libssl.a and libcrypto.so and folder 01libressl/libressl and try recompile with 01 libressl/compile.sh

claud9999 commented 3 years ago

I'm confused and, instead of going back-and-forth on this ticket, I'm on Discord claud9999#0869 if you'd like me to screen-share.

claud9999 commented 3 years ago

Been looking around to see if I can get an (official) older release of live555 to see if I can build things, I'm thinking maybe the "working" release of live555 should be added to this github repo rather than pulling from live555.com?

nik0 commented 3 years ago

You maybe right Check in compile.sh of live there are some links to get older version Check also the long conversation here: https://github.com/Dafang-Hacks/Main/issues/47

Sorry I don’t have a lot of time for this project now ...

claud9999 commented 3 years ago

I've tried both the git source and Gentoo source and neither works. :| Will keep trying!

claud9999 commented 3 years ago

Slowly "porting" this to the latest live555 codebase; now running into a compiler error unable to link libalog--which is in the submodule Main/Audio but doesn't seem to get built by compile_modules.sh? The Makefile in Main/Audio doesn't work, referencing a toolchain folder that don't exist. @nik0 can you take a look at Main/Audio and ensure it's current?

claud9999 commented 3 years ago

For that matter, seems there's a circular dependency--I can't build v4lrtspserver-master 'cause it's looking for libalog but I can't build libalog 'cause the Audio/AudioPlay makefile is looking for v4lrtspserver-master/uclibc/... files.

nik0 commented 3 years ago

In the closed issue I mentioned earlier the guy successfully compiled with this command lines: git clone --depth=1 --recurse-submodules https://github.com/Dafang-Hacks/Main.git Hacks-Main-TEMP cd Hacks-Main-TEMP ./compile_modules.sh > compile_modules.log 2>&1 cp ../firmware_mod/lib/libalog.so _install/lib/libalog.so cp ../firmware_mod/lib/libimp.so _install/lib/ cp ../firmware_mod/lib/libsysutils.so _install/lib/ cd v4l2rtspserver-master ./compile.sh > compile.log 2>&1

claud9999 commented 3 years ago

Ok sounds like he's grabbing the libs from the binary release. I'll do that for now, but this should be fixed in the source too. :o (Want me to file a new ticket?)