New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building FreeRDP server & client on Windows #5026
Comments
Hello and welcome :)
To get help for problems you may encounter (or questions you have) use the mailing list and our IRC channel on freenode. |
Any updates on compiling with msys2/mingw? I managed to compile with cygwin but it's super slow. |
@pfeatherstone @astrand did some fixes but I don´t know if they are complete. |
Hi all, @pfeatherstone After fixing the issues (warnings & errors) I was able to build it from source. I will download master branch now and build it again. You are more than welcome to contact me offlist/github. We try to use non propietary compilers as much as we can. The codebase should be able to handle/deal with that. |
@sfhacker you have a diff or can create a pr with these changes? |
@sfhacker @akallabeth Would be great if we could get these changes pulled through. Did you use the MSYS2 or the MINGW64 repo? Using MINGW64 repo, I get the redeclaration errors. Using the MSYS2 repo, I can build the project but cannot get it to build the client, even with WITH_CLIENT ON. |
@sfhacker @akallabeth I've opened a similar issue on this page msys2/MINGW-packages#5718 This might be of interest to you. |
@akallabeth This issue, among others (#5026 / native Windows compiler), were reported over six months ago. People are still facing compilation and linking issues. Where are the presumed fixes you said you did? @pfeatherstone Thanks for opening another issue. Give me a couple of hours and I'll come back to you with my findings. |
@sfhacker Did the build work? Last time I checked out Master, the client did not work. I had to use version 2.0.0rc3 |
@pfeatherstone After fixing multiple compilation issues and some linking errors, the build did complete successfully. (MSYS/MinGW // GCC 8.3.0 x86_64 // master branch) |
@sfhacker Great! Can you post your changes? Also does it work with MSYS2/MINGW64 ? |
@pfeatherstone The changes are plenty and they should go in the codebase (no idea who is in charge of merging changes here). Some recurring issues from last year never made it to master branch. |
@sfhacker I'm a C/C++ developer but the issue I get when building with MSYS2/MINGW64, at least when using the MSYS2 repository (when starting MSYS2 you can chose to use use either MSYS2 bash or MINGW64 bash which sets up the PATH differently using different compilers and libraries) is that cmake is not configuring FreeRDP to build the client, even with the WITH_CLIENT option turned on. When building with the MINGW64 repository, I get the redeclaration errors. So it sounds like the mods are more CMake file mods more than source code. For the redeclarations errors, I image some macros need to be added or modified to avoid including header files that are not required. My experience with CMAKE is limitted. I was hoping you were going to post some patches to the cmake configuration |
@pfeatherstone Patches to cmake? Sorry but I don't follow. I just typed: That's it! Perhaps some of your workmates can help you out! It is quite straight forward process. I believe the compilation and linking errors have nothing to do with cmake tool. I may be wrong but ..... |
@sfhacker Initially you said you had many compilation and linking errors. Now you're saying it builds right out the box?! |
pf-windows-dev@DESKTOP-2KEC0PK MSYS ~/FreeRDP/build (1) If you are just trying to build this project, ignore this warning or (2) If you are developing this project, add the line
at the top of your top-level CMakeLists.txt file or set the minimum -- Check for working C compiler: /usr/bin/cc.exe Quoted variables like "MSYS" will no longer be dereferenced when the policy CMake Warning (dev) at CMakeLists.txt:243 (if): Quoted variables like "MSYS" will no longer be dereferenced when the policy -- Looking for x86_64 -- Finding recommended feature X11 for X11 (X11 client and server) -- Finding recommended feature Wayland for Wayland (Wayland client) -- Finding required feature ZLIB for compression (data compression) -- Skipping optional feature Pulse for sound (audio input, audio output and multimedia redirection) -- Skipping optional feature GStreamer_0_10 for multimedia (multimedia redirection, audio and video playback, gstreamer 0.10 version) -- Skipping optional feature JPEG for codec (use JPEG library) Quoted variables like "MSYS" will no longer be dereferenced when the policy -- Looking for timer_create -- Adding dynamic channel client server "audin": Audio Input Redirection Virtual Channel Extension pf-windows-dev@DESKTOP-2KEC0PK MSYS ~/FreeRDP/build pf-windows-dev@DESKTOP-2KEC0PK MSYS ~/FreeRDP/build |
@sfhacker That's the build in the MSYS2 shell. Notice how it builds fine, but the client is not built. |
@pfeatherstone You may need more coffee! A couple of hours ago I wrote: 'After fixing multiple compilation issues and some linking errors, ........'. We run out of ideas about how to help you with your issues. Anyway, let us know what else we can do? |
pf-windows-dev@DESKTOP-2KEC0PK MINGW64 ~/FreeRDP2/build
is not able to compile a simple test program. It fails with the following output:
CMake will not be able to correctly generate this project. -- Configuring incomplete, errors occurred! pf-windows-dev@DESKTOP-2KEC0PK MINGW64 ~/FreeRDP2/build |
@sfhacker that's the build in the MINGW64 shell |
@sfhacker Are you using MSYS1 ? |
We use an old MSYS bash (a legacy thing) but that has no impact on building large projects for x86_64 using GCC 8.3.0. Your MSYS/MinGW environment seems broken. You should sort that out first. |
I've reinstalled MSYS2. Giving it another go. If it doesn't work, I'll go to MSYS1. |
@pfeatherstone How are you doing? Please report your findings here as soon as you can! |
@sfhacker so you're right that MSYS apps only run in MSYS. It turns out that my environment was completely screwed because I was mixing MSYS apps, compilers with MINGW stuff. So I've fixed that and making progress. |
@pfeatherstone Any updates/news on this learning experience? |
Don’t build for windows. Wait for the Linux subsystem to be standardised. Done |
Sorry, I don't follow. Can you elaborate on that? |
The Linux subsystem on windows |
But that's has nothing to do with what you reported here and on another project! Do not hesitate to contact us should the need arise. We build large projects using the same env on a daily basis. All the best. |
It was just a passing comment. I was just trying to illustrate that building on Linux is orders of magnitude simpler and with the Linux subsystem you can run Linux executables on windows. And yes I’m a mingw virgin. No shame |
Sooner or later, the truth is revealed! |
Hi.
Just downloaded master branch as of the date of this post.
Using MSYS/MinGW on Windows 10 x64 with GCC 6.3.0 & cmake 3.8.1
There are several building, compilation and linking issues I'd like to report. (#5000 #4864)
+++ /FreeRDP-master/winpr/include/winpr/spec.h:962:0: warning: "DECLSPEC_IMPORT" redefined
#define DECLSPEC_IMPORT attribute((dllimport))
+++ /FreeRDP-master/winpr/include/winpr/nt.h:380:0: warning: "STATUS_NO_SUCH_LOGON_SESSION" redefined
#define STATUS_NO_SUCH_LOGON_SESSION ((NTSTATUS)0xC000005F)
+++ /FreeRDP-master/winpr/include/winpr/nt.h:385:0: warning: "STATUS_NO_SUCH_USER" redefined
#define STATUS_NO_SUCH_USER ((NTSTATUS)0xC0000064)
+++ /FreeRDP-master/winpr/libwinpr/utils/wlog/PacketMessage.c:44:12: error: static declaration of 'gettimeofday' follows non-static declaration
static int gettimeofday(struct timeval* tp, void* tz)
+++ /FreeRDP-master/winpr/libwinpr/wtsapi/wtsapi_win32.c:416:23: error: lvalue required as left operand of assignment
((BYTE*) lpBuffer) += numBytesToRead;
^~
+++ /FreeRDP-master/winpr/libwinpr/wtsapi/wtsapi_win32.c:527:24: error: lvalue required as left operand of assignment
((BYTE*) lpBuffer) += numBytesRead;
+++ /FreeRDP-master/winpr/libwinpr/clipboard/posix.c:500:54: error: 'FD_SHOWPROGRESSUI' undeclared (first use in this function)
descriptor->dwFlags = FD_ATTRIBUTES | FD_FILESIZE | FD_SHOWPROGRESSUI;
^~~~~~~~~~~~~~~~~
../../libwinpr/libwinpr2.a(path.c.obj):path.c:(.text+0x2b90): undefined reference to
_invalid_parameter_noinfo' ../../libwinpr/libwinpr2.a(path.c.obj):path.c:(.text+0x2bc0): undefined reference to
_invalid_parameter_noinfo'../../libwinpr/libwinpr2.a(path.c.obj):path.c:(.text+0x2c6a): undefined reference to `wmemmove_s'
+++ /FreeRDP-master/libfreerdp/core/client.h:38:0: warning: "CHANNEL_MAX_COUNT" redefined
#define CHANNEL_MAX_COUNT 31
+++ /FreeRDP-master/client/Windows/wf_cliprdr.c:1333:13: error: conflicting types for 'cliprdr_send_request_filecontents'
static UINT cliprdr_send_request_filecontents(wfClipboard* clipboard,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+++ /FreeRDP-master/client/Windows/wf_client.c:774:12: error: static declaration of 'freerdp_client_set_window_size' follows non-static declaration
static int freerdp_client_set_window_size(wfContext* wfc, int width, int height)
We are new to this project and we don't know how to test it.
We managed to get the building process generate the following executables:
How can we test this project?
Thanks in advance.
The text was updated successfully, but these errors were encountered: