eosio.cdt icon indicating copy to clipboard operation
eosio.cdt copied to clipboard

cdt1.8.1 compile issue

Open crazybits opened this issue 3 years ago • 5 comments

error encountered when compile the contracts with cdt 1.8.1, any idea?

/usr/local/Cellar/eosio.cdt/1.8.1/opt/eosio.cdt/bin/../include/boost/pfr/detail/core17_generated.hpp:38:9: error: type 'swaps_row' decomposes into 2 elements, but only 1 names were provided auto& [a] = val; ^ /usr/local/Cellar/eosio.cdt/1.8.1/opt/eosio.cdt/bin/../include/boost/pfr/detail/core17_generated.hpp:1032:30: note: in instantiation of function template specialization 'boost::pfr::detail::tie_as_tuple<swaps_row>' requested here return boost::pfr::detail::tie_as_tuple(val, fields_count_tag{});

crazybits avatar Aug 01 '21 10:08 crazybits

Hi crazybits,

Some more info would be helpful.

  1. This looks like MacOS. Is it 10.14, 10.15, or 11.x (BigSur) ?
  2. This looks like a Boost error, could you determine the Boost version? Should be able to do this by looking at the output of cat /usr/local/include/boost/version.hpp ?
  3. Are are these the eosio.contracts in https://github.com/EOSIO/eosio.contracts ?

praphael avatar Aug 02 '21 17:08 praphael

Hi crazybits,

Some more info would be helpful.

  1. This looks like MacOS. Is it 10.14, 10.15, or 11.x (BigSur) ?
  2. This looks like a Boost error, could you determine the Boost version? Should be able to do this by looking at the output of cat /usr/local/include/boost/version.hpp ?
  3. Are are these the eosio.contracts in https://github.com/EOSIO/eosio.contracts ?
  1. MacOS Catalina(10.15.7)
  2. boost version is 1.73
  3. it is my own contract, compiled with cdt 1.71 without error before.

crazybits avatar Aug 05 '21 15:08 crazybits

@crazybits Have you tried building CDT in Linux (or Linux docker) and then compile your contract?

bogniq avatar Sep 17 '21 15:09 bogniq

Hello! I have kinda the same issue when compiling a contract

/usr/opt/eosio.cdt/1.8.1/bin/../include/boost/pfr/detail/core17_generated.hpp:38:9: error: type 'info' decomposes into 7 elements, but only 1 names were provided
  auto& [a] = val;

But it compiles fine when compiled with cdt 1.7.1

Any updates on that?

tlacloc avatar Dec 13 '21 19:12 tlacloc

@tlacloc Could you share the contract code so the issue can be reproduced?

bogniq avatar Dec 13 '21 20:12 bogniq