Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solc: 0.6.8 -> 0.7.4 #101873

Merged
merged 1 commit into from Nov 6, 2020
Merged

solc: 0.6.8 -> 0.7.4 #101873

merged 1 commit into from Nov 6, 2020

Conversation

@fare
Copy link
Contributor

@fare fare commented Oct 27, 2020

Motivation for this change

Current package 0.6.8 doesn't build anymore, so updating it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Oct 27, 2020

Run on darwin:

Result of nixpkgs-review pr 101873 1

3 packages failed to build:
  • python37Packages.slither-analyzer
  • slither-analyzer (python38Packages.slither-analyzer)
  • solc
[ 10%] Building CXX object liblangutil/CMakeFiles/langutil.dir/SourceReferenceFormatter.cpp.o                                                                                               /private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-solc-0.7.4.drv-0/source/libsmtutil/CVC4Interface.cpp:237:24: error: call to constructor of 'CVC4::BitVector' is ambiguous                                        m_context.mkConst(CVC4::BitVector(1, size_t(0)))
                                                          ^               ~~~~~~~~~~~~
/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:47:3: note: candidate constructor
  BitVector(unsigned size, uint32_t z) : d_size(size), d_value(z)
  ^
/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:59:3: note: candidate constructor
  BitVector(unsigned size, uint64_t z) : d_size(size), d_value(z)
  ^
/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:33:3: note: candidate constructor
  BitVector(unsigned size, const Integer& val)
  ^
/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:64:3: note: candidate constructor
  BitVector(unsigned size, const BitVector& q)
  ^
1 error generated.
make[2]: *** [libsmtutil/CMakeFiles/smtutil.dir/build.make:160: libsmtutil/CMakeFiles/smtutil.dir/CVC4Interface.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:518: libsmtutil/CMakeFiles/smtutil.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 11%] Building CXX object liblangutil/CMakeFiles/langutil.dir/SourceReferenceFormatterHuman.cpp.o
[ 11%] Building CXX object liblangutil/CMakeFiles/langutil.dir/Token.cpp.o
[ 12%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/ControlFlowGraph.cpp.o
[ 12%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/ExpressionClasses.cpp.o
[ 12%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/GasMeter.cpp.o
[ 12%] Linking CXX static library liblangutil.a
[ 12%] Built target langutil
[ 12%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/Instruction.cpp.o
[ 13%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/JumpdestRemover.cpp.o
[ 13%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/KnownState.cpp.o
[ 13%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/LinkerObject.cpp.o
[ 13%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/PathGasMeter.cpp.o
[ 14%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/PeepholeOptimiser.cpp.o
[ 14%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/SemanticInformation.cpp.o
[ 14%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/SimplificationRules.cpp.o
[ 14%] Linking CXX static library libevmasm.a
[ 14%] Built target evmasm
make: *** [Makefile:149: all] Error 2

@fare
Copy link
Contributor Author

@fare fare commented Oct 28, 2020

I don't have Darwin and can't test. It's possible that some change in the latest solc release breaks on clang. Can you give more context for the error?

@fare
Copy link
Contributor Author

@fare fare commented Oct 28, 2020

In any case, this seems to be an improvement over 0.6.8 that doesn't currently build.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Oct 31, 2020

I don't have Darwin and can't test. It's possible that some change in the latest solc release breaks on clang. Can you give more context for the error?

Here is the complete log. I think this is an upstream issue:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/ifhns81w4zqwbk7v4b6gl5h1dw3kamap-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
substituteStream(): WARNING: pattern 'https://github.com/open-source-parsers/jsoncpp/archive/1.9.4.tar.gz' doesn't match anything in file 'cmake/jsoncpp.cmake'
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/share/doc/solidity -DCMAKE_INSTALL_INFODIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/include -DCMAKE_INSTALL_SBINDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/1h9ivag16gyysxjgfwq5dfk8w6g246g7-cctools-binutils-darwin-949.0.1/bin/strip -DCMAKE_RANLIB=/nix/store/1h9ivag16gyysxjgfwq5dfk8w6g246g7-cctools-binutils-darwin-949.0.1/bin/ranlib -DCMAKE_AR=/nix/store/1h9ivag16gyysxjgfwq5dfk8w6g246g7-cctools-binutils-darwin-949.0.1/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/m0c86vpflqbadzlvwn5r2adm9yy5qjgg-solc-0.7.4 -DBoost_USE_STATIC_LIBS=OFF 
-- The C compiler identification is Clang 7.1.0
-- The CXX compiler identification is Clang 7.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/gkcr1p2x0psdc31bavmqbfb2nwq0d6jn-clang-wrapper-7.1.0/bin/clang - 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: /nix/store/gkcr1p2x0psdc31bavmqbfb2nwq0d6jn-clang-wrapper-7.1.0/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Found Boost headers in 
-- Found Boost::filesystem at /nix/store/5c1l3jplzwcs0k6adqvlksk46i62c8gi-boost-1.69.0/lib/libboost_filesystem.dylib
-- Found Boost::unit_test_framework at /nix/store/5c1l3jplzwcs0k6adqvlksk46i62c8gi-boost-1.69.0/lib/libboost_unit_test_framework.dylib
-- Found Boost::program_options at /nix/store/5c1l3jplzwcs0k6adqvlksk46i62c8gi-boost-1.69.0/lib/libboost_program_options.dylib
-- Found Boost::system at /nix/store/5c1l3jplzwcs0k6adqvlksk46i62c8gi-boost-1.69.0/lib/libboost_system.dylib
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test fstack-protector-strong
-- Performing Test fstack-protector-strong - Success
-- Performing Test Wimplicit-fallthrough
-- Performing Test Wimplicit-fallthrough - Success
-- Performing Test fmacro-prefix-map=/tmp/nix-build-solc-0.7.4.drv-0/source=/solidity
-- Performing Test fmacro-prefix-map=/tmp/nix-build-solc-0.7.4.drv-0/source=/solidity - Failed
-- Performing Test Wpessimizing-move
-- Performing Test Wpessimizing-move - Success
-- Performing Test Wredundant-move
-- Performing Test Wredundant-move - Success

------------------------------------------------------------------------
-- Configuring solidity 0.7.4
------------------------------------------------------------------------
--                  CMake Version                            3.18.2
-- CMAKE_BUILD_TYPE Build type                               Release
-- TARGET_PLATFORM  Target platform                          Darwin
--------------------------------------------------------------- features
-- COVERAGE         Coverage support                         OFF
------------------------------------------------------------- components
-- TESTS            Build tests                              ON
------------------------------------------------------------------ flags
-- OSSFUZZ                                                   OFF
------------------------------------------------------------------------

-- Found Z3: /nix/store/y41zz0d18sb2hk4wk7gqjjy8g7byqb8p-z3-4.8.9-lib/lib/libz3.dylib (found suitable version "4.8.9", minimum required is "4.6.0") 
Z3 SMT solver found. This enables optional SMT checking with Z3.
CVC4 SMT solver found. This enables optional SMT checking with CVC4.
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_POLICY_DEFAULT_CMP0025


-- Build files have been written to: /tmp/nix-build-solc-0.7.4.drv-0/source/build
cmake: enabled parallel building
@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j4 -l4 SHELL=/nix/store/8i9kyqfxhk2s9dzx32x0sgdk7kyx9wjc-bash-4.4-p23/bin/bash
�[35m�[1mScanning dependencies of target jsoncpp-project�[0m
�[35m�[1mScanning dependencies of target evmc_loader�[0m
�[35m�[1mScanning dependencies of target solidity_BuildInfo.h�[0m
[  1%] �[34m�[1mCreating directories for 'jsoncpp-project'�[0m
[  2%] �[32mBuilding C object test/evmc/CMakeFiles/evmc_loader.dir/loader.c.o�[0m
[  2%] Built target solidity_BuildInfo.h
[  2%] �[32m�[1mLinking C static library libevmc_loader.a�[0m
[  2%] Built target evmc_loader
[  2%] �[34m�[1mPerforming download step (download, verify and extract) for 'jsoncpp-project'�[0m
-- verifying file...
       file='/tmp/nix-build-solc-0.7.4.drv-0/source/deps/downloads/jsoncpp-1.9.3.tar.gz'
-- File already exists and hash match (skip download):
  file='/tmp/nix-build-solc-0.7.4.drv-0/source/deps/downloads/jsoncpp-1.9.3.tar.gz'
  SHA256='8593c1d69e703563d94d8c12244e2e18893eeb9a8a9f8aa3d09a327aa45c8f7d'
-- extracting...
     src='/tmp/nix-build-solc-0.7.4.drv-0/source/deps/downloads/jsoncpp-1.9.3.tar.gz'
     dst='/tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/src/jsoncpp-project'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[  2%] �[34m�[1mNo update step for 'jsoncpp-project'�[0m
[  2%] �[34m�[1mNo patch step for 'jsoncpp-project'�[0m
[  3%] �[34m�[1mPerforming configure step for 'jsoncpp-project'�[0m
-- The CXX compiler identification is Clang 7.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/gkcr1p2x0psdc31bavmqbfb2nwq0d6jn-clang-wrapper-7.1.0/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- JsonCpp Version: 1.9.3
-- Looking for C++ include clocale
-- Looking for C++ include clocale - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of lconv
-- Check size of lconv - done
-- Performing Test HAVE_DECIMAL_POINT
-- Performing Test HAVE_DECIMAL_POINT - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/src/jsoncpp-project-build
[  3%] �[34m�[1mPerforming build step for 'jsoncpp-project'�[0m
�[35m�[1mScanning dependencies of target jsoncpp_lib�[0m
[ 25%] �[32mBuilding CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_value.cpp.o�[0m
[ 50%] �[32mBuilding CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_writer.cpp.o�[0m
[ 75%] �[32mBuilding CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_reader.cpp.o�[0m
[100%] �[32m�[1mLinking CXX static library ../../lib/libjsoncpp.a�[0m
[100%] Built target jsoncpp_lib
[  3%] �[34m�[1mPerforming install step for 'jsoncpp-project'�[0m
[100%] Built target jsoncpp_lib
�[36mInstall the project...�[0m
-- Install configuration: "Release"
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/lib/cmake/jsoncpp/jsoncppConfig.cmake
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/lib/cmake/jsoncpp/jsoncppConfig-release.cmake
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/lib/cmake/jsoncpp/jsoncppConfigVersion.cmake
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/lib/libjsoncpp.a
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/allocator.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/assertions.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/config.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/forwards.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/json.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/json_features.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/reader.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/value.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/version.h
-- Installing: /tmp/nix-build-solc-0.7.4.drv-0/source/build/deps/include/json/writer.h
[  3%] �[34m�[1mCompleted 'jsoncpp-project'�[0m
[  3%] Built target jsoncpp-project
�[35m�[1mScanning dependencies of target solutil�[0m
[  3%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/IndentedWriter.cpp.o�[0m
[  3%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/CommonData.cpp.o�[0m
[  3%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/CommonIO.cpp.o�[0m
[  4%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/Exceptions.cpp.o�[0m
[  4%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/IpfsHash.cpp.o�[0m
[  4%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/JSON.cpp.o�[0m
[  5%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/Keccak256.cpp.o�[0m
[  5%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/StringUtils.cpp.o�[0m
[  5%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/SwarmHash.cpp.o�[0m
[  5%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/UTF8.cpp.o�[0m
[  6%] �[32mBuilding CXX object libsolutil/CMakeFiles/solutil.dir/Whiskers.cpp.o�[0m
[  6%] �[32m�[1mLinking CXX static library libsolutil.a�[0m
[  6%] Built target solutil
�[35m�[1mScanning dependencies of target smtutil�[0m
�[35m�[1mScanning dependencies of target langutil�[0m
�[35m�[1mScanning dependencies of target evmasm�[0m
[  6%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/SMTLib2Interface.cpp.o�[0m
[  6%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/CHCSmtLib2Interface.cpp.o�[0m
[  6%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/CharStream.cpp.o�[0m
[  6%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/Assembly.cpp.o�[0m
[  6%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/ErrorReporter.cpp.o�[0m
[  6%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/SMTPortfolio.cpp.o�[0m
[  7%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/Sorts.cpp.o�[0m
[  8%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/EVMVersion.cpp.o�[0m
[  8%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/Exceptions.cpp.o�[0m
[  9%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/AssemblyItem.cpp.o�[0m
[  9%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/Z3Interface.cpp.o�[0m
[  9%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/Z3CHCInterface.cpp.o�[0m
[  9%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/ParserBase.cpp.o�[0m
[  9%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/Scanner.cpp.o�[0m
[  9%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/BlockDeduplicator.cpp.o�[0m
[  9%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/CommonSubexpressionEliminator.cpp.o�[0m
[  9%] �[32mBuilding CXX object libsmtutil/CMakeFiles/smtutil.dir/CVC4Interface.cpp.o�[0m
[ 10%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/SemVerHandler.cpp.o�[0m
�[1m/tmp/nix-build-solc-0.7.4.drv-0/source/libsmtutil/CVC4Interface.cpp:237:24: �[0m�[0;1;31merror: �[0m�[1mcall to constructor of 'CVC4::BitVector' is ambiguous�[0m
                                        m_context.mkConst(CVC4::BitVector(1, size_t(0)))
�[0;1;32m                                                          ^               ~~~~~~~~~~~~
�[0m�[1m/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:47:3: �[0m�[0;1;30mnote: �[0mcandidate constructor�[0m
  BitVector(unsigned size, uint32_t z) : d_size(size), d_value(z)
�[0;1;32m  ^
�[0m�[1m/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:59:3: �[0m�[0;1;30mnote: �[0mcandidate constructor�[0m
  BitVector(unsigned size, uint64_t z) : d_size(size), d_value(z)
�[0;1;32m  ^
�[0m�[1m/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:33:3: �[0m�[0;1;30mnote: �[0mcandidate constructor�[0m
  BitVector(unsigned size, const Integer& val)
�[0;1;32m  ^
�[0m�[1m/nix/store/gkv6xs7vnw0jq46wips9jh6lk3jjib7r-cvc4-1.8/include/cvc4/util/bitvector.h:64:3: �[0m�[0;1;30mnote: �[0mcandidate constructor�[0m
  BitVector(unsigned size, const BitVector& q)
�[0;1;32m  ^
�[0m[ 10%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/SourceLocation.cpp.o�[0m
1 error generated.
make[2]: *** [libsmtutil/CMakeFiles/smtutil.dir/build.make:160: libsmtutil/CMakeFiles/smtutil.dir/CVC4Interface.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:518: libsmtutil/CMakeFiles/smtutil.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 10%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/SourceReferenceExtractor.cpp.o�[0m
[ 10%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/ConstantOptimiser.cpp.o�[0m
[ 11%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/ControlFlowGraph.cpp.o�[0m
[ 11%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/SourceReferenceFormatter.cpp.o�[0m
[ 12%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/SourceReferenceFormatterHuman.cpp.o�[0m
[ 12%] �[32mBuilding CXX object liblangutil/CMakeFiles/langutil.dir/Token.cpp.o�[0m
[ 12%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/ExpressionClasses.cpp.o�[0m
[ 12%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/GasMeter.cpp.o�[0m
[ 12%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/Instruction.cpp.o�[0m
[ 12%] �[32m�[1mLinking CXX static library liblangutil.a�[0m
[ 12%] Built target langutil
[ 13%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/JumpdestRemover.cpp.o�[0m
[ 13%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/KnownState.cpp.o�[0m
[ 13%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/LinkerObject.cpp.o�[0m
[ 13%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/PathGasMeter.cpp.o�[0m
[ 14%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/PeepholeOptimiser.cpp.o�[0m
[ 14%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/SemanticInformation.cpp.o�[0m
[ 14%] �[32mBuilding CXX object libevmasm/CMakeFiles/evmasm.dir/SimplificationRules.cpp.o�[0m
[ 14%] �[32m�[1mLinking CXX static library libevmasm.a�[0m
[ 14%] Built target evmasm
make: *** [Makefile:149: all] Error 2

@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

Does it work if you use gccStdenv instead of stdenv ?

@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

Meanwhile, I'll see if using clangStdenv breaks the build on NixOS.

@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

Using clangStdenv on NixOS, it compiles that file fine:

[ 10%] Building CXX object libsmtutil/CMakeFiles/smtutil.dir/CVC4Interface.cpp.o

@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

On the other hand, using clangStdenv on NixOS, it fails during tests:

Running general commandline tests...
 - abiencoderv2_no_warning/
Incorrect exit code. Expected 0 but got 1.
Commandline tests FAILED

Use gccStdenv to avoid issues with clang on Darwin.
@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

I pushed a new version that unconditionally uses gccStdenv considering the failures with clang. Does it solve the issue on Darwin?

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Nov 1, 2020

Result of nixpkgs-review pr 101873 run on x86_64-linux 1

3 packages failed to build:
  • python37Packages.slither-analyzer
  • slither-analyzer (python38Packages.slither-analyzer)
  • solc

solc

Testing soljson via the fuzzer...(B
Commandline tests successful.
--> Running tests using  --evm-version homestead ...(B
Unable to find libevmone.so. Please provide the path using --vm <path>.
You can download it at
https://github.com/ethereum/evmone/releases/download/v0.4.1/evmone-0.4.1-linux-x86_64.tar.gz

--- SKIPPING ALL SEMANTICS TESTS ---

Running 4839 test cases...

0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
*************************************************/solidity/test/boostTest.cpp(114): error: in "smtCheckerTests/operators/slice_default_end": Test expectation mismatch.
Expected result:
  Warning 4661: (221-253): BMC: Assertion violation happens here.
  Warning 4661: (257-289): BMC: Assertion violation happens here.
  Warning 4661: (293-326): BMC: Assertion violation happens here.
Obtained result:
  Warning 1218: (293-326): CHC: Error trying to invoke SMT solver.
  Warning 4661: (221-253): BMC: Assertion violation happens here.
  Warning 4661: (257-289): BMC: Assertion violation happens here.
  Warning 4661: (293-326): BMC: Assertion violation happens here.

**

*** 1 failure is detected in the test module "SolidityTests"

https://termbin.com/lx0q

@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

Weird: It worked for me on NixOS Linux x86-64 !?!?

Is it a fluke or is it reproducible?

@fare
Copy link
Contributor Author

@fare fare commented Nov 1, 2020

It also worked for ofborg.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Nov 1, 2020

Testing soljson via the fuzzer...(B
Commandline tests successful.
--> Running tests using  --evm-version homestead ...(B
Unable to find libevmone.so. Please provide the path using --vm <path>.
You can download it at
https://github.com/ethereum/evmone/releases/download/v0.4.1/evmone-0.4.1-linux-x86_64.tar.gz

--- SKIPPING ALL SEMANTICS TESTS ---

Running 4839 test cases...

0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
*************************************************/solidity/test/boostTest.cpp(114): error: in "smtCheckerTests/operators/slice_default_end": Test expectation mismatch.
Expected result:
  Warning 4661: (221-253): BMC: Assertion violation happens here.
  Warning 4661: (257-289): BMC: Assertion violation happens here.
  Warning 4661: (293-326): BMC: Assertion violation happens here.
Obtained result:
  Warning 1218: (293-326): CHC: Error trying to invoke SMT solver.
  Warning 4661: (221-253): BMC: Assertion violation happens here.
  Warning 4661: (257-289): BMC: Assertion violation happens here.
  Warning 4661: (293-326): BMC: Assertion violation happens here.

**

*** 1 failure is detected in the test module "SolidityTests"

error: build of '/nix/store/p2r8dyspz8hlinn9jhca9nhkhrz2856l-solc-0.7.4.drv' on 'ssh://server' failed: error: --- Error --- nix-store
builder for '/nix/store/p2r8dyspz8hlinn9jhca9nhkhrz2856l-solc-0.7.4.drv' failed with exit code 1
builder for '/nix/store/p2r8dyspz8hlinn9jhca9nhkhrz2856l-solc-0.7.4.drv' failed with exit code 1
error: build of '/nix/store/p2r8dyspz8hlinn9jhca9nhkhrz2856l-solc-0.7.4.drv' failed

@fare
Copy link
Contributor Author

@fare fare commented Nov 5, 2020

I don't understand. Why is it working for me & ofborg and not for you??? What's different about our setups?

@fare
Copy link
Contributor Author

@fare fare commented Nov 5, 2020

At least, your failure is consistent.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Nov 5, 2020

Now solc builds but something depending on it not.

cannot build on 'ssh://server7': cannot connect to 'server7': bash: nix-store: command not found
waiting for locks or build slots...
builder for '/nix/store/cdv2vz4m69cmp6yb94hwwkhyvzgg036v-python3.7-slither-analyzer-0.6.12.drv' failed with exit code 1; last 10 log lines:
  adding 'slither_analyzer-0.6.12.dist-info/top_level.txt'
  adding 'slither_analyzer-0.6.12.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/slither-analyzer-0.6.12/dist /build/slither-analyzer-0.6.12
  Processing ./slither_analyzer-0.6.12-py3-none-any.whl
  ERROR: Could not find a version that satisfies the requirement pysha3>=1.0.2 (from slither-analyzer==0.6.12) (from versions: none)
  ERROR: No matching distribution found for pysha3>=1.0.2 (from slither-analyzer==0.6.12)
builder for '/nix/store/igmwgnd3pd2mqxj64y7dl2f8xvjwa260-python3.8-slither-analyzer-0.6.12.drv' failed with exit code 1; last 10 log lines:
  adding 'slither_analyzer-0.6.12.dist-info/top_level.txt'
  adding 'slither_analyzer-0.6.12.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/slither-analyzer-0.6.12/dist /build/slither-analyzer-0.6.12
  Processing ./slither_analyzer-0.6.12-py3-none-any.whl
  ERROR: Could not find a version that satisfies the requirement crytic-compile>=0.1.8 (from slither-analyzer==0.6.12) (from versions: none)
  ERROR: No matching distribution found for crytic-compile>=0.1.8 (from slither-analyzer==0.6.12)
cannot build derivation '/nix/store/yd7cnpp5dvx6zyaalmnjsyyh3zid8q2c-env.drv': 2 dependencies couldn't be built

Fixed in #102966

@SuperSandro2000 SuperSandro2000 mentioned this pull request Nov 5, 2020
10 tasks
@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Nov 5, 2020

Supersedes #97730

@fare
Copy link
Contributor Author

@fare fare commented Nov 5, 2020

I tried to update slither-analyzer from 0.6.12 to 0.6.13 in case that helped, but building fails with:

Finished executing setuptoolsBuildPhase
installing
Executing pipInstallPhase
/build/slither-analyzer-0.6.13/dist /build/slither-analyzer-0.6.13
Processing ./slither_analyzer-0.6.13-py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement crytic-compile>=0.1.9 (from slither-analyzer==0.6.13) (from versions: none)
ERROR: No matching distribution found for crytic-compile>=0.1.9 (from slither-analyzer==0.6.13)
builder for '/nix/store/0gk7vxrf3l8y7j3hra2q4jr3ly1zdkxj-python3.8-slither-analyzer-0.6.13.drv' failed with exit code 1
error: build of '/nix/store/0gk7vxrf3l8y7j3hra2q4jr3ly1zdkxj-python3.8-slither-analyzer-0.6.13.drv' failed
nix-env --show-trace -f "$nixpkgs" -iA slither-analyzer  0.72s user 0.12s system 23% cpu 3.579 total

I'm not familiar with how Nix wraps over pip, and I don't see crytic anywhere in nixpkgs so I suppose it's coming directly from the pip configuration of slither-analyzer, which doesn't make me optimistic about fixing it without digging into the upstream code.

@fare
Copy link
Contributor Author

@fare fare commented Nov 5, 2020

Note that when I try to build the unmodified slither-analyzer 0.6.12, I get a similar error:

Finished executing setuptoolsBuildPhase
installing
Executing pipInstallPhase
/build/slither-analyzer-0.6.12/dist /build/slither-analyzer-0.6.12
Processing ./slither_analyzer-0.6.12-py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement crytic-compile>=0.1.8 (from slither-analyzer==0.6.12) (from versions: none)
ERROR: No matching distribution found for crytic-compile>=0.1.8 (from slither-analyzer==0.6.12)
builder for '/nix/store/pzlr4rnqrkq3g0ndjnz1d295sc2zimc0-python3.8-slither-analyzer-0.6.12.drv' failed with exit code 1
error: build of '/nix/store/pzlr4rnqrkq3g0ndjnz1d295sc2zimc0-python3.8-slither-analyzer-0.6.12.drv' failed
nix-env --show-trace -f "$nixpkgs" -iA slither-analyzer  0.72s user 0.14s system 21% cpu 4.098 total

@RaghavSood RaghavSood mentioned this pull request Nov 6, 2020
10 tasks
Copy link
Contributor

@jonringer jonringer left a comment

LGTM

Result of nixpkgs-review pr 101873 1

3 packages built:
  • python37Packages.slither-analyzer
  • slither-analyzer (python38Packages.slither-analyzer)
  • solc

@jonringer jonringer merged commit 7eb64f7 into NixOS:master Nov 6, 2020
19 checks passed
@sifmelcara sifmelcara mentioned this pull request Mar 4, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants