Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prov/util/src/util_mem_hooks.c: #if syntax error with libfabric-1.20.0 and main branch #9632

Closed
dslarm opened this issue Dec 7, 2023 · 2 comments · Fixed by #9633
Closed
Labels

Comments

@dslarm
Copy link

dslarm commented Dec 7, 2023

Describe the bug
libfabric fails to compile on aarch64 - due to missing brackets in the elif at:
prov/util/src/util_mem_hooks.c line 193.
Similarly the riscv case has missing brackets.
This may be specifically reproducible on LLVM family compilers, as the GNU build succeeded, but there is a very obvious syntax error here that should not be there. It should be fixable without needing to reproduce the error.
To Reproduce
Steps to reproduce the behavior..
Using the Arm Compiler for Linux 23.10 (LLVM based) and Spack.
Spack's chosen flags are:
^[email protected]%[email protected]~debug~kdreg build_system=autotools fabrics=sockets,tcp,udp arch=linux-amzn2023-neoverse_v1
which builds with a config of:
--disable-debug --with-kdreg=no --enable-cxi=no --enable-efa=no --enable-gni=no --enable-mlx=no --enable-mrail=no --enable-opx=no --enable-psm=no --enable-psm2=no --enable-psm3=no --enable-rxm=no --enable-rxd=no --enable-shm=no --enable-sockets=yes --enable-tcp=yes --enable-udp=yes --enable-usnic=no --enable-verbs=no --enable-xpmem=no

Expected behavior
It should not fail to compile.

Output
If applicable, add output to help explain your problem. (e.g. backtrace, debug logs)

     460    /bin/sh ./libtool  --tag=CC   --mode=compile /home/ec2-user/spack/lib/spack/env/arm/armclang -DHAVE_CONFIG_H -I.  -I./include -D_GNU_SOURCE -D__USE_XOPEN2K8 -DSYSCONFDIR=\"/home/ec2-user/spack/opt/spack/linux-amzn2023-n
            eoverse_v1/arm-23.10/libfabric-1.20.0-abdkllbut3qad3hgt7y2cvxbyxxsktn4/etc\" -DRDMADIR=\"@rdmadir@\" -DPROVDLDIR=\"/home/ec2-user/spack/opt/spack/linux-amzn2023-neoverse_v1/arm-23.10/libfabric-1.20.0-abdkllbut3qad3hgt7y
            2cvxbyxxsktn4/lib/libfabric\" -I./prov/sockets/include -I./prov/sockets         -I./prov/hook/include -I./prov/hook/perf/include  -I./prov/hook/hook_debug/include -I./prov/hook/hook_hmem/include -I./prov/hook/dmabuf_pee
            r_mem/include  -Wall -O2 -DNDEBUG -fvisibility=hidden -Wall -Wundef -Wpointer-arith -MT prov/util/src/src_libfabric_la-cuda_ipc_monitor.lo -MD -MP -MF prov/util/src/.deps/src_libfabric_la-cuda_ipc_monitor.Tpo -c -o prov
            /util/src/src_libfabric_la-cuda_ipc_monitor.lo `test -f 'prov/util/src/cuda_ipc_monitor.c' || echo './'`prov/util/src/cuda_ipc_monitor.c
  >> 461    prov/util/src/util_mem_hooks.c:193:28: error: expected ')' in preprocessor expression
     462      193 | #elif (defined(__aarch64__)
     463          |        ~~~~~~~~~~~~~~~~~~~~^
     464    prov/util/src/util_mem_hooks.c:193:7: note: to match this '('
     465      193 | #elif (defined(__aarch64__)
     466          |       ^
  >> 467    prov/util/src/util_mem_hooks.c:199:48: error: expected ')' in preprocessor expression
     468      199 | #elif (defined(__riscv) && (__riscv_xlen == 64)
     469          |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
     470    prov/util/src/util_mem_hooks.c:199:7: note: to match this '('
     471      199 | #elif (defined(__riscv) && (__riscv_xlen == 64)
     472          |       ^
     473    2 errors generated.

Environment:
Amazon Linux 2023.

Additional context
Add any other context about the problem here.

@aingerson
Copy link
Contributor

@dslarm Thanks for reporting it! Can you verify #9633 builds properly?

@dslarm
Copy link
Author

dslarm commented Dec 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants