0

The code with inline assembly fails to compile with the solc binaries from soliditylang.org. The same code compiles without issue using Remix or solcjs. Because of this issue I cannot even compile the basic sample project shipped with hardhat. I assume this is not a bug, so what am I missing?

To replicate you can try the following on any linux distro:

curl -O 'https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/utils/Address.sol'
curl -O 'https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.10+commit.fc410830'
chmod +x solc-linux*
./solc-linux-amd64-v0.8.10+commit.fc410830 --bin Address.sol # fails due to inline assembly in the isContract function
solcjs --bin Address.sol # successfully compiles

(Update) This is crazy:

  • Fails to compile code with inline assembly on my pc (fedora 33) and another machine I have (void linux)
  • Compiles when I run the compiler through fedora:33 with docker
  • Fails to compile when I ssh into a cloud instance running fedora 33, but others can compile running the same code on the same remote machine
  • Compiles when I ssh into the same remote cloud instance machine using the aforementioned fedora:33 docker instance
  • Compiles when I ssh into another cloud instance running Debian
1
  • What was the error message?
    – Ismael
    Dec 2, 2021 at 3:53

1 Answer 1

0

Solved. Compiler misbehaves when system locale is set to Turkish. I have submitted a bug report. https://github.com/ethereum/solidity/issues/12350

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 30, 2021 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.