Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 927731

Summary: net-misc/freerdp-2.11.6 fails to compile: info.c:88:39: error: initialization of const WCHAR {aka const short unsigned int } from incompatible pointer type BYTE {aka unsigned char } [-Wincompatible-pointer-types]
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Mike Gilbert <floppym>
Status: CONFIRMED ---    
Severity: normal CC: chris, flaviocamilo, gordon.parton, julien.dlq, jy6x2b32pie9, marduk
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/FreeRDP/FreeRDP/issues/10177
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 921252    
Bug Blocks: 870412    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2024-03-24 17:03:04 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-misc/freerdp-2.11.5-r2 fails to compile.
Discovered on: x86 (internal ref: tinderbox_x86)
System: GCC-14-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#GCC-14)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0003
Comment 1 Agostino Sarubbo gentoo-dev 2024-03-24 17:03:06 UTC
Created attachment 888453 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-03-24 17:03:07 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


--   Package 'libavresample', required by 'virtual:world', not found
FAILED: libfreerdp/CMakeFiles/freerdp.dir/core/info.c.o 
/var/tmp/portage/net-misc/freerdp-2.11.5-r2/work/freerdp-2.11.5/libfreerdp/core/info.c:88:39: error: initialization of ‘const WCHAR *’ {aka ‘const short unsigned int *’} from incompatible pointer type ‘BYTE *’ {aka ‘unsigned char *’} [-Wincompatible-pointer-types]
Comment 3 NHO 2024-05-10 07:58:02 UTC
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c: In function ‘MultiByteToWideChar’:
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:218:63: error: passing argument 3 of ‘ucnv_convert’ from incompatible pointer type [-Wincompatible-pointer-types]
  218 |                             ucnv_convert("UTF-16LE", "UTF-8", targetStart, targetCapacity * sizeof(WCHAR),
      |                                                               ^~~~~~~~~~~
      |                                                               |
      |                                                               LPWSTR {aka short unsigned int *}
In file included from /var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:34:
/usr/include/unicode/ucnv.h:1581:20: note: expected ‘char *’ but argument is of type ‘LPWSTR’ {aka ‘short unsigned int *’}
 1581 |              char *target,
      |              ~~~~~~^~~~~~
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c: In function ‘WideCharToMultiByte’:
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:356:83: error: passing argument 5 of ‘ucnv_convert’ from incompatible pointer type [-Wincompatible-pointer-types]
  356 |                         targetLength = ucnv_convert("UTF-8", "UTF-16LE", NULL, 0, lpWideCharStr,
      |                                                                                   ^~~~~~~~~~~~~
      |                                                                                   |
      |                                                                                   LPCWSTR {aka const short unsigned int *}
/usr/include/unicode/ucnv.h:1583:26: note: expected ‘const char *’ but argument is of type ‘LPCWSTR’ {aka ‘const short unsigned int *’}
 1583 |              const char *source,
      |              ~~~~~~~~~~~~^~~~~~
/var/tmp/portage/net-misc/freerdp-2.11.6/work/freerdp-2.11.6/winpr/libwinpr/crt/unicode.c:363:53: error: passing argument 5 of ‘ucnv_convert’ from incompatible pointer type [-Wincompatible-pointer-types]
  363 |                                                     lpWideCharStr, cchWideChar * sizeof(WCHAR), &error);
      |                                                     ^~~~~~~~~~~~~
      |                                                     |
      |                                                     LPCWSTR {aka const short unsigned int *}
/usr/include/unicode/ucnv.h:1583:26: note: expected ‘const char *’ but argument is of type ‘LPCWSTR’ {aka ‘const short unsigned int *’}
 1583 |              const char *source,
      |              ~~~~~~~~~~~~^~~~~~
Comment 4 NHO 2024-05-10 07:58:15 UTC
That's with 2.11.6
Comment 5 NHO 2024-05-10 08:07:29 UTC
upstream bug https://github.com/FreeRDP/FreeRDP/issues/10177
Comment 6 Agostino Sarubbo gentoo-dev 2024-05-16 06:57:23 UTC
gcc14_tinderbox has reproduced this issue with version 2.11.6 - Updating summary.
Comment 7 Mike Gilbert gentoo-dev 2024-05-21 18:55:54 UTC
*** Bug 932383 has been marked as a duplicate of this bug. ***
Comment 8 Mike Gilbert gentoo-dev 2024-05-21 19:25:31 UTC
*** Bug 932384 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2024-05-22 02:17:02 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60fc3847889e2aec2dad46dfe47f078a294c3ed8

commit 60fc3847889e2aec2dad46dfe47f078a294c3ed8
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-05-22 02:15:15 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-05-22 02:15:15 +0000

    net-misc/freerdp: add -Wno-error=incompatible-pointer-types to CFLAGS
    
    Bug: https://bugs.gentoo.org/927731
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 net-misc/freerdp/freerdp-2.11.7.ebuild | 3 +++
 net-misc/freerdp/freerdp-2.9999.ebuild | 3 +++
 2 files changed, 6 insertions(+)