I install package nixos.protobuf3_11 and protoc
is available in my environment. But dev lib for C++ isn’t avaible, for example my cmake output:
CMake Error at /nix/store/3rvfqxl4rlikdzli25hqb2fah3wnw91l-cmake-3.16.3/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/nix/store/3rvfqxl4rlikdzli25hqb2fah3wnw91l-cmake-3.16.3/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/nix/store/3rvfqxl4rlikdzli25hqb2fah3wnw91l-cmake-3.16.3/share/cmake-3.16/Modules/FindProtobuf.cmake:624 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
How install dev version of protobuf?
Don’t install libraries through nix-env
or systemPackages
, use nix-shell
instead. See FAQ/I installed a library but my compiler is not finding it. Why? - NixOS Wiki for details
Using of nix-shell
don’t help me. I used the next script for run nix-shell enviroment:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
geant4.data.G4ABLA
# other geant4 data ...
geant4.data.G4RadioactiveDecay
protobuf3_11
];
}
Its allow use geant4 framework, but don’t present protobuf.
brogos
August 13, 2020, 9:01pm
4
try to add pkg-config in buildInputs.
No it doesn’t help. In this project I load GEANT4 cpp-framework as cmake module and for its cmake finds headers and libraries, another libraries also connect. Probability, the problem is the lack of dev-files in the package protobuf3_11
.