zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.64k stars 2.35k forks source link

make check failed in libzmq@4.3.4 #4217

Closed Tom-python0121 closed 3 years ago

Tom-python0121 commented 3 years ago

Make check failed in libzmq@4.3.4 on centos8 when I install it in spack.

Issue description

[root@centos8 spack-src]# make check
……
  CXX      tests/test_security_curve-test_security_curve.o
In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:15,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_box.h:27: error: "crypto_box_PUBLICKEYBYTES" redefined [-Werror]
 #define crypto_box_PUBLICKEYBYTES crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:39: note: this is the location of the previous definition
 #define crypto_box_PUBLICKEYBYTES 32

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:15,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_box.h:31: error: "crypto_box_SECRETKEYBYTES" redefined [-Werror]
 #define crypto_box_SECRETKEYBYTES crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:35: note: this is the location of the previous definition
 #define crypto_box_SECRETKEYBYTES 32

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:15,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_box.h:35: error: "crypto_box_NONCEBYTES" redefined [-Werror]
 #define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:37: note: this is the location of the previous definition
 #define crypto_box_NONCEBYTES 24

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:15,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_box.h:90: error: "crypto_box_BEFORENMBYTES" redefined [-Werror]
 #define crypto_box_BEFORENMBYTES crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:40: note: this is the location of the previous definition
 #define crypto_box_BEFORENMBYTES 32

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:15,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_box.h:142: error: "crypto_box_ZEROBYTES" redefined [-Werror]
 #define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:38: note: this is the location of the previous definition
 #define crypto_box_ZEROBYTES 32

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:15,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_box.h:146: error: "crypto_box_BOXZEROBYTES" redefined [-Werror]
 #define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:36: note: this is the location of the previous definition
 #define crypto_box_BOXZEROBYTES 16

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:36,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_secretbox.h:16: error: "crypto_secretbox_KEYBYTES" redefined [-Werror]
 #define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:41: note: this is the location of the previous definition
 #define crypto_secretbox_KEYBYTES 32

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:36,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_secretbox.h:20: error: "crypto_secretbox_NONCEBYTES" redefined [-Werror]
 #define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:42: note: this is the location of the previous definition
 #define crypto_secretbox_NONCEBYTES 24

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:36,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_secretbox.h:70: error: "crypto_secretbox_ZEROBYTES" redefined [-Werror]
 #define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:43: note: this is the location of the previous definition
 #define crypto_secretbox_ZEROBYTES 32

In file included from /home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium.h:36,
                 from tests/../src/secure_allocator.hpp:39,
                 from tests/../src/curve_client_tools.hpp:49,
                 from tests/test_security_curve.cpp:53:
/home/spack/spack/opt/spack/linux-centos8-aarch64/gcc-8.4.1/libsodium-1.0.18-75y3lqlisoofju46v3nf2jkoer2yxew4/include/sodium/crypto_secretbox.h:74: error: "crypto_secretbox_BOXZEROBYTES" redefined [-Werror]
 #define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES

In file included from tests/test_security_curve.cpp:52:
tests/../src/tweetnacl.h:44: note: this is the location of the previous definition
 #define crypto_secretbox_BOXZEROBYTES 16

cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:7383: tests/test_security_curve-test_security_curve.o] Error 1
make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-libzmq-4.3.4-y5ezqvkqotskfpdupbaj4h62puds7qyq/spack-src'
make[1]: *** [Makefile:9624: check-am] Error 2
make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-libzmq-4.3.4-y5ezqvkqotskfpdupbaj4h62puds7qyq/spack-src'
make: *** [Makefile:8217: check-recursive] Error 1

Can you help me ?

Environment

[root@centos8 ~]# spack debug report

bluca commented 3 years ago

What's slack?

Tom-python0121 commented 3 years ago

@bluca I don't know what you're asking.Now here's my mistake:error: "xxxxxx" redefined [-Werror]

bluca commented 3 years ago

Sorry, that was autocorrected - what is spack?

Tom-python0121 commented 3 years ago

@bluca Sppack is a management software tool, similar to yum.Now, after I install the latest version of libzmq and test make check, there are a lot of macro redefining problems, can you solve them?

bluca commented 3 years ago

The CentOS 8 builds are working just fine, so it must be an issue with this "spack" tool, which is not supported. We provide RPM packages and repositories of the latest releases, you can find them here, please use those instead of that unsupported tool:

https://software.opensuse.org/download.html?project=network%3Amessaging%3Azeromq%3Arelease-stable&package=zeromq-devel

Alternatively, please ask the "spack" providers/maintainers for support.