From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 0501A3858D39 for ; Wed, 8 Feb 2023 10:35:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0501A3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x634.google.com with SMTP id ud5so50121818ejc.4 for ; Wed, 08 Feb 2023 02:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UwxdaBOyZL/tZcwQpJ/zAWldDk/T+1HEvXUarLkRQ9I=; b=mp5AszkGCIwgzLfjHlk7fx9kPH13yffLageoktFQIhFEq03jaVGZkTrDVV3gNgPipr Ne5TEWFK+6NfQ6as7whb/1jEV+T9AXxIrFrKKjXwWzc1lRUKW8VgiX+epjXmqlLQd+3+ mAAR/5A4Eh2V3iGBBYn38y29hsghN1xIczRKBy5Adsy0TxwiIMd73Onx4VZlMsCIHvln Cp3EP3yN6M/Jo+YOVKSTGlNlWfUaeJB8AZhHpWmDdj4A3KM9KY7cMnV9imS3bZcFrxum f9r8oHfay9RNyiswWHYSi6xwcNB1U7GQBf38XGufNaHTweQTDYKlX1VU2rhln1bEgSuA DPuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UwxdaBOyZL/tZcwQpJ/zAWldDk/T+1HEvXUarLkRQ9I=; b=grnXVcOh7qiywgxIuLVz7xmtvMRrCEGjyGofu/c+NQOJotLNmyNs1ARRHZ9pPpKITb 8QpcvqFgVt2lJloFZMf3KKmfZ54rWsZfZ1B0NOQlB6jbAjtw7B0FNz8VdCA8A9JAIJgi zAgeUpMVm9ghChnM+2LyIGn9+8UYiBCPTvfjkPs9AocZQaW38t4pafyPIsL/aJZHckRM zJIOl0NuEBYFwdo6rMN88TU6kDX58tOlL7pSAzs+BqI6tarGyEBL0SRdsnsuhr9kBv/R supFRYJpaf8ym+p20AG689W88SIO4FxzYPJt1ggPr5Li24sW6/q5z5HKLFWY6LZTzAq3 GGQg== X-Gm-Message-State: AO0yUKXUi3lIcIOZhhT7s1u2VhccPnBQkTTLyo7Q+LY3fmUwsMy5PXHN 4GBqtvrW3otyDPuTl9hEapLZgcit6keFX1xn8b8= X-Google-Smtp-Source: AK7set/o1f5Or/IBcNScKyIDkc+CNtCQmkDjOo1s8FcQEPCDtTjKyPOSlyeaOuTrRpOa0wrECVqKM3ZPIPvEl9OTpiI= X-Received: by 2002:a17:906:90c1:b0:88f:9c9a:828 with SMTP id v1-20020a17090690c100b0088f9c9a0828mr1481580ejw.190.1675852518745; Wed, 08 Feb 2023 02:35:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 8 Feb 2023 10:35:07 +0000 Message-ID: Subject: Re: Errors when trying to use C++ modules with cmake and GCC To: HHN Cc: gcc-help Content-Type: multipart/alternative; boundary="0000000000001368fe05f42dd2ec" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000001368fe05f42dd2ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 8 Feb 2023, 09:49 HHN, wrote: > The patches suggested have worked to generate modules, there must have > been some error on my end when i tried previously. But unfortunately when= I > try to compile HPX with these patches I face a couple of errors. > That's a warning, not an error. Any help would be appreciated. I have tried to do a diff between the > successful compile logs (G++-11) and the patches suggested and attached t= he > file. grep for "/home/hhn/makes/gcc-modules-install/" might help focus on > the warnings more easily. > > Just to summarise the warnings are mostly > 1. > /home/hhn/makes/gcc-modules-install/usr/local/include/c++/13.0.0/atomic:2= 87:22: > warning: =E2=80=98unsigned int __atomic_load_4(const volatile void*, int)= =E2=80=99 writing > 4 bytes into a region of size 0 overflows the destination > [-Wstringop-overflow=3D] > 287 | __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); > > 2. > /home/hhn/makes/gcc-modules-install/usr/local/include/c++/13.0.0/bits/new= _allocator.h:165:33: > note: call to =E2=80=98void operator delete(void*, std::size_t)=E2=80=99 = here > 165 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n)= ); > > On Wed, Feb 1, 2023 at 4:31 PM Jonathan Wakely > wrote: > >> On Wed, 1 Feb 2023 at 10:53, HHN via Gcc-help >> wrote: >> > >> > I have been working on upgrading the HPX build system to support C++ >> > modules, while trying to experiment with GCC support for C++ modules, I >> > keep running into this issue of unrecognized command-line options. >> > >> > ` >> > g++: error: unrecognized command-line option >> > =E2=80=98-fdep-file=3DCMakeFiles/std_module_example.dir/t3.cxx.o.ddi= =E2=80=99 >> > g++: error: unrecognized command-line option >> > =E2=80=98-fdep-output=3DCMakeFiles/std_module_example.dir/t3.cxx.o=E2= =80=99 >> > g++: error: unrecognized command-line option =E2=80=98-fdep-format=3Dt= rtbd=E2=80=99 >> >> [...] >> >> > I have tried this with g++ 11.3, g++ 12.1 installed using ubuntu packa= ge >> > managers, >> >> As you were told in the cmake forum by Ben B., the patches to add >> -fdep-file etc. are not yet in GCC, so of course it doesn't work with >> releases from more than a year ago. >> >> > I have also tried the same using this certain patch >> > as suggested by the >> user on >> > an online forum >> > . >> >> That user is the person who wrote the patch to add -fdep-file, so you >> should listen to them. If it still doesn't work with that patch, then >> you probably didn't apply the patch correctly. >> >> > I have also tried the same using the master >> > and devel/c++-modules >> > branch on >> gcc >> > repo. >> >> Obviously it's not going to work with those branches, because the >> patches to add -fdep-file support are not part of GCC yet, as Ben B. >> already told you. >> >> > All of them have given the same errors. Also the devel/c++-modules >> branch >> > compiles to g++ version of g++ (GCC) 11.0.0 20210203 (experimental) >> > [c++-modules revision 20230201-1505], while the master branch has >> > version g++ (GCC) 13.0.1 20230201 (experimental). >> >> Don't use the devel/c++-modules branch. It was used two+ years ago for >> the initial work on modules, but the master branch now has all that >> work and numerous improvements. >> > > > -- > Hari Hara Naveen > --0000000000001368fe05f42dd2ec--