namecoin / namecoin-core

Namecoin full node + wallet based on the current Bitcoin Core codebase.
https://www.namecoin.org/
MIT License
461 stars 147 forks source link

CI fails because of issues with params.h, pureheader.h, script.h #423

Open yanmaani opened 3 years ago

yanmaani commented 3 years ago

Looks like it's mostly typos in the documentation? But the CI fails nevertheless:

/usr/bin/ccache clang++ -stdlib=libc++ -std=c++17 -DHAVE_CONFIG_H -I. -I../src/config  -fmacro-prefix-map=/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-pc-linux-gnu/src=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./secp256k1/include  -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -isystem /tmp/cirrus-ci-build/depends/x86_64-pc-linux-gnu/include -I./leveldb/include -I./leveldb/helpers/memenv -I./univalue/include -I/tmp/cirrus-ci-build/depends/x86_64-pc-linux-gnu/include/ -DARENA_DEBUG -DDEBUG_LOCKORDER -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DPROVIDE_FUZZ_MAIN_FUNCTION -fdebug-prefix-map=/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-pc-linux-gnu/src=. -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection   -Werror=gnu -Werror=vla -Werror=shadow-field -Werror=switch -Werror=thread-safety -Werror=range-loop-analysis -Werror=unused-variable -Werror=date-time -Werror=return-type -Werror=conditional-uninitialized -Werror=sign-compare -Werror=suggest-override -Werror=unreachable-code-loop-increment -Werror=mismatched-tags -Werror=documentation  -fsanitize=thread -fPIE -pipe -O2 -g -c -o namecoind-bitcoind.o `test -f 'bitcoind.cpp' || echo './'`bitcoind.cpp
In file included from bitcoind.cpp:10:
In file included from ./chainparams.h:10:
./consensus/params.h:40:14: error: 'NameExpirationDepth' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
    unsigned NameExpirationDepth(unsigned nHeight) const
             ^
./consensus/params.h:29:22: note: overridden virtual function is here
    virtual unsigned NameExpirationDepth(unsigned nHeight) const = 0;
                     ^
./consensus/params.h:54:13: error: 'MinNameCoinAmount' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
    CAmount MinNameCoinAmount(unsigned nHeight) const
            ^
./consensus/params.h:32:21: note: overridden virtual function is here
    virtual CAmount MinNameCoinAmount(unsigned nHeight) const = 0;
                    ^
./consensus/params.h:68:13: error: 'MinNameCoinAmount' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
    CAmount MinNameCoinAmount(unsigned) const
            ^
./consensus/params.h:54:13: note: overridden virtual function is here
    CAmount MinNameCoinAmount(unsigned nHeight) const
            ^
./consensus/params.h:79:14: error: 'NameExpirationDepth' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override]
    unsigned NameExpirationDepth (unsigned nHeight) const
             ^
./consensus/params.h:40:14: note: overridden virtual function is here
    unsigned NameExpirationDepth(unsigned nHeight) const
             ^
In file included from bitcoind.cpp:10:
In file included from ./chainparams.h:11:
In file included from ./primitives/block.h:9:
In file included from ./auxpow.h:11:
./primitives/pureheader.h:106:15: error: parameter 'ch' not found in the function declaration [-Werror,-Wdocumentation]
     * @param ch The chain ID to set.
              ^~
./primitives/pureheader.h:106:15: note: did you mean 'chainId'?
     * @param ch The chain ID to set.
              ^~
              chainId
In file included from bitcoind.cpp:10:
In file included from ./chainparams.h:11:
In file included from ./primitives/block.h:9:
In file included from ./auxpow.h:12:
In file included from ./primitives/transaction.h:11:
./script/script.h:535:15: error: parameter 'allowName' not found in the function declaration [-Werror,-Wdocumentation]
     * @param allowName Strip name scripts before checking?
              ^~~~~~~~~
