Test with gcc13 #293

Closed
opened 1 year ago by duke · 16 comments
duke commented 1 year ago
Owner
https://gcc.gnu.org/gcc-13/changes.html
Collaborator

And it blows up on gcc (GCC) 13.1.1 20230429 on Artix Linux (would most likely be the same on Arch Linux). Log file is attached.

And it blows up on `gcc (GCC) 13.1.1 20230429` on Artix Linux (would most likely be the same on Arch Linux). Log file is attached.
duke commented 1 year ago
Poster
Owner

@jahway603 looks like it gets pretty far and then gets an error compiling the RandomX tests. You may want to submit this as a bug to RandomX upstream, it's likely they haven't tested on gcc13 yet :

+ cmake -DARCH=native ..
-- The C compiler identification is GNU 13.1.1
-- The CXX compiler identification is GNU 13.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting default build type: Release
-- Performing Test _march=native_cxx
-- Performing Test _march=native_cxx - Success
-- Setting CXX flag -march=native
-- Performing Test _march=native_c
-- Performing Test _march=native_c - Success
-- Setting C flag -march=native
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_CXX_ATOMICS
-- Performing Test HAVE_CXX_ATOMICS - Success
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/build
+ make
[  2%] Building CXX object CMakeFiles/randomx.dir/src/aes_hash.cpp.o
[  5%] Building C object CMakeFiles/randomx.dir/src/argon2_ref.c.o
[  8%] Building C object CMakeFiles/randomx.dir/src/argon2_ssse3.c.o
[ 11%] Building C object CMakeFiles/randomx.dir/src/argon2_avx2.c.o
[ 14%] Building CXX object CMakeFiles/randomx.dir/src/bytecode_machine.cpp.o
[ 17%] Building CXX object CMakeFiles/randomx.dir/src/cpu.cpp.o
[ 20%] Building CXX object CMakeFiles/randomx.dir/src/dataset.cpp.o
[ 23%] Building CXX object CMakeFiles/randomx.dir/src/soft_aes.cpp.o
[ 26%] Building CXX object CMakeFiles/randomx.dir/src/virtual_memory.cpp.o
[ 29%] Building CXX object CMakeFiles/randomx.dir/src/vm_interpreted.cpp.o
[ 32%] Building CXX object CMakeFiles/randomx.dir/src/allocator.cpp.o
[ 35%] Building CXX object CMakeFiles/randomx.dir/src/assembly_generator_x86.cpp.o
[ 38%] Building CXX object CMakeFiles/randomx.dir/src/instruction.cpp.o
[ 41%] Building CXX object CMakeFiles/randomx.dir/src/randomx.cpp.o
[ 44%] Building CXX object CMakeFiles/randomx.dir/src/superscalar.cpp.o
[ 47%] Building CXX object CMakeFiles/randomx.dir/src/vm_compiled.cpp.o
[ 50%] Building CXX object CMakeFiles/randomx.dir/src/vm_interpreted_light.cpp.o
[ 52%] Building C object CMakeFiles/randomx.dir/src/argon2_core.c.o
[ 55%] Building CXX object CMakeFiles/randomx.dir/src/blake2_generator.cpp.o
[ 58%] Building CXX object CMakeFiles/randomx.dir/src/instructions_portable.cpp.o
[ 61%] Building C object CMakeFiles/randomx.dir/src/reciprocal.c.o
[ 64%] Building CXX object CMakeFiles/randomx.dir/src/virtual_machine.cpp.o
[ 67%] Building CXX object CMakeFiles/randomx.dir/src/vm_compiled_light.cpp.o
[ 70%] Building C object CMakeFiles/randomx.dir/src/blake2/blake2b.c.o
[ 73%] Building CXX object CMakeFiles/randomx.dir/src/jit_compiler_x86.cpp.o
[ 76%] Building C object CMakeFiles/randomx.dir/src/jit_compiler_x86_static.S.o
[ 79%] Linking CXX static library librandomx.a
[ 79%] Built target randomx
[ 82%] Building CXX object CMakeFiles/randomx-tests.dir/src/tests/tests.cpp.o
In file included from /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/tests.cpp:7:
/mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/utility.hpp:74:38: error: ‘uint64_t’ has not been declared
   74 | inline void dump(const char* buffer, uint64_t count, const char* name) {
      |                                      ^~~~~~~~
/mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/utility.hpp:99:73: error: ‘uint64_t’ has not been declared
   99 | inline void readUInt64Option(const char* option, int argc, char** argv, uint64_t& out, uint64_t defaultValue) {
      |                                                                         ^~~~~~~~
/mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/utility.hpp:99:88: error: ‘uint64_t’ has not been declared
   99 | inline void readUInt64Option(const char* option, int argc, char** argv, uint64_t& out, uint64_t defaultValue) {
      |                                                                                        ^~~~~~~~
make[2]: *** [CMakeFiles/randomx-tests.dir/build.make:76: CMakeFiles/randomx-tests.dir/src/tests/tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/randomx-tests.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

We may also want to avoid compiling the RandomX tests (which would be a way around this issue for us) because they are never run.

@jahway603 looks like it gets pretty far and then gets an error compiling the RandomX tests. You may want to submit this as a bug to RandomX upstream, it's likely they haven't tested on gcc13 yet : ``` + cmake -DARCH=native .. -- The C compiler identification is GNU 13.1.1 -- The CXX compiler identification is GNU 13.1.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Setting default build type: Release -- Performing Test _march=native_cxx -- Performing Test _march=native_cxx - Success -- Setting CXX flag -march=native -- Performing Test _march=native_c -- Performing Test _march=native_c - Success -- Setting C flag -march=native -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Performing Test HAVE_CXX_ATOMICS -- Performing Test HAVE_CXX_ATOMICS - Success -- Configuring done (0.8s) -- Generating done (0.0s) -- Build files have been written to: /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/build + make [ 2%] Building CXX object CMakeFiles/randomx.dir/src/aes_hash.cpp.o [ 5%] Building C object CMakeFiles/randomx.dir/src/argon2_ref.c.o [ 8%] Building C object CMakeFiles/randomx.dir/src/argon2_ssse3.c.o [ 11%] Building C object CMakeFiles/randomx.dir/src/argon2_avx2.c.o [ 14%] Building CXX object CMakeFiles/randomx.dir/src/bytecode_machine.cpp.o [ 17%] Building CXX object CMakeFiles/randomx.dir/src/cpu.cpp.o [ 20%] Building CXX object CMakeFiles/randomx.dir/src/dataset.cpp.o [ 23%] Building CXX object CMakeFiles/randomx.dir/src/soft_aes.cpp.o [ 26%] Building CXX object CMakeFiles/randomx.dir/src/virtual_memory.cpp.o [ 29%] Building CXX object CMakeFiles/randomx.dir/src/vm_interpreted.cpp.o [ 32%] Building CXX object CMakeFiles/randomx.dir/src/allocator.cpp.o [ 35%] Building CXX object CMakeFiles/randomx.dir/src/assembly_generator_x86.cpp.o [ 38%] Building CXX object CMakeFiles/randomx.dir/src/instruction.cpp.o [ 41%] Building CXX object CMakeFiles/randomx.dir/src/randomx.cpp.o [ 44%] Building CXX object CMakeFiles/randomx.dir/src/superscalar.cpp.o [ 47%] Building CXX object CMakeFiles/randomx.dir/src/vm_compiled.cpp.o [ 50%] Building CXX object CMakeFiles/randomx.dir/src/vm_interpreted_light.cpp.o [ 52%] Building C object CMakeFiles/randomx.dir/src/argon2_core.c.o [ 55%] Building CXX object CMakeFiles/randomx.dir/src/blake2_generator.cpp.o [ 58%] Building CXX object CMakeFiles/randomx.dir/src/instructions_portable.cpp.o [ 61%] Building C object CMakeFiles/randomx.dir/src/reciprocal.c.o [ 64%] Building CXX object CMakeFiles/randomx.dir/src/virtual_machine.cpp.o [ 67%] Building CXX object CMakeFiles/randomx.dir/src/vm_compiled_light.cpp.o [ 70%] Building C object CMakeFiles/randomx.dir/src/blake2/blake2b.c.o [ 73%] Building CXX object CMakeFiles/randomx.dir/src/jit_compiler_x86.cpp.o [ 76%] Building C object CMakeFiles/randomx.dir/src/jit_compiler_x86_static.S.o [ 79%] Linking CXX static library librandomx.a [ 79%] Built target randomx [ 82%] Building CXX object CMakeFiles/randomx-tests.dir/src/tests/tests.cpp.o In file included from /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/tests.cpp:7: /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/utility.hpp:74:38: error: ‘uint64_t’ has not been declared 74 | inline void dump(const char* buffer, uint64_t count, const char* name) { | ^~~~~~~~ /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/utility.hpp:99:73: error: ‘uint64_t’ has not been declared 99 | inline void readUInt64Option(const char* option, int argc, char** argv, uint64_t& out, uint64_t defaultValue) { | ^~~~~~~~ /mnt/mech/mech_ext/dev/gcc13-test/hush3/src/RandomX/src/tests/utility.hpp:99:88: error: ‘uint64_t’ has not been declared 99 | inline void readUInt64Option(const char* option, int argc, char** argv, uint64_t& out, uint64_t defaultValue) { | ^~~~~~~~ make[2]: *** [CMakeFiles/randomx-tests.dir/build.make:76: CMakeFiles/randomx-tests.dir/src/tests/tests.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/randomx-tests.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ``` We may also want to avoid compiling the RandomX tests (which would be a way around this issue for us) because they are never run.
Collaborator

Where are the RandomX tests in the code so I can disable to test?
Made new gcc13 branch test this.

Where are the RandomX tests in the code so I can disable to test? Made [new gcc13 branch](https://git.hush.is/hush/hush3/src/branch/gcc13) test this.
duke commented 1 year ago
Poster
Owner

@jahway603 have you read the RandomX docs and/or source code to see if there is a way to not compile the tests? Also, have you reported this bug to RandomX devs? It's best if they fix the bug in their own repo.

@jahway603 have you read the RandomX docs and/or source code to see if there is a way to not compile the tests? Also, have you reported this bug to RandomX devs? It's best if they fix the bug in their own repo.
Collaborator

@duke I'm unable to find how to disable the RandomX tests. I have filed Issue https://github.com/tevador/RandomX/issues/267 with the RandomX devs.

@duke I'm unable to find how to disable the RandomX tests. I have filed Issue https://github.com/tevador/RandomX/issues/267 with the RandomX devs.
Poster
Owner

They have fixed their code. We should update to the latest version of the RandomX code.

They have fixed their code. We should update to the latest version of the RandomX code.
Collaborator

I see they fixed their code in https://github.com/tevador/RandomX/pull/268, but I don't how to update our code to the latest RandomX version.

I see they fixed their code in https://github.com/tevador/RandomX/pull/268, but I don't how to update our code to the latest RandomX version.
Poster
Owner

@jahway603 on the dev branch, copy their source code into the src/RandomX subdirectory of the hush3 git repo, then commit the result. We should write docs for this somewhere. This will likely pull in other changes but we likely want those as well. Also, in theory, their code changes should not cause consensus changes, but it's an extremely good idea to verify that by making sure their latest code is still able to mine blocks on DRGX mainnet.

@jahway603 on the dev branch, copy their source code into the src/RandomX subdirectory of the hush3 git repo, then commit the result. We should write docs for this somewhere. This will likely pull in other changes but we likely want those as well. Also, in theory, their code changes should not cause consensus changes, but it's an extremely good idea to verify that by making sure their latest code is still able to mine blocks on DRGX mainnet.
Poster
Owner

@jahway603 also, please document the commit id of RandomX that is being used in the commit message, similar to 36140a5457 . Also, looking at that commit reminded me that I removed the audits/ subdirectory of RandomX because it contains many large files we don't need.

@jahway603 also, please document the commit id of RandomX that is being used in the commit message, similar to 36140a5457067cfb1cf2ae20085d6a15c30d0654 . Also, looking at that commit reminded me that I removed the audits/ subdirectory of RandomX because it contains many large files we don't need.
Collaborator

I've attempted building hushd with just the one line change from upstream in the dev branch, and it failed. Log will be in a different repo.

I then attempted building hushd with other changes from upstream, including the recent one changed line in the gcc13 branch, and it failed. Log will be in a different repo.

I've attempted building hushd with [just the one line change from upstream](https://github.com/tevador/RandomX/commit/43db7e290e33da122777dc04e411648507db44ab) in the dev branch, and it failed. Log will be in a different repo. I then attempted building hushd with [other changes from upstream, including the recent one changed line](https://git.hush.is/hush/hush3/commits/branch/gcc13) in the gcc13 branch, and it failed. Log will be in a different repo.
Collaborator

Hushd now successfully builds with gcc13 as per commit 121ec4b9d4

What's next for testing this?

Hushd now successfully builds with gcc13 as per commit https://git.hush.is/hush/hush3/commit/121ec4b9d43b8a122141499496fbea5409d425d4 What's next for testing this?
Poster
Owner

@jahway603 making sure that a dragonx full node can stay in sync and mine a block on the latest dev code

@jahway603 making sure that a dragonx full node can stay in sync and mine a block on the latest dev code
Poster
Owner

@jahway603 have you been able to test randomx mining on the latest dev code? If not, maybe ask the community and outsource the testing

@jahway603 have you been able to test randomx mining on the latest dev code? If not, maybe ask the community and outsource the testing
duke added the
build
label 11 months ago
Collaborator

@duke I have not been able to do further testing. I'm the only person I know with gcc13 on any OSes.

@duke I have not been able to do further testing. I'm the only person I know with gcc13 on any OSes.
Poster
Owner

@jahway603 you can compile a new binary on the dev branch and then get others to test it. We want to test the new dev branch with dragonx mining, testing it on gcc13 is optional

@jahway603 you can compile a new binary on the dev branch and then get others to test it. We want to test the new dev branch with dragonx mining, testing it on gcc13 is optional
Poster
Owner

I am actually going to close this issue, since it's no longer about gcc13, it's about making sure the new dev branch is still compatible with dragonx mainnet. I will make a new issue for that

I am actually going to close this issue, since it's no longer about gcc13, it's about making sure the new dev branch is still compatible with dragonx mainnet. I will make a new issue for that
duke closed this issue 11 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.