neutrinolabs / NeutrinoRDP

This is a fork of FreeRDP 1.0.1
Apache License 2.0
57 stars 75 forks source link

can't build NeutrinoRDP with gcc 4.9, cmake 3.0 #3

Open FrankVanDamme opened 10 years ago

FrankVanDamme commented 10 years ago

I tried building NeutrinoRDP on Manjaro Linux, which fails. I did a plain "cmake ." and "make", the errors are below. (I only tried because both the xrdp server and NeutrinoRDP wouldn't build on a more common Ubuntu version distro).

[frank@limoen NeutrinoRDP]$ cmake --version cmake version 3.0.1

CMake suite maintained and supported by Kitware (kitware.com/cmake). [frank@limoen NeutrinoRDP]$ gcc --version gcc (GCC) 4.9.1 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

compiling:

...

[ 78%] Building C object channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/tsmf_ffmpeg.c.o /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:42:15: error: field 'codec_id' has incomplete type enum CodecID codec_id; ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'tsmf_ffmpeg_init_context': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:57:2: warning: implicit declaration of function 'avcodec_alloc_context' [-Wimplicit-function-declaration] mdecoder->codec_context = avcodec_alloc_context(); ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:57:26: warning: assignment makes pointer from integer without a cast mdecoder->codec_context = avcodec_alloc_context(); ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'tsmf_ffmpeg_init_video_stream': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:77:2: warning: 'avcodec_alloc_frame' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3513) [-Wdeprecated-declarations] mdecoder->frame = avcodec_alloc_frame(); ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'tsmf_ffmpeg_init_audio_stream': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:92:25: error: 'AVCodecContext' has no member named 'dsp_mask' mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2; ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'tsmf_ffmpeg_prepare': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:177:2: warning: implicit declaration of function 'avcodec_open' [-Wimplicit-function-declaration] if (avcodec_open(mdecoder->codec_context, mdecoder->codec) < 0) ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'tsmf_ffmpeg_decode_video': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:347:3: warning: 'avcodec_alloc_frame' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3513) [-Wdeprecated-declarations] frame = avcodec_alloc_frame(); ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'tsmf_ffmpeg_decode_audio': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:389:32: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function) mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16; ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:389:32: note: each undeclared identifier is reported only once for each function it appears in /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:424:4: warning: 'avcodec_decode_audio3' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3971) [-Wdeprecated-declarations] len = avcodec_decode_audio3(mdecoder->codec_context, ^ /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function 'TSMFDecoderEntry': /home/frank/data/compile/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:551:3: warning: implicit declaration of function 'avcodec_init' [-Wimplicit-function-declaration] avcodec_init(); ^ channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/build.make:54: recipe for target 'channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/tsmf_ffmpeg.c.o' failed make[2]: * [channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/tsmf_ffmpeg.c.o] Error 1 CMakeFiles/Makefile2:692: recipe for target 'channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/all' failed make[1]: * [channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/all] Error 2 Makefile:137: recipe for target 'all' failed make: *\ [all] Error 2

cocoon commented 9 years ago

I tried to build NeutrinoRDP today with Ubuntu 14.10, same problems, part of it was already solved here: https://github.com/FreeRDP/FreeRDP/pull/1610

But I still get now:

Linking C shared library tsmf.so [ 75%] Built target tsmf [ 76%] Building C object channels/drdynvc/tsmf/ffmpeg/CMakeFiles/tsmf_ffmpeg.dir/tsmf_ffmpeg.c.o

/home/user/dev/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function âtsmf_ffmpeg_init_video_streamâ: /home/user/dev/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:89:2: warning: âavcodec_alloc_frameâ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations] mdecoder->frame = avcodec_alloc_frame(); ^ /home/user/dev/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c: In function âtsmf_ffmpeg_set_formatâ: /home/user/dev/NeutrinoRDP/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c:226:25: error: âCODEC_ID_VC1â undeclared (first use in this function) mdecoder->codec_id = CODEC_ID_VC1;

srini8080 commented 9 years ago

Is this issue resolved? I am having the same issue on el6

Is there a document showing the version of FFMPEG, CMAKE, GCC etc we need to use to compile NeutrinoRDP?

jsorg71 commented 9 years ago

When you compile NeutrinoRDP, you ca turn off ffmpeg with cmake . -DWITH_FFMPEG=OFF libavcodec(ffmpeg) is known for breaking builds between versions.

srini8080 commented 9 years ago

Jay,

My goal is to get movies and animated gifs show smoothly on xrdp. I saw your youtube videos with codecs and your posts on ffmpeg with neutrino builds.

I have ffmpeg 2.2.1 with libavutil52.

Thanks,

srini8080 commented 9 years ago

Also I have everything running well. Sound, FUSE redirection etc. Only issue is video

jsorg71 commented 9 years ago

If you want to test codec mode, you don't need to configure xrdp with --enable-neutrinordp. That is used for RDP to RDP proxies. You want to configure xrdp with --enable-tjpeg. And configure NeutrinoRDP with -DWITH_TJPEG=ON for the client. Turbo jpeg codec mode only works with NeutrinoRDP as the client. You can do RemoteFX codec mode too but it's not as fast yet and that has the limitation of NeutrinoRDP or FreeRDP clients. Still some work to do on codec mode.

srini8080 commented 9 years ago

My server is el6 v6.6 and clients are all thin clients (over 40 of them). I do sesman-xvnc as default. Will TJPEG work with this config?

Thanks,

srini8080 commented 9 years ago

Also I can do GNOME or KDE or XFCE4 as session.

srini8080 commented 9 years ago

Also errors which makes me manually add -lfreerdp-utils and -lfreerdp-codec

../libxrdp/.libs/libxrdp.so: undefined reference to rfx_context_set_cpu_opt' ../libxrdp/.libs/libxrdp.so: undefined reference tostream_new' ../libxrdp/.libs/libxrdp.so: undefined reference to `stream_free'