SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.03k stars 123 forks source link

Error trying to build p2pool 3.6.1 #273

Closed snex closed 10 months ago

snex commented 10 months ago

[ 21%] Built target libminiupnpc-static [ 60%] Built target randomx [ 62%] Linking CXX executable p2pool lto-wrapper: warning: using serial compilation of 24 LTRANS jobs during RTL pass: final /home/snex/p2pool/external/src/cryptonote/crypto-ops.c: In function ‘ge_p2_dbl’: /home/snex/p2pool/external/src/cryptonote/crypto-ops.c:1517:1: internal compiler error: in ix86_print_operand_address_as, at config/i386/i386.c:13598 1517 | } | ^ 0xd13dc1 internal_error(char const, ...) ???:0 0xd0dd9f fancy_abort(char const, int, char const) ???:0 0x114cc5e output_operand(rtx_def, int) ???:0 0x114aa04 output_asm_insn(char const, rtx_def) ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See file:///usr/share/doc/gcc-11/README.Bugs for instructions. lto-wrapper: fatal error: /usr/bin/c++ returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/p2pool.dir/build.make:505: p2pool] Error 1 make[1]: [CMakeFiles/Makefile2:119: CMakeFiles/p2pool.dir/all] Error 2 make: [Makefile:136: all] Error 2

snex commented 10 months ago

I can't seem to build earlier versions anymore either. Seems like there's a problem in the cryptonote lib?

SChernykh commented 10 months ago

internal compiler error: in ix86_print_operand_address_as, at config/i386/i386.c:13598

This is compiler bug, there's no problem in P2Pool source code. What GCC version do you use? I know that GCC 11.4.0 can compile P2Pool without errors.

SChernykh commented 10 months ago

You could try to build P2Pool without LTO: cmake .. -DWITH_LTO=OFF - it's even mentioned in CMakeLists.txt: https://github.com/SChernykh/p2pool/blob/master/CMakeLists.txt#L7

(if linking fails for you, run cmake with -DWITH_LTO=OFF)
snex commented 10 months ago

> gcc --version

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

DWITH-LTO=OFF seemed to do the trick, but I'm not sure why it suddenly started failing as it used to compile fine with no problem. Anyway since that worked, this can probably be closed.

SChernykh commented 10 months ago

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

I've just checked what is used for CI builds with gcc 11, and it's gcc-11 amd64 11.4.0-2ubuntu1~20.04. So this compiler bug was probably fixed in 11.4.0-2