From nobody Sat Jun 18 15:09:41 2022 X-Original-To: toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9A8C783A14E for ; Sat, 18 Jun 2022 15:09:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LQK853GHhz4RqQ for ; Sat, 18 Jun 2022 15:09:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CF4D16C77 for ; Sat, 18 Jun 2022 15:09:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 25IF9ff8095554 for ; Sat, 18 Jun 2022 15:09:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 25IF9fvn095553 for toolchain@FreeBSD.org; Sat, 18 Jun 2022 15:09:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 264730] clang++ -fmodules fails when using stdout from cstdio: error: declaration of '__stdoutp' must be imported from module 'std.iosfwd' before it is required Date: Sat, 18 Jun 2022 15:09:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mgorny@gentoo.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655564981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=efeRZPC80pi7LrYE2tkZlDSXlWDsoRw09FTadGsPOxg=; b=emtx59cW43QOAPlt3AwrWflWVgtp6WjjyGnsC+rzGfVDxwFG03gdY+zl/14XUbEUcww+HT cWyxMQyzOWNz6KfWoSZZMB0lEudNBZ7nhaGk2UbwOr87AwsZu2jg0jk+gOuAKz1B0FW138 A2tVM6k573B86qH9dLs5qEAbxrK6L3Jyo1EdJzeslkvc3cDff59xtc8aZ4SCyG3YBZSVnF F0g+icxM35ZPKM07jCqQhSYfCM49t93kUqSwlRYHhLfYc/sKm5C6ttgkAB9xwBrnVNY6zB bgcKUIhgtjZD0Dd3pecsMINreea7f6icvGDvTvaI/CtCP2BDVRAOpBGdLosF/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655564981; a=rsa-sha256; cv=none; b=HZdDh1Nb6CqcXCp9n86idmuTV7JlXNvJ+deK5A9/MmCJ9lO0FOBlflvUieP2Advu2d1Dy1 iBjuU43P3yTeC9P1ZKBcnnc30K1FOWXXw9OaQytN2K6DVT3DjAuuO+y8zQmjyJvtMMjAja r5SvyCSJco5WteVSQiqjmGM+TIJ6BX5Ku16q1mqm/obzqQYAGvlx9lfzN+gfolB5RKcY62 zeVcxDzcpaAr/+d5foh3licdPUepKKSbMPEAyArxp+k07qGx1hvNf9GWbQUBV35uQahkr9 gyolsQBl1iygsqoBkM0gZCQrVubK5aY06n9iiQScuYjiQ/YqPdlEF1exiC9iJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264730 --- Comment #3 from Micha=C5=82 G=C3=B3rny --- Well, it wasn't my choice, really ;-). Apparently use of gmodules was enab= led in LLDB's test suite on FreeBSD when the relevant tests were added =E2=80= =94 i.e. in 2016. Unless I'm missing something, we've been doing some testing with them since then. I'm guessing there were some recent changes to clang or libc++ that made them more strict. Ah, sorry, I don't think the 'wchar.h' part is actually the problem =E2=80= =94 I think it just blames the wrong header. The underlying problem is that the stdout/stderr/stdin macros aren't visible from . I know very little about modules myself but FWICS the purpose here is to av= oid relying on indirect includes. I think textual header breaks that, i.e. the following test program should fail: ``` #include int main() { FILE *f; } ``` With the original header variant, it fails as expected (just blames the wro= ng header): ``` $ clang++ -fmodules test.cxx=20 test.cxx:4:3: error: missing '#include '; 'FILE' must be declared before it is used FILE *f; ^ /usr/include/wchar.h:109:24: note: declaration here is not visible typedef struct __sFILE FILE; ^ 1 error generated. ``` Changing `header` to `textual header` makes it build, so I think that goes against the intent. I suppose there must be a better way of solving stdout/stderr/stdin problem. --=20 You are receiving this mail because: You are the assignee for the bug.=