Closed hx507 closed 1 year ago
It appears the new 3.x p2pool no longer builds with NixOS:
<...> <artificial>:(.text+0x76f9): undefined reference to `randomx_get_flags' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x7718): undefined reference to `randomx_create_vm' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x779c): undefined reference to `randomx_vm_set_dataset' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x78d5): undefined reference to `randomx_calculate_hash_next' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x7a14): undefined reference to `randomx_vm_set_cache' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x7c87): undefined reference to `randomx_calculate_hash_first' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x82ce): undefined reference to `randomx_destroy_vm' /nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: <artificial>:(.text+0x834d): undefined reference to `randomx_create_vm' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/p2pool.dir/build.make:486: p2pool] Error 1 make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/p2pool.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
where enabling LTO causes errors in linking.
Hence, disable LTO for when building with Nix.
It appears the new 3.x p2pool no longer builds with NixOS:
where enabling LTO causes errors in linking.
Hence, disable LTO for when building with Nix.