You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of the PMIx Reference Library are you using?
5.0.2
Describe how PMIx was installed
Built from source using Gentoo's distribution package manager.
Details of the problem
I tried to build with the following *FLAGS to optimize the build: -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Note the -Werror=* flags are used to help detect cases where the compiler tries to optimize by assuming UB cannot exist in the source code -- if it does exist, ordinarily the code would be miscompiled, and this says to make the miscompilation a fatal error.
I got this error:
/bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -DNDEBUG -pipe -march=native -fstack-protector-all -O2 -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -finline-functions -fvisibility=hidden -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror -version-info 15:2:13 -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 -o libpmix.la -rpath /usr/lib64 threads/mutex.lo threads/thread.lo event/pmix_event_notification.lo event/pmix_event_registration.lo hwloc/pmix_hwloc.lo hwloc/pmix_hwloc_datatype.lo client/pmix_client.lo client/pmix_client_fence.lo client/pmix_client_get.lo client/pmix_client_pub.lo client/pmix_client_spawn.lo client/pmix_client_connect.lo client/pmix_client_group.lo client/pmix_client_fabric.lo client/pmix_client_topology.lo client/pmix_client_convert.lo server/pmix_server.lo server/pmix_server_ops.lo server/pmix_server_get.lo runtime/pmix_finalize.lo runtime/pmix_init.lo runtime/pmix_params.lo runtime/pmix_progress_threads.lo tool/pmix_tool.lo tool/pmix_tool_ops.lo common/pmix_query.lo common/pmix_strings.lo common/pmix_log.lo common/pmix_control.lo common/pmix_data.lo common/pmix_security.lo common/pmix_iof.lo common/pmix_attributes.lo mca/base/libpmix_mca_base.la class/libpmix_class.la util/libpmix_util.la mca/bfrops/libmca_bfrops.la mca/bfrops/v41/libpmix_mca_bfrops_v41.la mca/bfrops/v4/libpmix_mca_bfrops_v4.la mca/bfrops/v3/libpmix_mca_bfrops_v3.la mca/bfrops/v21/libpmix_mca_bfrops_v21.la mca/bfrops/v20/libpmix_mca_bfrops_v20.la mca/bfrops/v12/libpmix_mca_bfrops_v12.la mca/gds/libmca_gds.la mca/gds/hash/libpmix_mca_gds_hash.la mca/pcompress/libmca_pcompress.la mca/pdl/libmca_pdl.la mca/pdl/pdlopen/libpmix_mca_pdl_pdlopen.la mca/pfexec/libmca_pfexec.la mca/pfexec/linux/libpmix_mca_pfexec_linux.la mca/pgpu/libmca_pgpu.la mca/pif/libmca_pif.la mca/pif/posix_ipv4/libpmix_mca_pif_posix_ipv4.la mca/pinstalldirs/libmca_pinstalldirs.la mca/pinstalldirs/config/libpmix_mca_pinstalldirs_config.la mca/pinstalldirs/env/libpmix_mca_pinstalldirs_env.la mca/plog/libmca_plog.la mca/plog/syslog/libpmix_mca_plog_syslog.la mca/plog/stdfd/libpmix_mca_plog_stdfd.la mca/plog/default/libpmix_mca_plog_default.la mca/pmdl/libmca_pmdl.la mca/pmdl/oshmem/libpmix_mca_pmdl_oshmem.la mca/pmdl/ompi/libpmix_mca_pmdl_ompi.la mca/pmdl/mpich/libpmix_mca_pmdl_mpich.la mca/pnet/libmca_pnet.la mca/pnet/opa/libpmix_mca_pnet_opa.la mca/preg/libmca_preg.la mca/preg/raw/libpmix_mca_preg_raw.la mca/preg/native/libpmix_mca_preg_native.la mca/preg/compress/libpmix_mca_preg_compress.la mca/prm/libmca_prm.la mca/psec/libmca_psec.la mca/psec/munge/libpmix_mca_psec_munge.la mca/psec/none/libpmix_mca_psec_none.la mca/psec/native/libpmix_mca_psec_native.la mca/psensor/libmca_psensor.la mca/psensor/heartbeat/libpmix_mca_psensor_heartbeat.la mca/psensor/file/libpmix_mca_psensor_file.la mca/psquash/libmca_psquash.la mca/psquash/native/libpmix_mca_psquash_native.la mca/psquash/flex128/libpmix_mca_psquash_flex128.la mca/pstat/libmca_pstat.la mca/pstat/linux/libpmix_mca_pstat_linux.la mca/pstrg/libmca_pstrg.la mca/pstrg/vfs/libpmix_mca_pstrg_vfs.la mca/ptl/libmca_ptl.la mca/ptl/tool/libpmix_mca_ptl_tool.la mca/ptl/server/libpmix_mca_ptl_server.la mca/ptl/client/libpmix_mca_ptl_client.la include/libpmixglobal.la -lm -ldl -levent_core -levent_pthreads -lhwloc
libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC threads/.libs/mutex.o threads/.libs/thread.o event/.libs/pmix_event_notification.o event/.libs/pmix_event_registration.o hwloc/.libs/pmix_hwloc.o hwloc/.libs/pmix_hwloc_datatype.o client/.libs/pmix_client.o client/.libs/pmix_client_fence.o client/.libs/pmix_client_get.o client/.libs/pmix_client_pub.o client/.libs/pmix_client_spawn.o client/.libs/pmix_client_connect.o client/.libs/pmix_client_group.o client/.libs/pmix_client_fabric.o client/.libs/pmix_client_topology.o client/.libs/pmix_client_convert.o server/.libs/pmix_server.o server/.libs/pmix_server_ops.o server/.libs/pmix_server_get.o runtime/.libs/pmix_finalize.o runtime/.libs/pmix_init.o runtime/.libs/pmix_params.o runtime/.libs/pmix_progress_threads.o tool/.libs/pmix_tool.o tool/.libs/pmix_tool_ops.o common/.libs/pmix_query.o common/.libs/pmix_strings.o common/.libs/pmix_log.o common/.libs/pmix_control.o common/.libs/pmix_data.o common/.libs/pmix_security.o common/.libs/pmix_iof.o common/.libs/pmix_attributes.o -Wl,--whole-archive mca/base/.libs/libpmix_mca_base.a class/.libs/libpmix_class.a util/.libs/libpmix_util.a mca/bfrops/.libs/libmca_bfrops.a mca/bfrops/v41/.libs/libpmix_mca_bfrops_v41.a mca/bfrops/v4/.libs/libpmix_mca_bfrops_v4.a mca/bfrops/v3/.libs/libpmix_mca_bfrops_v3.a mca/bfrops/v21/.libs/libpmix_mca_bfrops_v21.a mca/bfrops/v20/.libs/libpmix_mca_bfrops_v20.a mca/bfrops/v12/.libs/libpmix_mca_bfrops_v12.a mca/gds/.libs/libmca_gds.a mca/gds/hash/.libs/libpmix_mca_gds_hash.a mca/pcompress/.libs/libmca_pcompress.a mca/pdl/.libs/libmca_pdl.a mca/pdl/pdlopen/.libs/libpmix_mca_pdl_pdlopen.a mca/pfexec/.libs/libmca_pfexec.a mca/pfexec/linux/.libs/libpmix_mca_pfexec_linux.a mca/pgpu/.libs/libmca_pgpu.a mca/pif/.libs/libmca_pif.a mca/pif/posix_ipv4/.libs/libpmix_mca_pif_posix_ipv4.a mca/pinstalldirs/.libs/libmca_pinstalldirs.a mca/pinstalldirs/config/.libs/libpmix_mca_pinstalldirs_config.a mca/pinstalldirs/env/.libs/libpmix_mca_pinstalldirs_env.a mca/plog/.libs/libmca_plog.a mca/plog/syslog/.libs/libpmix_mca_plog_syslog.a mca/plog/stdfd/.libs/libpmix_mca_plog_stdfd.a mca/plog/default/.libs/libpmix_mca_plog_default.a mca/pmdl/.libs/libmca_pmdl.a mca/pmdl/oshmem/.libs/libpmix_mca_pmdl_oshmem.a mca/pmdl/ompi/.libs/libpmix_mca_pmdl_ompi.a mca/pmdl/mpich/.libs/libpmix_mca_pmdl_mpich.a mca/pnet/.libs/libmca_pnet.a mca/pnet/opa/.libs/libpmix_mca_pnet_opa.a mca/preg/.libs/libmca_preg.a mca/preg/raw/.libs/libpmix_mca_preg_raw.a mca/preg/native/.libs/libpmix_mca_preg_native.a mca/preg/compress/.libs/libpmix_mca_preg_compress.a mca/prm/.libs/libmca_prm.a mca/psec/.libs/libmca_psec.a mca/psec/munge/.libs/libpmix_mca_psec_munge.a mca/psec/none/.libs/libpmix_mca_psec_none.a mca/psec/native/.libs/libpmix_mca_psec_native.a mca/psensor/.libs/libmca_psensor.a mca/psensor/heartbeat/.libs/libpmix_mca_psensor_heartbeat.a mca/psensor/file/.libs/libpmix_mca_psensor_file.a mca/psquash/.libs/libmca_psquash.a mca/psquash/native/.libs/libpmix_mca_psquash_native.a mca/psquash/flex128/.libs/libpmix_mca_psquash_flex128.a mca/pstat/.libs/libmca_pstat.a mca/pstat/linux/.libs/libpmix_mca_pstat_linux.a mca/pstrg/.libs/libmca_pstrg.a mca/pstrg/vfs/.libs/libpmix_mca_pstrg_vfs.a mca/ptl/.libs/libmca_ptl.a mca/ptl/tool/.libs/libpmix_mca_ptl_tool.a mca/ptl/server/.libs/libpmix_mca_ptl_server.a mca/ptl/client/.libs/libpmix_mca_ptl_client.a include/.libs/libpmixglobal.a -Wl,--no-whole-archive -Wl,--as-needed -lmunge -lm -ldl -levent_core -levent_pthreads -lhwloc -march=native -fstack-protector-all -O2 -fdiagnostics-color=always -frecord-gcc-switches -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=format-security -Werror -Wl,-O1 -Wl,-z -Wl,pack-relative-relocs -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-soname -Wl,libpmix.so.2 -o .libs/libpmix.so.2.13.2
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/ptl/base/static-components.h:10:40: error: type of 'pmix_mca_ptl_tool_component' does not match original declaration [-Werror=lto-type-mismatch]
10 | extern const pmix_mca_base_component_t pmix_mca_ptl_tool_component;
| ^
mca/ptl/tool/ptl_tool_component.c:48:39: note: type 'struct pmix_ptl_base_component_t' should match type 'const struct pmix_mca_base_component_t'
48 | PMIX_EXPORT pmix_ptl_base_component_t pmix_mca_ptl_tool_component = {
| ^
mca/ptl/tool/ptl_tool_component.c:48:39: note: 'pmix_mca_ptl_tool_component' was previously declared here
mca/ptl/tool/ptl_tool_component.c:48:39: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/ptl/base/static-components.h:9:40: error: type of 'pmix_mca_ptl_server_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_ptl_server_component;
| ^
mca/ptl/server/ptl_server_component.c:48:39: note: type 'struct pmix_ptl_base_component_t' should match type 'const struct pmix_mca_base_component_t'
48 | PMIX_EXPORT pmix_ptl_base_component_t pmix_mca_ptl_server_component = {
| ^
mca/ptl/server/ptl_server_component.c:48:39: note: 'pmix_mca_ptl_server_component' was previously declared here
mca/ptl/server/ptl_server_component.c:48:39: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/ptl/base/static-components.h:8:40: error: type of 'pmix_mca_ptl_client_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_ptl_client_component;
| ^
mca/ptl/client/ptl_client_component.c:48:39: note: type 'struct pmix_ptl_base_component_t' should match type 'const struct pmix_mca_base_component_t'
48 | PMIX_EXPORT pmix_ptl_base_component_t pmix_mca_ptl_client_component = {
| ^
mca/ptl/client/ptl_client_component.c:48:39: note: 'pmix_mca_ptl_client_component' was previously declared here
mca/ptl/client/ptl_client_component.c:48:39: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pstrg/base/static-components.h:8:40: error: type of 'pmix_mca_pstrg_vfs_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_pstrg_vfs_component;
| ^
mca/pstrg/vfs/pstrg_vfs_component.c:46:28: note: type 'struct pmix_pstrg_vfs_component_t' should match type 'const struct pmix_mca_base_component_t'
46 | pmix_pstrg_vfs_component_t pmix_mca_pstrg_vfs_component = {
| ^
mca/pstrg/vfs/pstrg_vfs_component.c:46:28: note: 'pmix_mca_pstrg_vfs_component' was previously declared here
mca/pstrg/vfs/pstrg_vfs_component.c:46:28: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psquash/base/static-components.h:9:40: error: type of 'pmix_mca_psquash_native_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_psquash_native_component;
| ^
mca/psquash/native/psquash_native_component.c:31:31: note: type 'struct pmix_psquash_base_component_t' should match type 'const struct pmix_mca_base_component_t'
31 | pmix_psquash_base_component_t pmix_mca_psquash_native_component = {
| ^
mca/psquash/native/psquash_native_component.c:31:31: note: 'pmix_mca_psquash_native_component' was previously declared here
mca/psquash/native/psquash_native_component.c:31:31: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psquash/base/static-components.h:8:40: error: type of 'pmix_mca_psquash_flex128_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_psquash_flex128_component;
| ^
mca/psquash/flex128/psquash_flex128_component.c:28:31: note: type 'struct pmix_psquash_base_component_t' should match type 'const struct pmix_mca_base_component_t'
28 | pmix_psquash_base_component_t pmix_mca_psquash_flex128_component = {
| ^
mca/psquash/flex128/psquash_flex128_component.c:28:31: note: 'pmix_mca_psquash_flex128_component' was previously declared here
mca/psquash/flex128/psquash_flex128_component.c:28:31: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psensor/base/static-components.h:9:40: error: type of 'pmix_mca_psensor_heartbeat_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_psensor_heartbeat_component;
| ^
mca/psensor/heartbeat/psensor_heartbeat_component.c:28:36: note: type 'struct pmix_psensor_heartbeat_component_t' should match type 'const struct pmix_mca_base_component_t'
28 | pmix_psensor_heartbeat_component_t pmix_mca_psensor_heartbeat_component = {
| ^
mca/psensor/heartbeat/psensor_heartbeat_component.c:28:36: note: 'pmix_mca_psensor_heartbeat_component' was previously declared here
mca/psensor/heartbeat/psensor_heartbeat_component.c:28:36: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psensor/base/static-components.h:8:40: error: type of 'pmix_mca_psensor_file_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_psensor_file_component;
| ^
mca/psensor/file/psensor_file_component.c:27:31: note: type 'struct pmix_psensor_file_component_t' should match type 'const struct pmix_mca_base_component_t'
27 | pmix_psensor_file_component_t pmix_mca_psensor_file_component = {
| ^
mca/psensor/file/psensor_file_component.c:27:31: note: 'pmix_mca_psensor_file_component' was previously declared here
mca/psensor/file/psensor_file_component.c:27:31: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psec/base/static-components.h:10:40: error: type of 'pmix_mca_psec_munge_component' does not match original declaration [-Werror=lto-type-mismatch]
10 | extern const pmix_mca_base_component_t pmix_mca_psec_munge_component;
| ^
mca/psec/munge/psec_munge_component.c:45:28: note: type 'struct pmix_psec_base_component_t' should match type 'const struct pmix_mca_base_component_t'
45 | pmix_psec_base_component_t pmix_mca_psec_munge_component = {
| ^
mca/psec/munge/psec_munge_component.c:45:28: note: 'pmix_mca_psec_munge_component' was previously declared here
mca/psec/munge/psec_munge_component.c:45:28: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psec/base/static-components.h:9:40: error: type of 'pmix_mca_psec_none_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_psec_none_component;
| ^
mca/psec/none/psec_none_component.c:46:28: note: type 'struct pmix_psec_base_component_t' should match type 'const struct pmix_mca_base_component_t'
46 | pmix_psec_base_component_t pmix_mca_psec_none_component = {
| ^
mca/psec/none/psec_none_component.c:46:28: note: 'pmix_mca_psec_none_component' was previously declared here
mca/psec/none/psec_none_component.c:46:28: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/psec/base/static-components.h:8:40: error: type of 'pmix_mca_psec_native_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_psec_native_component;
| ^
mca/psec/native/psec_native_component.c:45:28: note: type 'struct pmix_psec_base_component_t' should match type 'const struct pmix_mca_base_component_t'
45 | pmix_psec_base_component_t pmix_mca_psec_native_component = {
| ^
mca/psec/native/psec_native_component.c:45:28: note: 'pmix_mca_psec_native_component' was previously declared here
mca/psec/native/psec_native_component.c:45:28: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pnet/base/static-components.h:8:40: error: type of 'pmix_mca_pnet_opa_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_pnet_opa_component;
| ^
mca/pnet/opa/pnet_opa_component.c:48:27: note: type 'struct pmix_pnet_opa_component_t' should match type 'const struct pmix_mca_base_component_t'
48 | pmix_pnet_opa_component_t pmix_mca_pnet_opa_component = {
| ^
mca/pnet/opa/pnet_opa_component.c:48:27: note: 'pmix_mca_pnet_opa_component' was previously declared here
mca/pnet/opa/pnet_opa_component.c:48:27: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pmdl/base/static-components.h:10:40: error: type of 'pmix_mca_pmdl_oshmem_component' does not match original declaration [-Werror=lto-type-mismatch]
10 | extern const pmix_mca_base_component_t pmix_mca_pmdl_oshmem_component;
| ^
mca/pmdl/oshmem/pmdl_oshmem_component.c:39:30: note: type 'struct pmix_pmdl_oshmem_component_t' should match type 'const struct pmix_mca_base_component_t'
39 | pmix_pmdl_oshmem_component_t pmix_mca_pmdl_oshmem_component = {
| ^
mca/pmdl/oshmem/pmdl_oshmem_component.c:39:30: note: 'pmix_mca_pmdl_oshmem_component' was previously declared here
mca/pmdl/oshmem/pmdl_oshmem_component.c:39:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pmdl/base/static-components.h:9:40: error: type of 'pmix_mca_pmdl_ompi_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_pmdl_ompi_component;
| ^
mca/pmdl/ompi/pmdl_ompi_component.c:39:28: note: type 'struct pmix_pmdl_ompi_component_t' should match type 'const struct pmix_mca_base_component_t'
39 | pmix_pmdl_ompi_component_t pmix_mca_pmdl_ompi_component = {
| ^
mca/pmdl/ompi/pmdl_ompi_component.c:39:28: note: 'pmix_mca_pmdl_ompi_component' was previously declared here
mca/pmdl/ompi/pmdl_ompi_component.c:39:28: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pmdl/base/static-components.h:8:40: error: type of 'pmix_mca_pmdl_mpich_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_pmdl_mpich_component;
| ^
mca/pmdl/mpich/pmdl_mpich_component.c:39:29: note: type 'struct pmix_pmdl_mpich_component_t' should match type 'const struct pmix_mca_base_component_t'
39 | pmix_pmdl_mpich_component_t pmix_mca_pmdl_mpich_component = {
| ^
mca/pmdl/mpich/pmdl_mpich_component.c:39:29: note: 'pmix_mca_pmdl_mpich_component' was previously declared here
mca/pmdl/mpich/pmdl_mpich_component.c:39:29: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/plog/base/static-components.h:10:40: error: type of 'pmix_mca_plog_syslog_component' does not match original declaration [-Werror=lto-type-mismatch]
10 | extern const pmix_mca_base_component_t pmix_mca_plog_syslog_component;
| ^
mca/plog/syslog/plog_syslog_component.c:31:30: note: type 'struct pmix_plog_syslog_component_t' should match type 'const struct pmix_mca_base_component_t'
31 | pmix_plog_syslog_component_t pmix_mca_plog_syslog_component = {
| ^
mca/plog/syslog/plog_syslog_component.c:31:30: note: 'pmix_mca_plog_syslog_component' was previously declared here
mca/plog/syslog/plog_syslog_component.c:31:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pinstalldirs/base/static-components.h:9:40: error: type of 'pmix_mca_pinstalldirs_config_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_pinstalldirs_config_component;
| ^
mca/pinstalldirs/config/pmix_pinstalldirs_config.c:18:42: note: type 'const struct pmix_pinstalldirs_base_component_t' should match type 'const struct pmix_mca_base_component_t'
18 | const pmix_pinstalldirs_base_component_t pmix_mca_pinstalldirs_config_component = {
| ^
mca/pinstalldirs/config/pmix_pinstalldirs_config.c:18:42: note: 'pmix_mca_pinstalldirs_config_component' was previously declared here
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pinstalldirs/base/static-components.h:8:40: error: type of 'pmix_mca_pinstalldirs_env_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_pinstalldirs_env_component;
| ^
mca/pinstalldirs/env/pmix_pinstalldirs_env.c:24:36: note: type 'struct pmix_pinstalldirs_base_component_t' should match type 'const struct pmix_mca_base_component_t'
24 | pmix_pinstalldirs_base_component_t pmix_mca_pinstalldirs_env_component = {
| ^
mca/pinstalldirs/env/pmix_pinstalldirs_env.c:24:36: note: 'pmix_mca_pinstalldirs_env_component' was previously declared here
mca/pinstalldirs/env/pmix_pinstalldirs_env.c:24:36: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/pdl/base/static-components.h:8:40: error: type of 'pmix_mca_pdl_pdlopen_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_pdl_pdlopen_component;
| ^
mca/pdl/pdlopen/pdl_pdlopen_component.c:42:30: note: type 'struct pmix_pdl_pdlopen_component_t' should match type 'const struct pmix_mca_base_component_t'
42 | pmix_pdl_pdlopen_component_t pmix_mca_pdl_pdlopen_component = {
| ^
mca/pdl/pdlopen/pdl_pdlopen_component.c:42:30: note: 'pmix_mca_pdl_pdlopen_component' was previously declared here
mca/pdl/pdlopen/pdl_pdlopen_component.c:42:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/gds/base/static-components.h:8:40: error: type of 'pmix_mca_gds_hash_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_gds_hash_component;
| ^
mca/gds/hash/gds_hash_component.c:46:27: note: type 'struct pmix_gds_hash_component_t' should match type 'const struct pmix_mca_base_component_t'
46 | pmix_gds_hash_component_t pmix_mca_gds_hash_component = {
| ^
mca/gds/hash/gds_hash_component.c:46:27: note: 'pmix_mca_gds_hash_component' was previously declared here
mca/gds/hash/gds_hash_component.c:46:27: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/bfrops/base/static-components.h:13:40: error: type of 'pmix_mca_bfrops_v41_component' does not match original declaration [-Werror=lto-type-mismatch]
13 | extern const pmix_mca_base_component_t pmix_mca_bfrops_v41_component;
| ^
mca/bfrops/v41/bfrop_pmix41_component.c:51:30: note: type 'struct pmix_bfrops_base_component_t' should match type 'const struct pmix_mca_base_component_t'
51 | pmix_bfrops_base_component_t pmix_mca_bfrops_v41_component = {
| ^
mca/bfrops/v41/bfrop_pmix41_component.c:51:30: note: 'pmix_mca_bfrops_v41_component' was previously declared here
mca/bfrops/v41/bfrop_pmix41_component.c:51:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/bfrops/base/static-components.h:12:40: error: type of 'pmix_mca_bfrops_v4_component' does not match original declaration [-Werror=lto-type-mismatch]
12 | extern const pmix_mca_base_component_t pmix_mca_bfrops_v4_component;
| ^
mca/bfrops/v4/bfrop_pmix4_component.c:51:30: note: type 'struct pmix_bfrops_base_component_t' should match type 'const struct pmix_mca_base_component_t'
51 | pmix_bfrops_base_component_t pmix_mca_bfrops_v4_component = {
| ^
mca/bfrops/v4/bfrop_pmix4_component.c:51:30: note: 'pmix_mca_bfrops_v4_component' was previously declared here
mca/bfrops/v4/bfrop_pmix4_component.c:51:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/bfrops/base/static-components.h:11:40: error: type of 'pmix_mca_bfrops_v3_component' does not match original declaration [-Werror=lto-type-mismatch]
11 | extern const pmix_mca_base_component_t pmix_mca_bfrops_v3_component;
| ^
mca/bfrops/v3/bfrop_pmix3_component.c:51:30: note: type 'struct pmix_bfrops_base_component_t' should match type 'const struct pmix_mca_base_component_t'
51 | pmix_bfrops_base_component_t pmix_mca_bfrops_v3_component = {
| ^
mca/bfrops/v3/bfrop_pmix3_component.c:51:30: note: 'pmix_mca_bfrops_v3_component' was previously declared here
mca/bfrops/v3/bfrop_pmix3_component.c:51:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/bfrops/base/static-components.h:10:40: error: type of 'pmix_mca_bfrops_v21_component' does not match original declaration [-Werror=lto-type-mismatch]
10 | extern const pmix_mca_base_component_t pmix_mca_bfrops_v21_component;
| ^
mca/bfrops/v21/bfrop_pmix21_component.c:51:30: note: type 'struct pmix_bfrops_base_component_t' should match type 'const struct pmix_mca_base_component_t'
51 | pmix_bfrops_base_component_t pmix_mca_bfrops_v21_component = {
| ^
mca/bfrops/v21/bfrop_pmix21_component.c:51:30: note: 'pmix_mca_bfrops_v21_component' was previously declared here
mca/bfrops/v21/bfrop_pmix21_component.c:51:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/bfrops/base/static-components.h:9:40: error: type of 'pmix_mca_bfrops_v20_component' does not match original declaration [-Werror=lto-type-mismatch]
9 | extern const pmix_mca_base_component_t pmix_mca_bfrops_v20_component;
| ^
mca/bfrops/v20/bfrop_pmix20_component.c:51:30: note: type 'struct pmix_bfrops_base_component_t' should match type 'const struct pmix_mca_base_component_t'
51 | pmix_bfrops_base_component_t pmix_mca_bfrops_v20_component = {
| ^
mca/bfrops/v20/bfrop_pmix20_component.c:51:30: note: 'pmix_mca_bfrops_v20_component' was previously declared here
mca/bfrops/v20/bfrop_pmix20_component.c:51:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/var/tmp/portage/sys-cluster/pmix-5.0.2/work/pmix-5.0.2/src/mca/bfrops/base/static-components.h:8:40: error: type of 'pmix_mca_bfrops_v12_component' does not match original declaration [-Werror=lto-type-mismatch]
8 | extern const pmix_mca_base_component_t pmix_mca_bfrops_v12_component;
| ^
mca/bfrops/v12/bfrop_v12_component.c:50:30: note: type 'struct pmix_bfrops_base_component_t' should match type 'const struct pmix_mca_base_component_t'
50 | pmix_bfrops_base_component_t pmix_mca_bfrops_v12_component = {
| ^
mca/bfrops/v12/bfrop_v12_component.c:50:30: note: 'pmix_mca_bfrops_v12_component' was previously declared here
mca/bfrops/v12/bfrop_v12_component.c:50:30: note: code may be misoptimized unless '-fno-strict-aliasing' is used
lto1: all warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1184: libpmix.la] Error 1
Not sure there is much I can say about that - guess we can try to add const to all the component declarations, but I have no idea if that will silence this flag's complaints or just kick the problem further down the road. I've never heard of this flag before and have no experience with it.
Being honest, it will be a pretty low priority - might get to it later in the year once higher priority issues get resolved.
Unfortunately there is no fix for this issue, because the problem is not the const but the fact that for the outside world all components are seen as the base component (aka. pmix_mca_base_component_t) when in fact they are of some private type (such as pmix_bfrops_base_component_t that starts with the base component).
Background information
What version of the PMIx Reference Library are you using?
5.0.2
Describe how PMIx was installed
Built from source using Gentoo's distribution package manager.
Details of the problem
I tried to build with the following *FLAGS to optimize the build:
-flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Note the -Werror=* flags are used to help detect cases where the compiler tries to optimize by assuming UB cannot exist in the source code -- if it does exist, ordinarily the code would be miscompiled, and this says to make the miscompilation a fatal error.
I got this error:
Full build log: build.log
The text was updated successfully, but these errors were encountered: