Master doesn't build on OpenBSD (leveldb) #10670

issue laanwj opened this issue on June 26, 2017
  1. laanwj commented at 9:08 AM on June 26, 2017: member

    It looks like OpenBSD's eg++ which is based on 4.9.4 (or rather, the binutils based on 2.17) doesn't support the CRC32 instructions introduced with the recent leveldb upgrade:

    Making all in src
    gmake[1]: Entering directory '/home/user/bitcoin/src'
    gmake[2]: Entering directory '/home/user/bitcoin/src'
    gmake[3]: Entering directory '/home/user/bitcoin'
    gmake[3]: Leaving directory '/home/user/bitcoin'
    eg++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I./leveldb -DOS_OPENBSD -DLEVELDB_ATOMIC_PRESENT -D__STDC_LIMIT_MACROS  -DLEVELDB_PLATFORM_POSIX -I./leveldb/include -I./leveldb/helpers/memenv -DLEVELDB_PLATFORM_POSIX_SSE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all  -fPIE -msse4.2 -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -MT leveldb/port/leveldb_libleveldb_sse42_a-port_posix_sse.o -MD -MP -MF leveldb/port/.deps/leveldb_libleveldb_sse42_a-port_posix_sse.Tpo -c -o leveldb/port/leveldb_libleveldb_sse42_a-port_posix_sse.o `test -f 'leveldb/port/port_posix_sse.cc' || echo './'`leveldb/port/port_posix_sse.cc
    leveldb/port/port_posix_sse.cc: In function 'uint32_t leveldb::port::AcceleratedCRC32C(uint32_t, const char*, size_t)':
    leveldb/port/port_posix_sse.cc:59:15: warning: 'ecx' may be used uninitialized in this function [-Wmaybe-uninitialized]
       return (ecx & (1 << 20)) != 0;
                   ^
    leveldb/port/port_posix_sse.cc:57:26: note: 'ecx' was declared here
       unsigned int eax, ebx, ecx, edx;
                              ^
    /tmp//ccBAimlE.s: Assembler messages:
    /tmp//ccBAimlE.s:95: Error: no such instruction: `crc32b -1(%rbp),%eax'
    /tmp//ccBAimlE.s:121: Error: no such instruction: `crc32q -8(%rbp),%rax'
    /tmp//ccBAimlE.s:148: Error: no such instruction: `crc32b -1(%rbp),%eax'
    :312: Error: no such instruction: `crc32l 0(%rbp),%eax'
    gmake[2]: *** [Makefile:4921: leveldb/port/leveldb_libleveldb_sse42_a-port_posix_sse.o] Error 1
    gmake[2]: Leaving directory '/home/user/bitcoin/src'
    gmake[1]: *** [Makefile:9224: all-recursive] Error 1
    gmake[1]: Leaving directory '/home/user/bitcoin/src'
    gmake: *** [Makefile:738: all-recursive] Error 1
    

    Likely we need to add some check in the build system whether the instruction can be used?

  2. laanwj added the label Build system on Jun 26, 2017
  3. laanwj added this to the milestone 0.15.0 on Jun 26, 2017
  4. janstary commented at 10:27 PM on July 7, 2017: none

    I get the same error on 6.1-current/amd64

  5. theuni commented at 11:21 PM on July 7, 2017: member

    Taking this one. We just need to do a quick compiler check in configure.

  6. theuni assigned theuni on Jul 7, 2017
  7. janstary commented at 12:45 PM on July 8, 2017: none

    Same error on MacOSX 10.6.8 (Intel) as well.

  8. janstary commented at 9:46 AM on July 12, 2017: none

    On the same machine, version 0.14.2 does not have this problem.

  9. laanwj commented at 1:17 PM on July 12, 2017: member

    Yes, the 0.14 branch works fine, this was introduced on master

    On Jul 12, 2017 11:46 AM, "janstary" notifications@github.com wrote:

    On the same machine, version 0.14.2 does not have this problem.

    — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/issues/10670#issuecomment-314712214, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHutu_hboNA6xlxVLNcoFwmo3sR61Y8ks5sNJYKgaJpZM4OFDMO .

  10. laanwj referenced this in commit db825d293b on Jul 14, 2017
  11. laanwj commented at 12:50 PM on July 17, 2017: member

    This was fixed by #10806

  12. laanwj closed this on Jul 17, 2017

  13. sickpig referenced this in commit 2da740663b on Aug 17, 2017
  14. PastaPastaPasta referenced this in commit 1b866be7a9 on Jul 6, 2019
  15. PastaPastaPasta referenced this in commit f96259a74b on Jul 8, 2019
  16. PastaPastaPasta referenced this in commit 33099aa81d on Jul 9, 2019
  17. PastaPastaPasta referenced this in commit 38a51b8348 on Jul 11, 2019
  18. PastaPastaPasta referenced this in commit 546a983988 on Jul 13, 2019
  19. PastaPastaPasta referenced this in commit d529ce0f2d on Jul 17, 2019
  20. PastaPastaPasta referenced this in commit 934210fa76 on Jul 17, 2019
  21. PastaPastaPasta referenced this in commit a0ff957d18 on Jul 18, 2019
  22. barrystyle referenced this in commit 3d993a93c3 on Jan 22, 2020
  23. MarcoFalke 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 15:15 UTC

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