anshulrouthu / RPiCast

Screen casting solution using RaspberryPi
GNU General Public License v3.0
26 stars 8 forks source link

make cross-all all failed #3

Closed RicardoMullion closed 6 years ago

RicardoMullion commented 8 years ago

make failed

man1@man1-S7211:~/rpicast$ make cross-all all make[1]: Entering directory '/home/man1/rpicast' [CXX] source/porting_layers/components/video_capture.o [CXX] source/porting_layers/components/video_tunnel.o [CXX] source/porting_layers/components/demux.o [CXX] source/porting_layers/components/file_io.o [CXX] source/porting_layers/components/video_encoder.o [CXX] source/framework/timer.o [CXX] source/framework/utils.o [CXX] source/framework/socket_io.o [CXX] source/framework/worker.o [CXX] source/framework/ssdpdiscovery.o [CXX] source/framework/basepipe.o [CXX] source/framework/mutex.o [CXX] source/framework/buffer.o [CXX] source/osapi/osapi_linux.o [CXX] source/porting_layers/av_pipe/avframe_buffer.o [CXX] source/porting_layers/av_pipe/av_pipe.o Linking... rpi-build/librpicast-server.so [CXX] source/main/rpicast-server.o Linking... rpi-build/rpicast-server

@scp -r rpi-build/* root@192.168.1.2:workspace/

make[1]: Leaving directory '/home/man1/rpicast' [CXX] source/porting_layers/components/video_capture.o [CXX] source/porting_layers/components/demux.o In file included from source/porting_layers/components/demux.h:27:0, from source/porting_layers/components/demux.cpp:24: source/porting_layers/components/demux.cpp: In member function ‘virtual VC_STATUS DemuxDevice::Initialize()’: source/portinglayers/components/demux.cpp:46:94: error: cast from ‘AVBitStreamFilterContext’ to ‘int’ loses precision [-fpermissive] ter_ctx,, "Error(%d): Unable to create H264 bit stream filter", (int)m_h264filte ^ ./source/framework/utils.h:85:55: note: in definition of macro ‘DBGPRINT’

define DBGPRINT(level,msg) vcDebug(level).DebugPrint msg

                                                   ^

./source/framework/utils.h:110:35: note: in expansion of macro ‘DBG_DBG_ERR’

define DBG_ERR(format, args...) DBG_DBG_ERR(LEVEL_ERROR, format, ##args)

                               ^

./source/framework/utils.h:120:9: note: in expansion of macro ‘DBG_ERR’ DBG_ERR("("#condition") "msg,##args); \ ^ source/porting_layers/components/demux.cpp:46:5: note: in expansion of macro ‘DBG_CHECK’ DBG_CHECK(!m_h264filter_ctx,, "Error(%d): Unable to create H264 bit stream f ^ Makefile:89: recipe for target 'source/portinglayers/components/demux.o' failed make: ** [source/porting_layers/components/demux.o] Error 1 man1@man1-S7211:~/rpicast$

Why?

anshulrouthu commented 8 years ago

I think those errors are caused by improper type casting, can easily be fixed. on 64 bit machine pointer is 64 bit wide and int is 32 bits, casting from a 64 bit type to a 32 bit type looses data and is not good. I started this project on a 32 bit machine hence got away without causing any error here. Feel free to make changes and do a pull request.

anshulrouthu commented 6 years ago

Fixed with the latest commit