Compile error (ubuntu trusty) #10622

issue NicolasDorier openend 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

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

    Result::

      0  CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
      1In file included from /usr/include/x86_64-linux-gnu/bits/byteswap.h:35:0,
      2                 from /usr/include/endian.h:60,
      3                 from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
      4                 from /usr/include/stdlib.h:42,
      5                 from ./crypto/ctaes/ctaes.h:11,
      6                 from crypto/aes.h:11,
      7                 from crypto/aes.cpp:5:
      8./compat/endian.h:111:17: error: expected unqualified-id before '__extension__'
      9 inline uint16_t htobe16(uint16_t host_16bits)
     10                 ^
     11./compat/endian.h:111:17: error: expected ')' before '__extension__'
     12./compat/endian.h:111:17: error: expected unqualified-id before ')' token
     13 inline uint16_t htobe16(uint16_t host_16bits)
     14                 ^
     15In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
     16                 from /usr/include/stdlib.h:42,
     17                 from ./crypto/ctaes/ctaes.h:11,
     18                 from crypto/aes.h:11,
     19                 from crypto/aes.cpp:5:
     20./compat/endian.h:118:34: error: expected ')' before 'host_16bits'
     21 inline uint16_t htole16(uint16_t host_16bits)
     22                                  ^
     23In file included from /usr/include/x86_64-linux-gnu/bits/byteswap.h:35:0,
     24                 from /usr/include/endian.h:60,
     25                 from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
     26                 from /usr/include/stdlib.h:42,
     27                 from ./crypto/ctaes/ctaes.h:11,
     28                 from crypto/aes.h:11,
     29                 from crypto/aes.cpp:5:
     30./compat/endian.h:125:17: error: expected unqualified-id before '__extension__'
     31 inline uint16_t be16toh(uint16_t big_endian_16bits)
     32                 ^
     33./compat/endian.h:125:17: error: expected ')' before '__extension__'
     34./compat/endian.h:125:17: error: expected unqualified-id before ')' token
     35 inline uint16_t be16toh(uint16_t big_endian_16bits)
     36                 ^
     37In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
     38                 from /usr/include/stdlib.h:42,
     39                 from ./crypto/ctaes/ctaes.h:11,
     40                 from crypto/aes.h:11,
     41                 from crypto/aes.cpp:5:
     42./compat/endian.h:132:34: error: expected ')' before 'little_endian_16bits'
     43 inline uint16_t le16toh(uint16_t little_endian_16bits)
     44                                  ^
     45./compat/endian.h: In function 'uint32_t __bswap_32(uint32_t)':
     46./compat/endian.h:139:17: error: redefinition of 'uint32_t __bswap_32(uint32_t)'
     47 inline uint32_t htobe32(uint32_t host_32bits)
     48                 ^
     49In file included from /usr/include/endian.h:60:0,
     50                 from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
     51                 from /usr/include/stdlib.h:42,
     52                 from ./crypto/ctaes/ctaes.h:11,
     53                 from crypto/aes.h:11,
     54                 from crypto/aes.cpp:5:
     55/usr/include/x86_64-linux-gnu/bits/byteswap.h:45:1: error: 'unsigned int __bswap_32(unsigned int)' previously defined here
     56 __bswap_32 (unsigned int __bsx)
     57 ^
     58In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
     59                 from /usr/include/stdlib.h:42,
     60                 from ./crypto/ctaes/ctaes.h:11,
     61                 from crypto/aes.h:11,
     62                 from crypto/aes.cpp:5:
     63./compat/endian.h: At global scope:
     64./compat/endian.h:146:34: error: expected ')' before 'host_32bits'
     65 inline uint32_t htole32(uint32_t host_32bits)
     66                                  ^
     67./compat/endian.h: In function 'uint32_t __bswap_32(uint32_t)':
     68./compat/endian.h:153:17: error: redefinition of 'uint32_t __bswap_32(uint32_t)'
     69 inline uint32_t be32toh(uint32_t big_endian_32bits)
     70                 ^
     71In file included from /usr/include/endian.h:60:0,
     72                 from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
     73                 from /usr/include/stdlib.h:42,
     74                 from ./crypto/ctaes/ctaes.h:11,
     75                 from crypto/aes.h:11,
     76                 from crypto/aes.cpp:5:
     77/usr/include/x86_64-linux-gnu/bits/byteswap.h:45:1: error: 'unsigned int __bswap_32(unsigned int)' previously defined here
     78 __bswap_32 (unsigned int __bsx)
     79 ^
     80In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
     81                 from /usr/include/stdlib.h:42,
     82                 from ./crypto/ctaes/ctaes.h:11,
     83                 from crypto/aes.h:11,
     84                 from crypto/aes.cpp:5:
     85./compat/endian.h: At global scope:
     86./compat/endian.h:160:34: error: expected ')' before 'little_endian_32bits'
     87 inline uint32_t le32toh(uint32_t little_endian_32bits)
     88                                  ^
     89./compat/endian.h: In function 'uint64_t __bswap_64(uint64_t)':
     90./compat/endian.h:167:17: error: redefinition of 'uint64_t __bswap_64(uint64_t)'
     91 inline uint64_t htobe64(uint64_t host_64bits)
     92                 ^
     93In file included from /usr/include/endian.h:60:0,
     94                 from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
     95                 from /usr/include/stdlib.h:42,
     96                 from ./crypto/ctaes/ctaes.h:11,
     97                 from crypto/aes.h:11,
     98                 from crypto/aes.cpp:5:
     99/usr/include/x86_64-linux-gnu/bits/byteswap.h:109:1: error: '__uint64_t __bswap_64(__uint64_t)' previously defined here
    100 __bswap_64 (__uint64_t __bsx)
    101 ^
    102In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
    103                 from /usr/include/stdlib.h:42,
    104                 from ./crypto/ctaes/ctaes.h:11,
    105                 from crypto/aes.h:11,
    106                 from crypto/aes.cpp:5:
    107./compat/endian.h: At global scope:
    108./compat/endian.h:174:34: error: expected ')' before 'host_64bits'
    109 inline uint64_t htole64(uint64_t host_64bits)
    110                                  ^
    111./compat/endian.h: In function 'uint64_t __bswap_64(uint64_t)':
    112./compat/endian.h:181:17: error: redefinition of 'uint64_t __bswap_64(uint64_t)'
    113 inline uint64_t be64toh(uint64_t big_endian_64bits)
    114                 ^
    115In file included from /usr/include/endian.h:60:0,
    116                 from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64,
    117                 from /usr/include/stdlib.h:42,
    118                 from ./crypto/ctaes/ctaes.h:11,
    119                 from crypto/aes.h:11,
    120                 from crypto/aes.cpp:5:
    121/usr/include/x86_64-linux-gnu/bits/byteswap.h:109:1: error: '__uint64_t __bswap_64(__uint64_t)' previously defined here
    122 __bswap_64 (__uint64_t __bsx)
    123 ^
    124In file included from /usr/include/x86_64-linux-gnu/bits/waitstatus.h:64:0,
    125                 from /usr/include/stdlib.h:42,
    126                 from ./crypto/ctaes/ctaes.h:11,
    127                 from crypto/aes.h:11,
    128                 from crypto/aes.cpp:5:
    129./compat/endian.h: At global scope:
    130./compat/endian.h:188:34: error: expected ')' before 'little_endian_64bits'
    131 inline uint64_t le64toh(uint64_t little_endian_64bits)
    

    Any idea of what can go wrong ?

    0root@2cfc3e946cef:/home/bitcoin/bitcoin# cat /etc/lsb-release
    1DISTRIB_ID=Ubuntu
    2DISTRIB_RELEASE=14.04
    3DISTRIB_CODENAME=trusty
    4DISTRIB_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.

     0user@trusty:~/bitcoin$ cat /etc/lsb-release
     1DISTRIB_ID=Ubuntu
     2DISTRIB_RELEASE=14.04
     3DISTRIB_CODENAME=trusty
     4DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
     5user@trusty:~/bitcoin$ git rev-parse HEAD
     6232508fe0fcb9ab33739a18cde8b0d5bfe4b4676
     7user@trusty:~/bitcoin$ git clean -dfx
     8user@trusty:~/bitcoin$ ./autogen.sh && ./configure --without-gui --disable-zmq --disable-bench --enable-debug --disable-tests --with-incompatible-bdb && make clean && make -j4
     9...
    10make[1]: Entering directory `/home/user/bitcoin/doc/man'
    11make[1]: Nothing to be done for `all'.
    12make[1]: Leaving directory `/home/user/bitcoin/doc/man'
    13make[1]: Entering directory `/home/user/bitcoin'
    14make[1]: Nothing to be done for `all-am'.
    15make[1]: Leaving directory `/home/user/bitcoin'
    16user@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: 2024-07-08 19:13 UTC

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