Skip to content
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

Compilation failures with recent freerdp-3 #935

Open
hlein opened this issue Feb 27, 2024 · 2 comments
Open

Compilation failures with recent freerdp-3 #935

hlein opened this issue Feb 27, 2024 · 2 comments

Comments

@hlein
Copy link
Contributor

hlein commented Feb 27, 2024

IMPORTANT
This is just for reporting BUGS not help on how to hack, how to use hydra, command line options or how to get it compiled. Please search for help via search engines. Issues asking for this here will be closed.

Describe the bug

hydra-9.5 cannot compile against recent freerdp-3.x, such as freerdp-3.2.0

Since #538 claimed to add support for freerdp-3 I tried going back to 3.0.0, still fails. But the rest of the following details are against 3.2.0.

Compilation fails with many errors like:

x86_64-pc-linux-gnu-gcc -march=znver2 -O2 -pipe -msse4.1 -msse4.2 -msse4 -mavx -I. -march=znver2 -O2 -pipe -msse4.1 -msse4.2 -msse4 -mavx -fcommon -pie -fPIE -fstack-protector-all --param ssp-buffer-size=4 -Wl,-z,now -Wl,-z,relro -Wl,--allow-multiple-definition -march=znver2 -O2 -pipe -msse4.1 -msse4.2 -msse4 -mavx -D_GNU_SOURCE -c hydra-time.c -DHAVE_MYSQL_MYSQL_H -DLIBOPENSSL  -DHAVE_PCRE -DLIBMYSQLCLIENT -DLIBPOSTGRES -DLIBSVN -DHAVE_ZLIB  -DLIBMCACHED -DLIBMONGODB -DLIBBSON -DLIBFREERDP -DLIBWINPR3 -DLIBSMBCLIENT -DHAVE_MATH_H -DHAVE_SYS_PARAM_H -I/usr/include/mysql -I/usr/include -I/usr/include -I/usr/include/postgresql -I/usr/include -I/usr/include/subversion-1 -I/usr/include/apr-1 -I/usr/include/subversion-1 -I/usr/include/libmemcached -I/usr/include/libmongoc-1.0 -I/usr/include/libbson-1.0 -I/usr/include/freerdp3 -I/usr/include/winpr3 -I/usr/include/samba-4.0
hydra-rdp.c: In function ‘rdp_connect’:
hydra-rdp.c:23:11: error: ‘freerdp’ {aka ‘struct rdp_freerdp’} has no member named ‘settings’
   23 |   instance->settings->Username = login;
      |           ^~
hydra-rdp.c:24:11: error: ‘freerdp’ {aka ‘struct rdp_freerdp’} has no member named ‘settings’
   24 |   instance->settings->Password = password;
      |           ^~
hydra-rdp.c:25:11: error: ‘freerdp’ {aka ‘struct rdp_freerdp’} has no member named ‘settings’
   25 |   instance->settings->IgnoreCertificate = TRUE;
      |           ^~
hydra-rdp.c:27:13: error: ‘freerdp’ {aka ‘struct rdp_freerdp’} has no member named ‘settings’
   27 |     instance->settings->AuthenticationOnly = FALSE;
      |             ^~
hydra-rdp.c:29:13: error: ‘freerdp’ {aka ‘struct rdp_freerdp’} has no member named ‘settings’
   29 |     instance->settings->AuthenticationOnly = TRUE;
      |             ^~
hydra-rdp.c:30:11: error: ‘freerdp’ {aka ‘struct rdp_freerdp’} has no member named ‘settings’
   30 |   instance->settings->ServerHostname = server;
      |           ^~

There is a WITH_FREERDP_DEPRECATED you can define to enable some measure of backwards compatibility. Doing so handles the settings errors but then there's still more failures like:

/usr/include/winpr3/winpr/winpr.h:68:41: note: in definition of macro ‘WINPR_DEPRECATED_VAR’
   68 | #define WINPR_DEPRECATED_VAR(text, obj) obj __attribute__((deprecated(text)))
      |                                         ^~~
hydra-rdp.c:34:21: error: ‘rdpSettings’ {aka ‘struct rdp_settings’} has no member named ‘MaxTimeInCheckLoop’
   34 |   instance->settings->MaxTimeInCheckLoop = 100;
      |                     ^~

And indeed MaxTimeInCheckLoop has been removed entirely here: FreeRDP/FreeRDP@5f81005

Various other projects have simply sworn off the freerdp-3 branch until they stabilize their ABI, which seems sensible.

To Reproduce

  • Ensure that you have tested the bug to be present in the current github code. You might be using an outdated version that comes with your Linux distribution!
  • You must provide full command line options.

Steps to reproduce the behavior:

  1. install freerdp-3.0+
  2. attempt to compile hydra-9.5.0

Expected behavior
Build should succeed, and the resulting hydra rdp://... should complete successfully

Screenshots
If applicable, add screenshots to help explain your problem.
Note that all messages must be in English, not in Chinese, Russian, etc.

Desktop (please complete the following information):

  • Gentoo Linux
  • hydra-9.5.0

Additional context
Add any other context about the problem here.

@vanhauser-thc
Copy link
Owner

so what do you recommend - not support libfreerdp3 (do not look for it), or add support?

@hlein
Copy link
Contributor Author

hlein commented Mar 11, 2024

I think just don't support it for now.

I first tried to figure out how to add support for current libfreerdp3; could not find a porting guide so I went looking at other projects to see what they did. Well... what they did was not support it :/

If someone wants to come up with patches that restore support that would be great (until/unless they change their API yet again).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants