Skip to content

Permission +x and fix qt-5.9 archive address#1

Open
younicoin wants to merge 2 commits intomaxeteristy:mainfrom
younicoin:main
Open

Permission +x and fix qt-5.9 archive address#1
younicoin wants to merge 2 commits intomaxeteristy:mainfrom
younicoin:main

Conversation

@younicoin
Copy link
Copy Markdown

Run of cd depends; make gives error 404

  curl: (22) The requested URL returned error: 404
  Fetching qtbase-opensource-src-5.9.6.tar.xz from https://download.qt.io/archive/qt/5.9/5.9.6/submodules
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   196    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  curl: (22) The requested URL returned error: 404
  Fetching qtbase-opensource-src-5.9.6.tar.xz from https://bitcoincore.org/depends-sources
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0  264k    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  curl: (22) The requested URL returned error: 404
  make: *** [funcs.mk:247: /maxeter-1.14.23.1/depends/sources/download-stamps/.stamp_fetched-qt-qtbase-opensource-src-5.9.6.tar.xz.hash] Error 22

So my commit fiz qt-5.9 archive address. And also change permissions to autogen.sh and depends/config.{guesss,sub} for build on linux.

@younicoin
Copy link
Copy Markdown
Author

younicoin commented Dec 31, 2023

Also had this problem on Linux 6, gcc 12:

  In file included from ./script/script.h:11:
  ./serialize.h: In instantiation of ‘constexpr CheckVarIntMode<Mode, I>::CheckVarIntMode() [with VarIntMode Mode = VarIntMode::NONNEGATIVE_SIGNED; I = unsigned int]’:
  ./serialize.h:393:5:   required from ‘void WriteVarInt(Stream&, I) [with Stream = CAutoFile; VarIntMode Mode = VarIntMode::NONNEGATIVE_SIGNED; I = unsigned int]’
  ./serialize.h:604:35:   required from ‘void CVarInt<Mode, I>::Serialize(Stream&) const [with Stream = CAutoFile; VarIntMode Mode = VarIntMode::NONNEGATIVE_SIGNED; I = unsigned int]’
  ./serialize.h:784:16:   required from ‘void Serialize(Stream&, const T&) [with Stream = CAutoFile; T = CVarInt<VarIntMode::NONNEGATIVE_SIGNED, unsigned int>; typename std::enable_if<std::is_class<T>::value>::type* <anonymous> = 0]’
  ./undo.h:29:20:   required from ‘void TxInUndoSerializer::Serialize(Stream&) const [with Stream = CAutoFile]’
  ./serialize.h:784:16:   required from ‘void Serialize(Stream&, const T&) [with Stream = CAutoFile; T = TxInUndoSerializer; typename std::enable_if<std::is_class<T>::value>::type* <anonymous> = 0]’
  ./undo.h:79:24:   [ skipping 5 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
  ./serialize.h:1305:20:   required from ‘void SerReadWriteMany(Stream&, CSerActionSerialize, const Args& ...) [with Stream = CAutoFile; Args = {std::vector<CTxUndo, std::allocator<CTxUndo> >}]’
  ./undo.h:108:9:   required from ‘void CBlockUndo::SerializationOp(Stream&, Operation) [with Stream = CAutoFile; Operation = CSerActionSerialize]’
  ./undo.h:104:5:   required from ‘void CBlockUndo::Serialize(Stream&) const [with Stream = CAutoFile]’
  ./serialize.h:784:16:   required from ‘void Serialize(Stream&, const T&) [with Stream = CAutoFile; T = CBlockUndo; typename std::enable_if<std::is_class<T>::value>::type* <anonymous> = 0]’
  ./streams.h:665:20:   required from ‘CAutoFile& CAutoFile::operator<<(const T&) [with T = CBlockUndo]’
  validation.cpp:1594:16:   required from here
  ./serialize.h:369:62: error: static assertion failed: Signed type required with mode NONNEGATIVE_SIGNED.
    369 |         static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
        |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
  ./serialize.h:369:62: note: ‘((VarIntMode::NONNEGATIVE_SIGNED != VarIntMode::NONNEGATIVE_SIGNED) || ((bool)std::integral_constant<bool, false>::value))’ evaluates to false

I looked at line 29 in src/undo.h
::Serialize(s, VARINT(txout->nHeight * 2 + (txout->fCoinBase ? 1 : 0), VarIntMode::NONNEGATIVE_SIGNED));
And this call is not right, because variable is unsigned int and with this need to use Mode=DEFAULT.
This is why I edited:
vim src/undo.h

  29:      //::Serialize(s, VARINT(txout->nHeight * 2 + (txout->fCoinBase ? 1 : 0), VarIntMode::NONNEGATIVE_SIGNED));
           ::Serialize(s, VARINT(txout->nHeight * 2 + (txout->fCoinBase ? 1 : 0), VarIntMode::DEFAULT));

With VarIntMode::DEFAULT compiled fine!
Also added chmod +x share/genbuild.sh

Could you accept this commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant