Closed vintrocode closed 3 years ago
Code 137 indicates that the process is out of memory. How much memory did you allocate to Docker on your machine?
Looks like my default docker desktop allocation was only 2gb. Increased it and it built successfully. Thanks a lot π€
For anyone else who may stumble upon this, try removing old containers to make room before increasing your docker memory allocation and allowing your laptop to take flight π
docker system prune -a
Hmm I still see this (not code 137) at higher memory allocations:
Building builder
[+] Building 74.7s (29/30)
=> [internal] load build definition from Dockerfile.monorepo 0.0s
=> => transferring dockerfile: 46B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 35B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 1.4s
=> [internal] load metadata for docker.io/library/node:14-buster-slim 1.3s
=> https://github.com/ethereum-optimism/solc-bin/raw/gh-pages/bin/soljson-v0.7.6.js 0.6s
=> [downloader 1/3] FROM docker.io/library/alpine@sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f 0.0s
=> [node 1/2] FROM docker.io/library/node:14-buster-slim@sha256:f5ca34ff9a862fd26e803778b0c96638c2a20a3ca60fbf4ed959005aa8132290 0.0s
=> [internal] load build context 0.4s
=> => transferring context: 586.42kB 0.3s
=> https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.7.6+commit.7338295f 0.6s
=> CACHED [node 2/2] RUN apt-get update -y && apt-get install -y git 0.0s
=> CACHED [builder 1/10] WORKDIR /optimism 0.0s
=> CACHED [builder 2/10] COPY *.json yarn.lock ./ 0.0s
=> CACHED [builder 3/10] COPY packages/core-utils/package.json ./packages/core-utils/package.json 0.0s
=> CACHED [builder 4/10] COPY packages/hardhat-ovm/package.json ./packages/hardhat-ovm/package.json 0.0s
=> CACHED [builder 5/10] COPY packages/smock/package.json ./packages/smock/package.json 0.0s
=> CACHED [builder 6/10] COPY packages/contracts/package.json ./packages/contracts/package.json 0.0s
=> CACHED [builder 7/10] COPY packages/data-transport-layer/package.json ./packages/data-transport-layer/package.json 0.0s
=> CACHED [builder 8/10] COPY packages/batch-submitter/package.json ./packages/batch-submitter/package.json 0.0s
=> CACHED [builder 9/10] COPY packages/message-relayer/package.json ./packages/message-relayer/package.json 0.0s
=> CACHED [builder 10/10] RUN yarn install --frozen-lockfile 0.0s
=> CACHED [stage-3 2/9] COPY --from=builder /optimism/node_modules ./node_modules 0.0s
=> CACHED [stage-3 3/9] COPY --from=builder /optimism/packages ./packages 0.0s
=> CACHED [stage-3 4/9] COPY *.json yarn.lock ./ 0.0s
=> CACHED [stage-3 5/9] COPY ./packages ./packages 0.0s
=> CACHED [downloader 2/3] ADD https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.7.6+commit.7338295f ./solc 0.0s
=> CACHED [downloader 3/3] ADD https://github.com/ethereum-optimism/solc-bin/raw/gh-pages/bin/soljson-v0.7.6.js ./ovm-solc 0.0s
=> CACHED [stage-3 6/9] COPY --from=downloader solc /root/.cache/hardhat-nodejs/compilers/linux-amd64/solc-linux-amd64-v0.7.6+commit.7338295f 0.0s
=> CACHED [stage-3 7/9] COPY --from=downloader ovm-solc /root/.cache/hardhat-nodejs/compilers/ovm/0.7.6.js 0.0s
=> ERROR [stage-3 8/9] RUN yarn build 72.6s
------
> [stage-3 8/9] RUN yarn build:
#29 0.353 yarn run v1.22.5
#29 0.375 $ yarn lerna run build
#29 0.475 $ /optimism/node_modules/.bin/lerna run build
#29 0.740 lerna notice cli v4.0.0
#29 0.742 lerna info versioning independent
#29 0.777 lerna info Executing command in 7 packages: "yarn run build"
#29 2.147 lerna info run Ran npm script 'build' in '@eth-optimism/hardhat-ovm' in 1.4s:
#29 2.147 $ tsc -p tsconfig.build.json
#29 2.383 lerna info run Ran npm script 'build' in '@eth-optimism/core-utils' in 1.6s:
#29 2.383 $ tsc -p tsconfig.build.json
#29 3.959 lerna info run Ran npm script 'build' in '@eth-optimism/smock' in 1.6s:
#29 3.959 $ tsc -p tsconfig.build.json
#29 72.54 lerna ERR! yarn run build exited 1 in '@eth-optimism/contracts'
#29 72.54 lerna ERR! yarn run build stdout:
#29 72.54 $ ./scripts/build.sh
#29 72.54 $ hardhat compile --show-stack-traces
#29 72.54 $ hardhat compile --network optimism
#29 72.54 $ tsc -p ./tsconfig.build.json
#29 72.54 Compiling 97 files with 0.7.6
#29 72.54
#29 72.54 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#29 72.54 Compiling 97 files with 0.7.6
#29 72.54
#29 72.54 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#29 72.54 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#29 72.54 lerna ERR! yarn run build stderr:
#29 72.54 @openzeppelin/contracts/access/Ownable.sol:26:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
#29 72.54 constructor () internal {
#29 72.54 ^ (Relevant source part starts here and spans across multiple lines).
#29 72.54
#29 72.54 @openzeppelin/contracts/utils/ReentrancyGuard.sol:38:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
#29 72.54 constructor () internal {
#29 72.54 ^ (Relevant source part starts here and spans across multiple lines).
#29 72.54
#29 72.54 contracts/optimistic-ethereum/libraries/wrappers/Lib_ExecutionManagerWrapper.sol:143:13: DeclarationError: Function not found.
#29 72.54 kall(add(_calldata, 0x20), mload(_calldata), 0x0, 0x0)
#29 72.54 ^--^
#29 72.54
#29 72.54 contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:41:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
#29 72.54 constructor()
#29 72.54 ^ (Relevant source part starts here and spans across multiple lines).
#29 72.54
#29 72.54 Error HH600: Compilation failed
#29 72.54 HardhatError: HH600: Compilation failed
#29 72.54 at SimpleTaskDefinition.action (/optimism/node_modules/hardhat/src/builtin-tasks/compile.ts:751:15)
#29 72.54 at Environment._runTaskDefinition (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:218:14)
#29 72.54 at Environment.run (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
#29 72.54 at SimpleTaskDefinition.action (/optimism/node_modules/hardhat/src/builtin-tasks/compile.ts:973:7)
#29 72.54 at Environment._runTaskDefinition (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:218:14)
#29 72.54 at Environment.run (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
#29 72.54 at SimpleTaskDefinition.action (/optimism/node_modules/hardhat/src/builtin-tasks/compile.ts:395:45)
#29 72.54 at Environment._runTaskDefinition (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:218:14)
#29 72.54 at Environment.run (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
#29 72.54 at SimpleTaskDefinition.action (/optimism/node_modules/hardhat/src/builtin-tasks/compile.ts:1320:63)
#29 72.54 at Environment._runTaskDefinition (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:218:14)
#29 72.54 at Environment.run (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
#29 72.54 at SimpleTaskDefinition.action (/optimism/node_modules/hardhat/src/builtin-tasks/compile.ts:1390:7)
#29 72.54 at Environment._runTaskDefinition (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:218:14)
#29 72.54 at OverriddenTaskDefinition._action (/optimism/node_modules/@typechain/hardhat/src/index.ts:28:5)
#29 72.54 at Environment._runTaskDefinition (/optimism/node_modules/hardhat/src/internal/core/runtime-environment.ts:218:14)
#29 72.54 error Command failed with exit code 1.
#29 72.54 @openzeppelin/contracts/access/Ownable.sol:26:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
#29 72.54 constructor () internal {
#29 72.54 ^ (Relevant source part starts here and spans across multiple lines).
#29 72.54
#29 72.54 @openzeppelin/contracts/utils/ReentrancyGuard.sol:38:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
#29 72.54 constructor () internal {
#29 72.54 ^ (Relevant source part starts here and spans across multiple lines).
#29 72.54
#29 72.54 contracts/optimistic-ethereum/libraries/wrappers/Lib_ExecutionManagerWrapper.sol:143:13: DeclarationError: Function not found.
#29 72.54 kall(add(_calldata, 0x20), mload(_calldata), 0x0, 0x0)
#29 72.54 ^--^
#29 72.54
#29 72.54 contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1ETHGateway.sol:41:5: Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
#29 72.54 constructor()
#29 72.54 ^ (Relevant source part starts here and spans across multiple lines).
#29 72.54
#29 72.54 Error HH600: Compilation failed
#29 72.54 For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces
#29 72.54 error Command failed with exit code 1.
#29 72.54 error Command failed with exit code 1.
#29 72.54 lerna ERR! yarn run build exited 1 in '@eth-optimism/contracts'
#29 72.55 error Command failed with exit code 1.
#29 72.55 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#29 72.56 error Command failed with exit code 1.
#29 72.56 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
executor failed running [/bin/sh -c yarn build]: exit code: 1
ERROR: Service 'builder' failed to build
benmayer@Bens-MacBook-Pro ops % docker-compose up
Describe the bug Something related to yarn build causes
docker-compose build
to failTo Reproduce Steps to reproduce the behavior:
cd
intoops
folder, set env vars and trydocker-compose build
Expected behavior Docker compose to build the images so I can run the containers locally
Terminal Output
System Specs:
2d63f2f94ab2ba3ec3ee8bc038a11260a09f240c