Compile error (ubuntu trusty) #10622

issue NicolasDorier opened this issue on June 18, 2017
  1. NicolasDorier commented at 4:57 AM on June 18, 2017: contributor

    Tried a git clean -dfx followed by

    ./autogen.sh && ./configure --without-gui --disable-zmq --disable-bench --enable-debug --disable-tests && make clean && make -j4
    

    Result::

      CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
    In file included from /usr/include/x86_64-linux-gnu/bits/byteswap.h:35:0,
                     from /usr/include/endian.h:60,
                     from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h:111:17: error: expected unqualified-id before '__extension__'
     inline uint16_t htobe16(uint16_t host_16bits)
                     ^
    ./compat/endian.h:111:17: error: expected ')' before '__extension__'
    ./compat/endian.h:111:17: error: expected unqualified-id before ')' token
     inline uint16_t htobe16(uint16_t host_16bits)
                     ^
    In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h:118:34: error: expected ')' before 'host_16bits'
     inline uint16_t htole16(uint16_t host_16bits)
                                      ^
    In file included from /usr/include/x86_64-linux-gnu/bits/byteswap.h:35:0,
                     from /usr/include/endian.h:60,
                     from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h:125:17: error: expected unqualified-id before '__extension__'
     inline uint16_t be16toh(uint16_t big_endian_16bits)
                     ^
    ./compat/endian.h:125:17: error: expected ')' before '__extension__'
    ./compat/endian.h:125:17: error: expected unqualified-id before ')' token
     inline uint16_t be16toh(uint16_t big_endian_16bits)
                     ^
    In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h:132:34: error: expected ')' before 'little_endian_16bits'
     inline uint16_t le16toh(uint16_t little_endian_16bits)
                                      ^
    ./compat/endian.h: In function 'uint32_t __bswap_32(uint32_t)':
    ./compat/endian.h:139:17: error: redefinition of 'uint32_t __bswap_32(uint32_t)'
     inline uint32_t htobe32(uint32_t host_32bits)
                     ^
    In file included from /usr/include/endian.h:60:0,
                     from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    /usr/include/x86_64-linux-gnu/bits/byteswap.h:45:1: error: 'unsigned int __bswap_32(unsigned int)' previously defined here
     __bswap_32 (unsigned int __bsx)
     ^
    In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h: At global scope:
    ./compat/endian.h:146:34: error: expected ')' before 'host_32bits'
     inline uint32_t htole32(uint32_t host_32bits)
                                      ^
    ./compat/endian.h: In function 'uint32_t __bswap_32(uint32_t)':
    ./compat/endian.h:153:17: error: redefinition of 'uint32_t __bswap_32(uint32_t)'
     inline uint32_t be32toh(uint32_t big_endian_32bits)
                     ^
    In file included from /usr/include/endian.h:60:0,
                     from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    /usr/include/x86_64-linux-gnu/bits/byteswap.h:45:1: error: 'unsigned int __bswap_32(unsigned int)' previously defined here
     __bswap_32 (unsigned int __bsx)
     ^
    In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h: At global scope:
    ./compat/endian.h:160:34: error: expected ')' before 'little_endian_32bits'
     inline uint32_t le32toh(uint32_t little_endian_32bits)
                                      ^
    ./compat/endian.h: In function 'uint64_t __bswap_64(uint64_t)':
    ./compat/endian.h:167:17: error: redefinition of 'uint64_t __bswap_64(uint64_t)'
     inline uint64_t htobe64(uint64_t host_64bits)
                     ^
    In file included from /usr/include/endian.h:60:0,
                     from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    /usr/include/x86_64-linux-gnu/bits/byteswap.h:109:1: error: '__uint64_t __bswap_64(__uint64_t)' previously defined here
     __bswap_64 (__uint64_t __bsx)
     ^
    In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h: At global scope:
    ./compat/endian.h:174:34: error: expected ')' before 'host_64bits'
     inline uint64_t htole64(uint64_t host_64bits)
                                      ^
    ./compat/endian.h: In function 'uint64_t __bswap_64(uint64_t)':
    ./compat/endian.h:181:17: error: redefinition of 'uint64_t __bswap_64(uint64_t)'
     inline uint64_t be64toh(uint64_t big_endian_64bits)
                     ^
    In file included from /usr/include/endian.h:60:0,
                     from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    /usr/include/x86_64-linux-gnu/bits/byteswap.h:109:1: error: '__uint64_t __bswap_64(__uint64_t)' previously defined here
     __bswap_64 (__uint64_t __bsx)
     ^
    In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
                     from /usr/include/stdlib.h:42,
                     from ./crypto/ctaes/ctaes.h:11,
                     from crypto/aes.h:11,
                     from crypto/aes.cpp:5:
    ./compat/endian.h: At global scope:
    ./compat/endian.h:188:34: error: expected ')' before 'little_endian_64bits'
     inline uint64_t le64toh(uint64_t little_endian_64bits)
    

    Any idea of what can go wrong ?

    root@2cfc3e946cef:/home/bitcoin/bitcoin# cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=14.04
    DISTRIB_CODENAME=trusty
    DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
    
  2. NicolasDorier commented at 5:17 AM on June 18, 2017: contributor
  3. laanwj added the label Build system on Jun 24, 2017
  4. laanwj commented at 10:09 AM on June 24, 2017: member

    Cannot replicate this.

    user@trusty:~/bitcoin$ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=14.04
    DISTRIB_CODENAME=trusty
    DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
    user@trusty:~/bitcoin$ git rev-parse HEAD
    232508fe0fcb9ab33739a18cde8b0d5bfe4b4676
    user@trusty:~/bitcoin$ git clean -dfx
    user@trusty:~/bitcoin$ ./autogen.sh && ./configure --without-gui --disable-zmq --disable-bench --enable-debug --disable-tests --with-incompatible-bdb && make clean && make -j4
    ...
    make[1]: Entering directory `/home/user/bitcoin/doc/man'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/user/bitcoin/doc/man'
    make[1]: Entering directory `/home/user/bitcoin'
    make[1]: Nothing to be done for `all-am'.
    make[1]: Leaving directory `/home/user/bitcoin'
    user@trusty:~/bitcoin$
    

    (only difference with you is the --with-incompatible-bdb, but your error doesn't seem to be wallet/bdb related)

  5. laanwj renamed this:
    Compile error
    Compile error (ubuntu trusty)
    on Jun 24, 2017
  6. NicolasDorier commented at 6:27 AM on June 25, 2017: contributor

    The files which errors are also present in https://github.com/bitcoin/bitcoin/tree/master/src/compat . Why does the builld system takes /usr/include/x86_64-linux-gnu/bits/byteswap.h instead of the compat version ?

  7. laanwj commented at 7:35 AM on June 25, 2017: member

    The files which errors are also present in https://github.com/bitcoin/bitcoin/tree/master/src/compat . Why does the builld system takes /usr/include/x86_64-linux-gnu/bits/byteswap.h instead of the compat version ?

    To use those pass --enable-glibc-back-compat.

  8. NicolasDorier commented at 12:08 PM on June 25, 2017: contributor

    So I tried again today and did not get any compile error.

    I used the exact same git commit, and the exact same environment. (I am on docker) Maybe a docker issue that got solved when I rebooted my PC, or a heisenbug ?

    I close for now, will reopen/add more info if it happens again. (and try --enable-glibc-back-compat)

  9. NicolasDorier closed this on Jun 25, 2017

  10. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me