Open mlb5000 opened 6 years ago
Looks like the same basic thing as here: https://github.com/input-output-hk/cardano-sl/issues/1731
Confirmed that this also occurs on/release/1.0.4
and develop
, so I'm not sure what's up
Still tracking this down. Looks like maybe the gflags version brought in by RocksDB, or some other dependency (2.2.1) is conflicting with the version brought in from the Nix cache (2.2.0)
I forced brew install of rocksdb
with --ignore-dependencies
and installed an old Formula for gflags 2.2.0 (brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/32b221ad628c48655e73e0083d2310471605fd37/Formula/gflags.rb
) , but stack must realize that rocksdb points to gflags as a dylib, and add a new build entry for it (or something), because it's still pointing at both even though their version numbers match:
cardano-sl-db-1.0.3: build (lib)
Preprocessing library cardano-sl-db-1.0.3...
[ 5 of 13] Pos.DB.Pure
ERROR: flag 'help' was defined more than once (in files '/tmp/nix-build-google-gflags-2.2.0.drv-0/gflags-v2.2.0-src/src/gflags_reporting.cc' and '/tmp/gflags-20180102-74339-xlzs26/gflags-2.2.0/src/gflags_reporting.cc').
The first one is the package pulled down from the IOHK Nix cache, and the latter is the wrapper that stack created(I guess) based on librocksdb.dylib's dependencies
My investigation took me into the CI scripts where I found the line nix-shell -p moreutils expect --run "unbuffer ./scripts/ci/travis.sh | ts";
in .travis.yml
. Using this as a basis for execution:
nix-shell -p moreutils expect --run "unbuffer ./scripts/build/cardano-sl.sh | ts"
The issue surrounding RocksDB and GFlags is gone and the build process completes successfully. Does anyone have any idea why this behaves differently than just running ./scripts/build/cardano-sl.sh
from within an existing nix-shell?
Correction, now this:
Jan 03 10:11:54 [147 of 205] Pos.Block.Network.Listeners
Jan 03 10:11:54
Jan 03 10:11:54 /Users/matthewbaker/Documents/Projects/cardano-sl/node/src/Pos/Block/Network/Listeners.hs:12:51: error:
Jan 03 10:11:54 Module ‘Node.Conversation’ does not export ‘sendRaw’
Jan 03 10:11:54
Jan 03 10:11:54 -- While building custom Setup.hs for package cardano-sl-1.0.3 using:
Jan 03 10:11:54 /Users/matthewbaker/.stack/setup-exe-cache/x86_64-osx-nix/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx-nix/Cabal-1.24.2.0 build lib:cardano-sl exe:cardano-node-simple test:cardano-test bench:cardano-bench-criterion --ghc-options " -ddump-hi -ddump-to-file"
Jan 03 10:11:54 Process exited with code: ExitFailure 1
I'm switching to master
to see if this build procedure has any success there.
master
was successful, culminating in a successful launch of ./scripts/launch/demo-with-wallet-api.sh
Environment:
Steps:
~/.stack/config.yaml
as described here: https://github.com/input-output-hk/cardano-sl/issues/2223#issuecomment-354761767git checkout master
nix-shell
stack setup
(this was a new Haskell environment)./scripts/build/cardano-sl.sh
Output:
cardano-sl-core
builds successfully, thenRocksDB was installed using homebrew