Bug 296473 - devel/qt6-base: does not compile on recent CURRENT (1600019)
Summary: devel/qt6-base: does not compile on recent CURRENT (1600019)
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-02 23:22 UTC by florian.millet
Modified: 2026-07-08 08:32 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments
Full poudriere log for qt6-base compile failure (444.38 KB, text/plain)
2026-07-02 23:22 UTC, florian.millet
no flags Details
Patch for src/3rdparty/forkfd/forkfd.c ensuring atomic or stdatomic.h gets included in the end, depending on the language selected (373 bytes, patch)
2026-07-07 10:46 UTC, Trond Endrestøl
no flags Details | Diff
Patch for src/3rdparty/forkfd/forkfd_c11.h trying to ensure ATOMIC_VAR_INIT is defined in the same way I could find in the standard header files on 16.0-CURRENT. (488 bytes, patch)
2026-07-07 13:32 UTC, Trond Endrestøl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description florian.millet 2026-07-02 23:22:05 UTC
Created attachment 272413 [details]
Full poudriere log for qt6-base compile failure

Hello everyone,

on a recent FreeBSD 16 CURRENT (version 1600019) qt6-base doers not compile with poudriere.
The part of the log that is interesting :

In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/forkfd_qt.c:16:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd.c:162:39: warning: call to undeclared function 'ATOMIC_VAR_INIT'; ISO C99 and later do not
support implicit function declarations [-Wimplicit-function-declaration]
  162 | static ffd_atomic_int forkfd_status = FFD_ATOMIC_INIT(0);
      |                                       ^
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_c11.h:54:37: note: expanded from macro 'FFD_ATOMIC_INIT'
   54 | #define FFD_ATOMIC_INIT(val)        ATOMIC_VAR_INIT(val)
      |                                     ^
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/forkfd_qt.c:16:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd.c:162:39: error: initializer element is not a compile-time constant
  162 | static ffd_atomic_int forkfd_status = FFD_ATOMIC_INIT(0);
      |                                       ^~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_c11.h:54:37: note: expanded from macro 'FFD_ATOMIC_INIT'
   54 | #define FFD_ATOMIC_INIT(val)        ATOMIC_VAR_INIT(val)
      |                                     ^~~~~~~~~~~~~~~~~~~~
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/forkfd_qt.c:16:
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd.c:930:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_freebsd.c:45:45: error: initializer element is not a compile-time constant
   45 | static ffd_atomic_int system_forkfd_state = FFD_ATOMIC_INIT(1);
      |                                             ^~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_c11.h:54:37: note: expanded from macro 'FFD_ATOMIC_INIT'
   54 | #define FFD_ATOMIC_INIT(val)        ATOMIC_VAR_INIT(val)
      |                                     ^~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.

unfortunately it block a lot of ports from building (mainly for KDE). This file does not seem to have changed upstream so it would seem a change on the FreeBSD side poses this problem, maybe linked to clang/llvm ?
Comment 2 Trond Endrestøl 2026-07-07 10:46:37 UTC
Created attachment 272569 [details]
Patch for src/3rdparty/forkfd/forkfd.c ensuring atomic or stdatomic.h gets included in the end, depending on the language selected

This is a crude and brute-force patch, but devel/qt6-base finally builds on a test system at work, FreeBSD 16.0-CURRENT #1345 main+local-n246954-cf07ca11e99b: Fri Jul  3 14:54:02 CEST 2026.
Comment 3 Trond Endrestøl 2026-07-07 12:08:26 UTC
(In reply to Trond Endrestøl from comment #2)
Maybe my patch isn't needed at all. I tried building devel/qt6-base on the same system as mentioned in the previous comment without my patch being accessible, and the build succeeded. If the build still fails on 16.0-CURRENT, then maybe update your live system and possibly the jail/snapshot used by Poudriere and Synth.

qt6-base is configured as follows:

$ make -C /usr/ports/devel/qt6-base showconfig

===> The following configuration options are available for qt6-base-6.11.1:
     CUPS=on: CUPS printing system support
     WAYLAND=on: Wayland (graphics) support
     X11=on: X11 (graphics) support
===> Use 'make config' to modify these settings
Comment 4 florian.millet 2026-07-07 13:01:09 UTC
unfortunately even with your patch it still does not build with a FreeBSD 16.0-CURRENT at revision main-n286766-c27779e0a954

I still have :
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/forkfd_qt.c:16:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd.c:170:39: warning: call to undeclared function 'ATOMIC_VAR_INIT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  170 | static ffd_atomic_int forkfd_status = FFD_ATOMIC_INIT(0);
      |                                       ^
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_c11.h:54:37: note: expanded from macro 'FFD_ATOMIC_INIT'
   54 | #define FFD_ATOMIC_INIT(val)        ATOMIC_VAR_INIT(val)
      |                                     ^
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/forkfd_qt.c:16:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd.c:170:39: error: initializer element is not a compile-time constant
  170 | static ffd_atomic_int forkfd_status = FFD_ATOMIC_INIT(0);
      |                                       ^~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_c11.h:54:37: note: expanded from macro 'FFD_ATOMIC_INIT'
   54 | #define FFD_ATOMIC_INIT(val)        ATOMIC_VAR_INIT(val)
      |                                     ^~~~~~~~~~~~~~~~~~~~
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/forkfd_qt.c:16:
In file included from /wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd.c:938:
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_freebsd.c:45:45: error: initializer element is not a compile-time constant
   45 | static ffd_atomic_int system_forkfd_state = FFD_ATOMIC_INIT(1);
      |                                             ^~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/qt6-base/work/qtbase-everywhere-src-6.11.1/src/corelib/io/../../3rdparty/forkfd/forkfd_c11.h:54:37: note: expanded from macro 'FFD_ATOMIC_INIT'
   54 | #define FFD_ATOMIC_INIT(val)        ATOMIC_VAR_INIT(val)
      |                                     ^~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
Comment 5 Trond Endrestøl 2026-07-07 13:32:41 UTC
Created attachment 272572 [details]
Patch for src/3rdparty/forkfd/forkfd_c11.h trying to ensure ATOMIC_VAR_INIT is defined in the same way I could find in the standard header files on 16.0-CURRENT.

Each bug seems to involve src/3rdparty/forkfd/forkfd_c11.h, so why not brute-force our way there.
Comment 6 florian.millet 2026-07-08 08:32:43 UTC
I managed to compile with your second patch, thank you.