incapaz de fazer o 'protobuf-c' avisar: Nenhum pacote 'protobuf' encontrado

1

Estou tentando criar o protobuf-c aqui link

mas acabei recebendo esse erro.

checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/arm-poky-linux-gnueabi/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether C compiler accepts "-Wc99-c11-compat"... yes
checking whether C compiler accepts "-Werror=incompatible-pointer-types"... yes
checking whether C compiler accepts "-Werror=int-conversion"... yes
checking whether C compiler accepts "-Wnull-dereference"... no
checking for doxygen... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for protobuf... no
checking for protobuf... no
configure: error: Package requirements (protobuf >= 2.6.0) were not met:

No package 'protobuf' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Eu tentei sugestões de outras postagens para adicionar o PKG_CONFIG_PATH. mas estou curioso se isso é porque eu tenho mais recente versão protobuf do que o esperado?

do log de configuração:

configure:16759: checking for pkg-config
configure:16777: found /usr/bin/pkg-config
configure:16789: result: /usr/bin/pkg-config
configure:16814: checking pkg-config is at least version 0.9.0
configure:16817: result: yes
configure:16879: checking for protobuf
configure:16886: $PKG_CONFIG --exists --print-errors "protobuf >= 3.0.0"
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing 'protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
configure:16889: $? = 1
configure:16903: $PKG_CONFIG --exists --print-errors "protobuf >= 3.0.0"
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing 'protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
configure:16906: $? = 1
configure:16920: result: no
No package 'protobuf' found
configure:16938: checking for protobuf
configure:16945: $PKG_CONFIG --exists --print-errors "protobuf >= 2.6.0"
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing 'protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
configure:16948: $? = 1
configure:16962: $PKG_CONFIG --exists --print-errors "protobuf >= 2.6.0"
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing 'protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
configure:16965: $? = 1
configure:16979: result: no
No package 'protobuf' found
configure:16995: error: Package requirements (protobuf >= 2.6.0) were not met:

No package 'protobuf' found

Quando eu tento encontrar o protobuf ele mostra o caminho bem

# whereis pkgconfig
pkgconfig: /usr/lib/pkgconfig /usr/local/lib/pkgconfig /usr/share/pkgconfig
# echo $PKG_CONFIG_PATH
usr/lib/pkgconfig
# find / -name protobuf
/usr/local/include/google/protobuf
# protoc --version
libprotoc 3.4.0

em execução: armv7l 4.1.15-tx6 + g77f6154 Yocto Linux

    
por Feroze Mohamed 05.10.2017 / 09:01

1 resposta

1

Depois de tentar muitas sugestões on-line, tropecei em um site chinês que sugeria adicionar esse caminho:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Até agora eu estava adicionando a linha abaixo e não funcionava

export PKG_CONFIG_PATH=/usr/lib/pkgconfig

Depois de adicionar esta linha, export PKG_CONFIG_PATH = / usr / local / lib / pkgconfig

./ configure foi bem sucedido

protobuf-c 1.3.0

    CC:                     gcc
    CFLAGS:                 -g -O2
    CXX:                    g++
    CXXFLAGS:               -g -O2
    LDFLAGS:
    LIBS:

    prefix:                 /usr/local
    sysconfdir:             ${prefix}/etc
    libdir:                 ${exec_prefix}/lib
    includedir:             ${prefix}/include
    pkgconfigdir:           ${libdir}/pkgconfig

bigendian:              no
protobuf version:       libprotoc 3.4.0
    
por 05.10.2017 / 10:54

Tags