Bug 284488 - emulators/wine-proton: Fails to build with GCC 14: error: assignment to 'caddr_t' {aka 'char *'} from 'INT_PTR' {aka 'long int'} makes pointer from integer without a cast [-Wint-conversion]
Summary: emulators/wine-proton: Fails to build with GCC 14: error: assignment to 'cadd...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Lorenzo Salvadore
URL: https://pkg-status.freebsd.org/gohan0...
Keywords:
Depends on:
Blocks: 281091
  Show dependency treegraph
 
Reported: 2025-01-31 14:51 UTC by Lorenzo Salvadore
Modified: 2025-02-06 13:23 UTC (History)
2 users (show)

See Also:
iwtcex: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2025-01-31 14:51:27 UTC
The port fails to build with GCC 14, which is about to become GCC_DEFAULT version. This link can help: https://gcc.gnu.org/gcc-14/porting_to.html

Please note that a workaround has already been suggested in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281091#c16 .

dlls/ntdll/unix/virtual.c: In function 'r_debug_add_module':
dlls/ntdll/unix/virtual.c:161:32: error: assignment to 'caddr_t' {aka 'char *'} from 'INT_PTR' {aka 'long int'} makes pointer from integer without a cast [-Wint-conversion]
  161 |     if (ptr) entry->map.l_addr = offset;
      |                                ^
dlls/ntdll/unix/virtual.c:165:27: error: assignment to 'caddr_t' {aka 'char *'} from 'INT_PTR' {aka 'long int'} makes pointer from integer without a cast [-Wint-conversion]
  165 |         entry->map.l_addr = offset;
      |                           ^
Comment 1 Alex S 2025-01-31 16:14:57 UTC
Feel free to apply the aforementioned workaround. (Wine's code isn't exactly clean anyway.)
Comment 2 Alex S 2025-01-31 16:18:19 UTC
(Sorry about those stupid maintainer feedback flags.)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-02-06 13:12:16 UTC
A commit in branch main references this bug:

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

commit 84c1cefbbf7cbe6e08f0c570e2ce88d6aee09cfc
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-02-06 10:26:50 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-02-06 13:11:07 +0000

    emulators/wine-proton: Fix build with GCC 14

    Disable warnings about incompatible integer to pointer and pointer to
    integer conversions, which are treated as errors.
    This is a lighter version of adding the -fpermissive flag, which has
    been used to fix other ports failing build with GCC 14.

    PR:             284488
    Approved by:    maintainer (Alex S <iwtcex@gmail.com>)

 emulators/wine-proton/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)