Bug 273731

Summary: net/freerdp: 2.11.1 fails to build at least on stable/14, amd64
Product: Ports & Packages Reporter: Tomoaki AOKI <junchoon>
Component: Individual Port(s)Assignee: Vladimir Druzenko <vvd>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (vvd)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
net/freerdp/files/patch-client_Wayland_wlfreerdp.c none

Description Tomoaki AOKI 2023-09-11 22:47:21 UTC
net/freerdp 2.11.1 fails to build as follows on stable/14, amd64.
Built with poudriere.

     (snip)

[ 95% 472/482] /usr/bin/cc -DBUILD_FULLSCREEN_SHELL -DBUILD_IVI -DENABLE_XKBCOMMON -DFREERDP_EXPORTS -DHAVE_CONFIG_H -DWINPR_EXPORTS -DWITH_OPENSSL -D_FILE_OFFS
ET_BITS=64 -Duwac_EXPORTS -I/wrkdirs/usr/ports/net/freerdp/work/.build -I/wrkdirs/usr/ports/net/freerdp/work/.build/include -I/wrkdirs/usr/ports/net/freerdp/wor
k/freerdp-2.11.1/include -I/wrkdirs/usr/ports/net/freerdp/work/freerdp-2.11.1/winpr/include -I/wrkdirs/usr/ports/net/freerdp/work/.build/winpr/include -I/wrkdir
s/usr/ports/net/freerdp/work/freerdp-2.11.1/rdtk/include -I/wrkdirs/usr/ports/net/freerdp/work/.build/rdtk/include -I/usr/local/include/libepoll-shim -I/wrkdirs
/usr/ports/net/freerdp/work/freerdp-2.11.1/uwac/include -I/wrkdirs/usr/ports/net/freerdp/work/.build/uwac/include -I/wrkdirs/usr/ports/net/freerdp/work/.build/u
wac/libuwac -O2 -pipe -march=haswell  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-macros -Wno-pa
dded -Wno-c11-extensions -Wno-gnu -Wno-unused-command-line-argument -Wno-deprecated-declarations -fno-omit-frame-pointer -DWINPR_DLL -O2 -pipe -march=haswell  -
fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -fPIC -MD -MT uwac/libuwac/CMakeFiles/uwac.dir/keyboard-shortcuts-inhibit-uns
table-v1-protocol.c.o -MF uwac/libuwac/CMakeFiles/uwac.dir/keyboard-shortcuts-inhibit-unstable-v1-protocol.c.o.d -o uwac/libuwac/CMakeFiles/uwac.dir/keyboard-sh
ortcuts-inhibit-unstable-v1-protocol.c.o -c /wrkdirs/usr/ports/net/freerdp/work/.build/uwac/libuwac/keyboard-shortcuts-inhibit-unstable-v1-protocol.c
samu: job failed with status 1: /usr/bin/cc -DFREERDP_EXPORTS -DHAVE_CONFIG_H -DWINPR_EXPORTS -DWITH_OPENSSL -D_FILE_OFFSET_BITS=64 -I/wrkdirs/usr/ports/net/fre
erdp/work/.build -I/wrkdirs/usr/ports/net/freerdp/work/.build/include -I/wrkdirs/usr/ports/net/freerdp/work/freerdp-2.11.1/include -I/wrkdirs/usr/ports/net/free
rdp/work/freerdp-2.11.1/winpr/include -I/wrkdirs/usr/ports/net/freerdp/work/.build/winpr/include -I/wrkdirs/usr/ports/net/freerdp/work/freerdp-2.11.1/rdtk/inclu
de -I/wrkdirs/usr/ports/net/freerdp/work/.build/rdtk/include -I/wrkdirs/usr/ports/net/freerdp/work/freerdp-2.11.1/uwac/include -O2 -pipe -march=haswell  -fstack
-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-unused
-command-line-argument -Wno-deprecated-declarations -fno-omit-frame-pointer -DWINPR_DLL -O2 -pipe -march=haswell  -fstack-protector-strong -isystem /usr/local/i
nclude -fno-strict-aliasing  -DNDEBUG -fPIE -MD -MT client/Wayland/CMakeFiles/wlfreerdp.dir/wlfreerdp.c.o -MF client/Wayland/CMakeFiles/wlfreerdp.dir/wlfreerdp.
c.o.d -o client/Wayland/CMakeFiles/wlfreerdp.dir/wlfreerdp.c.o -c /wrkdirs/usr/ports/net/freerdp/work/freerdp-2.11.1/client/Wayland/wlfreerdp.c
/wrkdirs/usr/ports/net/freerdp/work/freerdp-2.11.1/client/Wayland/wlfreerdp.c:637:19: error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' (a
ka 'void *(*)(void *)') from 'void *(const void *)' [-Wincompatible-function-pointer-types]
        obj->fnObjectNew = uwac_event_clone;
                         ^ ~~~~~~~~~~~~~~~~
1 error generated.

     (snip)

4 warnings generated.
samu: subcommand failed
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/net/freerdp
=>> Cleaning up wrkdir
===>  Cleaning for freerdp-2.11.1
build of net/freerdp | freerdp-2.11.1 ended at Tue Sep 12 06:42:52 JST 2023
build time: 00:01:17
!!! build failure encountered !!!
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2023-09-11 23:29:06 UTC
Look like upstream bug.

Build fine in poudriere on 12.4, 13.2 amd64 and i386.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2023-09-12 00:21:45 UTC
Created attachment 244784 [details]
net/freerdp/files/patch-client_Wayland_wlfreerdp.c

There is the pull request: https://github.com/FreeRDP/FreeRDP/pull/9373

Can you test this patch: net/freerdp/files/patch-client_Wayland_wlfreerdp.c ?
Comment 4 Tomoaki AOKI 2023-09-12 10:00:55 UTC
(In reply to Vladimir Druzenko from comment #3)

confirmed fixed. Thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-09-12 11:38:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6ac8b77340eee1d5fdf24a282a9063dd3f9ac11

commit a6ac8b77340eee1d5fdf24a282a9063dd3f9ac11
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-09-12 11:31:20 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-09-12 11:31:20 +0000

    net/freerdp: error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' on 14+

    clang 16+ (maybe 15 too) build error:
    /usr/ports/net/freerdp/work/freerdp-2.11.1/client/Wayland/wlfreerdp.c:637:19: error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' (aka 'void *(*)(void *)') from 'void *(const void *)' [-Wincompatible-function-pointer-types]
            obj->fnObjectNew = uwac_event_clone;
                             ^ ~~~~~~~~~~~~~~~~

    PR:             273731
    Approved by:    arrowd (mentor, implicit)
    Obtained from:  https://github.com/FreeRDP/FreeRDP/pull/9373

 net/freerdp/files/patch-client_Wayland_wlfreerdp.c (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2023-09-12 11:41:36 UTC
Thanks!