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

Stack / Nix build fails with "requires version 3.6.1 of the Protocol Buffer" #131

Open
dukedave opened this Issue Nov 6, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@dukedave
Contributor

dukedave commented Nov 6, 2018

When this is added to stack.yaml:

 nix:
   enable: true

Then stack build fails with:

    Building executable 'face-detect' for opencv-examples-0.0.0.0..
    [1 of 1] Compiling Main             ( src/face-detect.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/face-detect/face-detect-tmp/Main.o ) [flags changed]
    [libprotobuf FATAL google/protobuf/stubs/common.cc:68] This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.4.0.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)
    terminate called after throwing an instance of 'google::protobuf::FatalException'
      what():  This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.4.0.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)


--  While building custom Setup.hs for package opencv-extra-0.2.0.1 using:
      /home/dave/dev/other/haskell/haskell-opencv/opencv-extra/.stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1 build lib:opencv-extra --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure (-6)
    Logs have been written to: /home/dave/dev/other/haskell/haskell-opencv/.stack-work/logs/opencv-extra-0.2.0.1.log

    Preprocessing library for opencv-extra-0.2.0.1..
    Building library for opencv-extra-0.2.0.1..
    [ 3 of 11] Compiling OpenCV.Extra.Bgsegm ( src/OpenCV/Extra/Bgsegm.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/OpenCV/Extra/Bgsegm.o )
    [libprotobuf FATAL google/protobuf/stubs/common.cc:68] This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.4.0.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)
    terminate called after throwing an instance of 'google::protobuf::FatalException'
      what():  This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.4.0.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)

On:

$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2

$ nix --version
nix (Nix) 2.1.2

$ lsb_release -a
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic
@dukedave

This comment has been minimized.

Contributor

dukedave commented Nov 6, 2018

I'm no Nix expert, but a presume this is also bad? 😬

$ nix-shell
error: Please be informed that this pseudo-package is not the only part of
Nixpkgs that fails to evaluate. You should not evaluate entire Nixpkgs
without some special measures to handle failing packages, like those taken
by Hydra.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment