Re: mpich always injects lto flags
On Thu, Aug 6, 2020 at 5:24 PM Jeff Law wrote: > > On Thu, 2020-08-06 at 15:59 -0600, Christoph Junghans wrote: > > On Wed, Aug 5, 2020 at 7:01 PM Christoph Junghans > > wrote: > > > On Wed, Aug 5, 2020 at 2:21 PM Jeff Law wrote: > > > > On Wed, 2020-08-05 at 21:56 +0200, David Schwörer wrote: > > > > > On 8/5/20 8:45 PM, Christoph Junghans wrote: > > > > > > Hi, > > > > > > > > > > > > I am trying to rebuild espresso to adapt to the recent cmake > > > > > > changes, > > > > > > when doing this I hit > > > > > > https://github.com/espressomd/espresso/issues/3396, which prevents > > > > > > us > > > > > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > > > > > which works for the build with openmpi, but gets ignored for the > > > > > > mpich > > > > > > build. > > > > > > > > > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > > > > > and then puts them in > > > > > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > > > > > > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > > > > > reasonable? > > > > > > > > > > > > The flags also contain > > > > > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > > > > > makes it depend on redhat-rpm-config. We had a similar issue in > > > > > > hdf5 a > > > > > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > > > > > > > > > > > Christoph > > > > > > > > > > > Another related bug is: > > > > > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1821728 > > > > Note that the BZ complains about -fstack-clash-protection in LLVM which > > > > has had > > > > various bits landing over the last few months. So that specific issue > > > > I'd expect > > > > to resolve itself over time. The more general issue remains though. > > > https://src.fedoraproject.org/rpms/mpich/pull-request/4 > > > > Can any proven package retrigger > > https://koji.fedoraproject.org/koji/taskinfo?taskID=48824350, the > > tests seem flaky and passed for me here: > > https://koji.fedoraproject.org/koji/taskinfo?taskID=48825280 > Done. ppc64le seems to have tested fine this time. Of course, there's quite > a > back-up on s390x, so it'll be a while before it's done and tagged. Great, thanks! > > jeff > > > -- Christoph Junghans Web: http://www.compphys.de ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Thu, 2020-08-06 at 15:59 -0600, Christoph Junghans wrote: > On Wed, Aug 5, 2020 at 7:01 PM Christoph Junghans wrote: > > On Wed, Aug 5, 2020 at 2:21 PM Jeff Law wrote: > > > On Wed, 2020-08-05 at 21:56 +0200, David Schwörer wrote: > > > > On 8/5/20 8:45 PM, Christoph Junghans wrote: > > > > > Hi, > > > > > > > > > > I am trying to rebuild espresso to adapt to the recent cmake changes, > > > > > when doing this I hit > > > > > https://github.com/espressomd/espresso/issues/3396, which prevents us > > > > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > > > > which works for the build with openmpi, but gets ignored for the mpich > > > > > build. > > > > > > > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > > > > and then puts them in > > > > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > > > > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > > > > reasonable? > > > > > > > > > > The flags also contain > > > > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > > > > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > > > > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > > > > > > > > > Christoph > > > > > > > > > Another related bug is: > > > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1821728 > > > Note that the BZ complains about -fstack-clash-protection in LLVM which > > > has had > > > various bits landing over the last few months. So that specific issue > > > I'd expect > > > to resolve itself over time. The more general issue remains though. > > https://src.fedoraproject.org/rpms/mpich/pull-request/4 > > Can any proven package retrigger > https://koji.fedoraproject.org/koji/taskinfo?taskID=48824350, the > tests seem flaky and passed for me here: > https://koji.fedoraproject.org/koji/taskinfo?taskID=48825280 Done. ppc64le seems to have tested fine this time. Of course, there's quite a back-up on s390x, so it'll be a while before it's done and tagged. jeff ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Wed, Aug 5, 2020 at 7:01 PM Christoph Junghans wrote: > > On Wed, Aug 5, 2020 at 2:21 PM Jeff Law wrote: > > > > On Wed, 2020-08-05 at 21:56 +0200, David Schwörer wrote: > > > On 8/5/20 8:45 PM, Christoph Junghans wrote: > > > > Hi, > > > > > > > > I am trying to rebuild espresso to adapt to the recent cmake changes, > > > > when doing this I hit > > > > https://github.com/espressomd/espresso/issues/3396, which prevents us > > > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > > > which works for the build with openmpi, but gets ignored for the mpich > > > > build. > > > > > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > > > and then puts them in > > > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > > > reasonable? > > > > > > > > The flags also contain > > > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > > > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > > > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > > > > > > > Christoph > > > > > > > Another related bug is: > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1821728 > > Note that the BZ complains about -fstack-clash-protection in LLVM which has > > had > > various bits landing over the last few months. So that specific issue I'd > > expect > > to resolve itself over time. The more general issue remains though. > https://src.fedoraproject.org/rpms/mpich/pull-request/4 Can any proven package retrigger https://koji.fedoraproject.org/koji/taskinfo?taskID=48824350, the tests seem flaky and passed for me here: https://koji.fedoraproject.org/koji/taskinfo?taskID=48825280 Thanks, Christoph > > Christoph > > > > jeff > > > > > ___ > > devel mailing list -- devel@lists.fedoraproject.org > > To unsubscribe send an email to devel-le...@lists.fedoraproject.org > > Fedora Code of Conduct: > > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > > List Archives: > > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org > > > > -- > Christoph Junghans > Web: http://www.compphys.de -- Christoph Junghans Web: http://www.compphys.de ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
* Christoph Junghans: > I am trying to rebuild espresso to adapt to the recent cmake changes, > when doing this I hit > https://github.com/espressomd/espresso/issues/3396, which prevents us > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > which works for the build with openmpi, but gets ignored for the mpich > build. > > I think the problem is that CMake picks up the lto flags from mpicxx > and then puts them in > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > So I think the fix would be to strip these flags from mpicc. Sounds > reasonable? I think this could be an application for the extension_*flags macros in redhat-rpm-config: # Internal-only. Do not use. Expand a variable and strip the flags # not suitable to extension builders. %__extension_strip_flags() %{lua: local name = rpm.expand("%{1}") local value = " " .. rpm.expand("%{build_" .. name .. "}") local result = string.gsub(value, "%s+-specs=[^%s]+", " ") print(result) } # Variants of CFLAGS, CXXFLAGS, FFLAGS, LDFLAGS for use within # extension builders. %extension_cflags %{__extension_strip_flags cflags} %extension_cxxflags %{__extension_strip_flags cxxflags} %extension_fflags %{__extension_strip_flags fflags} %extension_ldflags %{__extension_strip_flags ldflags} These were intended for scenarios where the flags are hard-coded into other tools at build time. It's unfortunately rather difficult to decide what should go into those flags. Ideally, tools like mpicc would use a more dynamic approach to determine the proper flags. Thanks, Florian ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Wed, Aug 5, 2020 at 2:21 PM Jeff Law wrote: > > On Wed, 2020-08-05 at 21:56 +0200, David Schwörer wrote: > > On 8/5/20 8:45 PM, Christoph Junghans wrote: > > > Hi, > > > > > > I am trying to rebuild espresso to adapt to the recent cmake changes, > > > when doing this I hit > > > https://github.com/espressomd/espresso/issues/3396, which prevents us > > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > > which works for the build with openmpi, but gets ignored for the mpich > > > build. > > > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > > and then puts them in > > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > > reasonable? > > > > > > The flags also contain > > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > > > > > Christoph > > > > > Another related bug is: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1821728 > Note that the BZ complains about -fstack-clash-protection in LLVM which has > had > various bits landing over the last few months. So that specific issue I'd > expect > to resolve itself over time. The more general issue remains though. https://src.fedoraproject.org/rpms/mpich/pull-request/4 Christoph > > jeff > > > ___ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org -- Christoph Junghans Web: http://www.compphys.de ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Wed, 2020-08-05 at 21:56 +0200, David Schwörer wrote: > On 8/5/20 8:45 PM, Christoph Junghans wrote: > > Hi, > > > > I am trying to rebuild espresso to adapt to the recent cmake changes, > > when doing this I hit > > https://github.com/espressomd/espresso/issues/3396, which prevents us > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > which works for the build with openmpi, but gets ignored for the mpich > > build. > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > and then puts them in > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > reasonable? > > > > The flags also contain > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > > > Christoph > > > Another related bug is: > > https://bugzilla.redhat.com/show_bug.cgi?id=1821728 Note that the BZ complains about -fstack-clash-protection in LLVM which has had various bits landing over the last few months. So that specific issue I'd expect to resolve itself over time. The more general issue remains though. jeff > ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On 8/5/20 8:45 PM, Christoph Junghans wrote: > Hi, > > I am trying to rebuild espresso to adapt to the recent cmake changes, > when doing this I hit > https://github.com/espressomd/espresso/issues/3396, which prevents us > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > which works for the build with openmpi, but gets ignored for the mpich > build. > > I think the problem is that CMake picks up the lto flags from mpicxx > and then puts them in > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > So I think the fix would be to strip these flags from mpicc. Sounds > reasonable? > > The flags also contain > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > Christoph > Another related bug is: https://bugzilla.redhat.com/show_bug.cgi?id=1821728 mpich should really clean up the flags that it injects - just using the same set as is used to compile mpich is causing several issues. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Wed, Aug 5, 2020 at 9:41 PM Christoph Junghans wrote: > > On Wed, Aug 5, 2020 at 12:54 PM Jeff Law wrote: > > > > On Wed, 2020-08-05 at 12:45 -0600, Christoph Junghans wrote: > > > Hi, > > > > > > I am trying to rebuild espresso to adapt to the recent cmake changes, > > > when doing this I hit > > > https://github.com/espressomd/espresso/issues/3396, which prevents us > > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > > which works for the build with openmpi, but gets ignored for the mpich > > > build. > > > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > > and then puts them in > > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > > reasonable? > > > > > > The flags also contain > > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > > You might try %global (which has global scope) rather than %define (which > > has a > > local scope). Or just strip it away like you've proposed. > %global doesn't help either. I think there have been similar problems with, for example, python and ruby extensions. python / ruby will store the CFLAGS they were built with and use them to build binary extensions, which breaks when they contain e.g. the flags for specs from redhat-rpm-config. The mpich case sounds really similar. You'll probably need to adapt that build environment to drop some flags which don't make sense in the MPI context. Fabio ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Wed, Aug 5, 2020 at 12:54 PM Jeff Law wrote: > > On Wed, 2020-08-05 at 12:45 -0600, Christoph Junghans wrote: > > Hi, > > > > I am trying to rebuild espresso to adapt to the recent cmake changes, > > when doing this I hit > > https://github.com/espressomd/espresso/issues/3396, which prevents us > > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > > which works for the build with openmpi, but gets ignored for the mpich > > build. > > > > I think the problem is that CMake picks up the lto flags from mpicxx > > and then puts them in > > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > > > So I think the fix would be to strip these flags from mpicc. Sounds > > reasonable? > > > > The flags also contain > > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 > You might try %global (which has global scope) rather than %define (which has > a > local scope). Or just strip it away like you've proposed. %global doesn't help either. Christoph > > jeff > > > ___ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org -- Christoph Junghans Web: http://www.compphys.de ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: mpich always injects lto flags
On Wed, 2020-08-05 at 12:45 -0600, Christoph Junghans wrote: > Hi, > > I am trying to rebuild espresso to adapt to the recent cmake changes, > when doing this I hit > https://github.com/espressomd/espresso/issues/3396, which prevents us > from compiling espresso with -lto, so I set _lto_cflags to %{nil}, > which works for the build with openmpi, but gets ignored for the mpich > build. > > I think the problem is that CMake picks up the lto flags from mpicxx > and then puts them in > MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). > > So I think the fix would be to strip these flags from mpicc. Sounds > reasonable? > > The flags also contain > '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively > makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a > while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 You might try %global (which has global scope) rather than %define (which has a local scope). Or just strip it away like you've proposed. jeff > ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
mpich always injects lto flags
Hi, I am trying to rebuild espresso to adapt to the recent cmake changes, when doing this I hit https://github.com/espressomd/espresso/issues/3396, which prevents us from compiling espresso with -lto, so I set _lto_cflags to %{nil}, which works for the build with openmpi, but gets ignored for the mpich build. I think the problem is that CMake picks up the lto flags from mpicxx and then puts them in MPI_CXX_COMPILE_OPTIONS. (Also compare mpicc -show). So I think the fix would be to strip these flags from mpicc. Sounds reasonable? The flags also contain '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', which effectively makes it depend on redhat-rpm-config. We had a similar issue in hdf5 a while back: https://bugzilla.redhat.com/show_bug.cgi?id=1794625 Christoph -- Christoph Junghans Web: http://www.compphys.de ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org