./script/script.h:535:15: note: did you mean 'allowNames'?
     * @param allowName Strip name scripts before checking?
              ^~~~~~~~~
              allowNames
6 errors generated.
make[2]: *** [Makefile:12578: namecoind-bitcoind.o] Error 1
make[2]: Leaving directory '/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-pc-linux-gnu/src'
make[1]: *** [Makefile:15673: install-recursive] Error 1
make[1]: Leaving directory '/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-pc-linux-gnu/src'
make: *** [Makefile:820: install-recursive] Error 1
domob1812 commented 3 years ago

Seems like more strict warnings used than on my build system (where there are none or I would fix them already). Will check it out, should be easy to fix.

domob1812 commented 3 years ago

Fixed in cd9d30acbc6c9ca7a641c1ea9044f84b19cd9097 and 2694b7038cf1a42d9868435320fd820afe592aec. Feel free to reopen the issue if some errors remain.

yanmaani commented 3 years ago

Yeah, this seems to be more of the same:

Making all in src
make[1]: Entering directory '/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src'
make[2]: Entering directory '/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src'
/usr/bin/ccache env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/native/bin/clang++ --target=x86_64-apple-darwin18 -mmacosx-version-min=10.14 -B/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/native/bin -mlinker-version=609 -isysroot/tmp/cirrus-ci-build/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers -stdlib=libc++ -stdlib++-isystem/tmp/cirrus-ci-build/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -Xclang -internal-externc-isystem/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/native/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/tmp/cirrus-ci-build/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers/usr/include -std=c++17 -DHAVE_CONFIG_H -I. -I../src/config  -fmacro-prefix-map=/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./secp256k1/include  -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -isystem /tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/include -I./leveldb/include -I./leveldb/helpers/memenv -I./univalue/include -I/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -DPROVIDE_FUZZ_MAIN_FUNCTION -fdebug-prefix-map=/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src=. -Wstack-protector -fstack-protector-all -fcf-protection=full   -Werror=gnu -Werror=vla -Werror=shadow-field -Werror=switch -Werror=thread-safety -Werror=range-loop-analysis -Werror=unused-variable -Werror=date-time -Werror=return-type -Werror=conditional-uninitialized -Werror=sign-compare -Werror=unreachable-code-loop-increment -Werror=mismatched-tags -Werror=documentation    -pipe -O2  -fvisibility=hidden -c -o init/namecoind-bitcoind.o `test -f 'init/bitcoind.cpp' || echo './'`init/bitcoind.cpp
/usr/bin/ccache env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/native/bin/clang++ --target=x86_64-apple-darwin18 -mmacosx-version-min=10.14 -B/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/native/bin -mlinker-version=609 -isysroot/tmp/cirrus-ci-build/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers -stdlib=libc++ -stdlib++-isystem/tmp/cirrus-ci-build/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -Xclang -internal-externc-isystem/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/native/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/tmp/cirrus-ci-build/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers/usr/include -std=c++17 -DHAVE_CONFIG_H -I. -I../src/config  -fmacro-prefix-map=/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./secp256k1/include  -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -isystem /tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/include -I./leveldb/include -I./leveldb/helpers/memenv -I./univalue/include   -isystem /tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/include -D_THREAD_SAFE -I/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/include -I/tmp/cirrus-ci-build/depends/x86_64-apple-darwin18/include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -DPROVIDE_FUZZ_MAIN_FUNCTION -fdebug-prefix-map=/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src=. -Wstack-protector -fstack-protector-all -fcf-protection=full   -Werror=gnu -Werror=vla -Werror=shadow-field -Werror=switch -Werror=thread-safety -Werror=range-loop-analysis -Werror=unused-variable -Werror=date-time -Werror=return-type -Werror=conditional-uninitialized -Werror=sign-compare -Werror=unreachable-code-loop-increment -Werror=mismatched-tags -Werror=documentation    -pipe -O2  -fvisibility=hidden -c -o libbitcoin_server_a-blockencodings.o `test -f 'blockencodings.cpp' || echo './'`blockencodings.cpp
In file included from blockencodings.cpp:13:
In file included from ./txmempool.h:18:
In file included from ./coins.h:12:
./names/common.h:219:13: error: parameter 'start' not found in the function declaration [-Werror,-Wdocumentation]
   * @param start The name to seek to.
            ^~~~~
./names/common.h:219:13: note: did you mean 'name'?
   * @param start The name to seek to.
            ^~~~~
            name
In file included from blockencodings.cpp:13:
./txmempool.h:799:9: error: calling function 'AssertLockHeldInternal<AnnotatedMixin<std::__1::recursive_mutex> >' requires holding mutex 'cs' exclusively [-Werror,-Wthread-safety-analysis]
        AssertLockHeld(cs);
        ^
./sync.h:81:28: note: expanded from macro 'AssertLockHeld'
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
                           ^
In file included from blockencodings.cpp:13:
./txmempool.h:806:9: error: calling function 'AssertLockHeldInternal<AnnotatedMixin<std::__1::recursive_mutex> >' requires holding mutex 'cs' exclusively [-Werror,-Wthread-safety-analysis]
        AssertLockHeld(cs);
        ^
./sync.h:81:28: note: expanded from macro 'AssertLockHeld'
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
                           ^
In file included from blockencodings.cpp:13:
./txmempool.h:813:9: error: calling function 'AssertLockHeldInternal<AnnotatedMixin<std::__1::recursive_mutex> >' requires holding mutex 'cs' exclusively [-Werror,-Wthread-safety-analysis]
        AssertLockHeld(cs);
        ^
./sync.h:81:28: note: expanded from macro 'AssertLockHeld'
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
                           ^
In file included from blockencodings.cpp:13:
./txmempool.h:820:9: error: calling function 'AssertLockHeldInternal<AnnotatedMixin<std::__1::recursive_mutex> >' requires holding mutex 'cs' exclusively [-Werror,-Wthread-safety-analysis]
        AssertLockHeld(cs);
        ^
./sync.h:81:28: note: expanded from macro 'AssertLockHeld'
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
                           ^
In file included from blockencodings.cpp:13:
./txmempool.h:834:9: error: calling function 'AssertLockHeldInternal<AnnotatedMixin<std::__1::recursive_mutex> >' requires holding mutex 'cs' exclusively [-Werror,-Wthread-safety-analysis]
        AssertLockHeld(cs);
        ^
./sync.h:81:28: note: expanded from macro 'AssertLockHeld'
#define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
                           ^
6 errors generated.
make[2]: *** [Makefile:8923: libbitcoin_server_a-blockencodings.o] Error 1
make[2]: Leaving directory '/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src'
make[1]: *** [Makefile:16207: all-recursive] Error 1
make[1]: Leaving directory '/tmp/cirrus-ci-build/ci/scratch/build/namecoin-x86_64-apple-darwin18/src'
make: *** [Makefile:818: all-recursive] Error 1

https://github.com/namecoin/namecoin-core/pull/431/checks?check_run_id=2566548200 https://cirrus-ci.com/task/4525725966401536

domob1812 commented 3 years ago

Some more fixes committed in ffd75a402a2387ffd77376f77af31825c0744b65. I'll leave this open for now, in case more warnings show up.

yanmaani commented 3 years ago

Some more:

./names/main.h:108:11: error: parameter 'height' not found in the function declaration [-Werror,-Wdocumentation]
 * @param height The new block height.
          ^~~~~~
./names/main.h:108:11: note: did you mean 'nHeight'?
 * @param height The new block height.
          ^~~~~~
          nHeight
1 error generated.
domob1812 commented 3 years ago

Fixed the above in today's upstream merges (d42521bf1364dac0efa6b38b1355dd13a8298207).