kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
642 stars 78 forks source link

Error when I try compile Machinery #49

Closed alexandrefreitasp closed 1 year ago

alexandrefreitasp commented 1 year ago

Please I need your help. I use Linux Ubuntu 20.4

When I try compile/run de machinery with "go run main.go run mycameraname 8080" like your example I got this message.

github.com/kerberos-io/joy4/cgo/ffmpeg

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libavresample.a(resample.o): undefined reference to symbol 'cos@@GLIBC_2.2.5' /usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

github.com/kerberos-io/joy4/cgo/ffmpeg

../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go: In function ‘wrap_avcodec_decode_audio4’: ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:7:9: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations] 7 | return avcodec_decode_audio4(ctx, frame, got, &pkt); | ^~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3047:5: note: declared here 3047 | int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, | ^~~~~ ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go: In function ‘wrap_avresample_convert’: ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:10:9: warning: ‘avresample_convert’ is deprecated [-Wdeprecated-declarations] 10 | return avresample_convert(avr, (void )out, outsize, outcount, (void )in, insize, incount); | ^~ In file included from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:451:5: note: declared here 451 | int avresample_convert(AVAudioResampleContext *avr, uint8_t *output, | ^~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avcodec_encode_audio2’: cgo-gcc-prolog:153:2: warning: ‘avcodec_encode_audio2’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3688:5: note: declared here 3688 | int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, | ^~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_alloc_context’: cgo-gcc-prolog:287:2: warning: ‘avresample_alloc_context’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:194:25: note: declared here 194 | AVAudioResampleContext avresample_alloc_context(void); | ^~~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_free’: cgo-gcc-prolog:302:2: warning: ‘avresample_free’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:258:6: note: declared here 258 | void avresample_free(AVAudioResampleContext *avr); | ^~~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_get_out_samples’: cgo-gcc-prolog:320:2: warning: ‘avresample_get_out_samples’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:403:5: note: declared here 403 | int avresample_get_out_samples(AVAudioResampleContext avr, int in_nb_samples); | ^~~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avresample_open’: cgo-gcc-prolog:339:2: warning: ‘avresample_open’ is deprecated [-Wdeprecated-declarations] In file included from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:5, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/audio.go:4: /usr/include/libavresample/avresample.h:214:5: note: declared here 214 | int avresample_open(AVAudioResampleContext *avr); | ^~~~~~~

github.com/kerberos-io/joy4/cgo/ffmpeg

../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.go: In function ‘ffinit’: ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.go:7:9: warning: ‘av_register_all’ is deprecated [-Wdeprecated-declarations] 7 | av_register_all(); | ^~~~~~~ In file included from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.go:5: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1955:6: note: declared here 1955 | void av_register_all(void); | ^~~~~~~

github.com/kerberos-io/joy4/cgo/ffmpeg

../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go: In function ‘wrap_avcodec_decode_video2’: ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go:14:9: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations] 14 | return avcodec_decode_video2(ctx, frame, got, &pkt); | ^~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go:11: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext avctx, AVFrame picture, | ^~~~~ ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go: In function ‘wrap_avcodec_decode_video2_empty’: ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go:18:9: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations] 18 | return avcodec_decode_video2(ctx, frame, got, &pkt); | ^~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go:11: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext avctx, AVFrame picture, | ^~~~~ cgo-gcc-prolog: In function ‘_cgo_93cb7bf53f7a_Cfunc_avcodec_encode_video2’: cgo-gcc-prolog:115:2: warning: ‘avcodec_encode_video2’ is deprecated [-Wdeprecated-declarations] In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:312, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/ffmpeg.h:2, from ../../../pkg/mod/github.com/kerberos-io/joy4@v1.0.33/cgo/ffmpeg/video.go:11: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3729:5: note: declared here 3729 | int avcodec_encode_video2(AVCodecContext avctx, AVPacket avpkt,

cedricve commented 1 year ago

@alexandrefreitasp have a look at our codespace