• Bug#1067055: openmpi: error: implicit declaration of function 'OPAL_THR

    From Thorsten Glaser@21:1/5 to All on Sun Mar 17 19:40:02 2024
    Source: openmpi
    Version: 4.1.6-7
    Severity: serious
    Justification: ftbfs
    Tags: ftbfs
    Tag: ftbfs
    X-Debbugs-Cc: tg@mirbsd.de

    […]
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../../../opal/mca/btl/ofi -I../../../../opal/include -I../../../../ompi/include -I../../../../oshmem/include -I../../../../opal/mca/hwloc/hwloc201/hwloc/include/private/autogen -I../../../../opal/mca/
    hwloc/hwloc201/hwloc/include/hwloc/autogen -I../../../../ompi/mpiext/cuda/c -I../../../../../.. -I../../../.. -I../../../../../../opal/include -I../../../../../../orte/include -I../../../../orte/include -I../../../../../../ompi/include -I../../../../../..
    /oshmem/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/local/include -I/usr/local/include -DNDEBUG -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/tmp/buildd/openmpi-4.1.6=. -
    fstack-protector-strong -Wformat -Werror=format-security -O3 -finline-functions -fno-strict-aliasing -c ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c -fPIC -DPIC -o .libs/btl_ofi_rdma.o
    In file included from ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c:14: ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c: In function 'mca_btl_ofi_get':
    ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.h:33:13: error: implicit declaration of function 'OPAL_THREAD_ADD_FETCH64'; did you mean 'OPAL_THREAD_ADD_FETCH32'? [-Werror=implicit-function-declaration]
    33 | OPAL_THREAD_ADD_FETCH64(&(module)->outstanding_rdma, 1); \
    | ^~~~~~~~~~~~~~~~~~~~~~~ ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c:70:5: note: in expansion of macro 'MCA_BTL_OFI_NUM_RDMA_INC'
    70 | MCA_BTL_OFI_NUM_RDMA_INC(ofi_btl);
    | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c:82:40: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    82 | remote_address = (remote_address - (uint64_t) remote_handle->base_addr);
    | ^ ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c: In function 'mca_btl_ofi_put':
    ../../../../../../opal/mca/btl/ofi/btl_ofi_rdma.c:132:40: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    132 | remote_address = (remote_address - (uint64_t) remote_handle->base_addr);
    | ^
    cc1: some warnings being treated as errors
    make[4]: *** [Makefile:1946: btl_ofi_rdma.lo] Error 1
    make[4]: Leaving directory '/tmp/buildd/openmpi-4.1.6/debian/build-gfortran/opal/mca/btl/ofi'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thorsten Glaser@21:1/5 to All on Sat Mar 23 03:10:01 2024
    Andrey Rakhmatullin dixit:

    OPAL_THREAD_ADD_FETCH64 is defined under #if OPAL_HAVE_ATOMIC_MATH_64

    Yes.

    , and I suspect not all of its uses also are.

    That’s what I get from this, yes.

    And I assume this arch doesn't have 64-bit atomics.

    No native ones, yes.

    I *think* either libatomic or libatomic_ops(?) make them
    available, but very slowly, using a syscall to guarantee
    atomicity (those systems are normally uniprocessor) on
    m68k.

    If possible, avoiding them would be preferrable. (For
    example, in some cases, like reading a 64-bit timestamp,
    if the writing direction is known and stable, reading
    twice then comparing is a possible alternative at least
    for some architectures (e.g. I know BSD code for sparc
    does it that way).

    I guess you’ll have to ask the porters of 32-bit arches
    with no native 64-bit atomics for details.

    Though I had thought GCC’s builtin atomics use the
    aforementioned kernel-based workaround from that library
    these days?

    bye,
    //mirabilos
    --
    When he found out that the m68k port was in a pretty bad shape, he did
    not, like many before him, shrug and move on; instead, he took it upon
    himself to start compiling things, just so he could compile his shell.
    How's that for dedication. -- Wouter, about my Debian/m68k revival

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)