• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling [OTC] missing: Protobuf_INCLUDE_DIR

hellboy

Intermediate OT User
Joined
Apr 6, 2008
Messages
544
Solutions
6
Reaction score
121
Location
player:getTown()
Hello.
I tried compile Mehah OTC on Ubuntu 20.04.

It failed on cmake command.
I also "regenerated" protobuf files.

Code:
cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 11.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Link to static libraries: ON
-- Build type: RelWithDebInfo
-- Build commit: devel
-- Build revision: 0
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.1.a  
-- LuaJIT: OFF
-- Found PhysFS: /usr/lib/x86_64-linux-gnu/libphysfs.a  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.a  
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindProtobuf.cmake:624 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/framework/CMakeLists.txt:208 (find_package)
  CMakeLists.txt:12 (include)

-- Configuring incomplete, errors occurred!
See also "/home/daniel/git/public/otclient/build/CMakeFiles/CMakeOutput.log".
See also "/home/daniel/git/public/otclient/build/CMakeFiles/CMakeError.log".

Anyone know how to fix this?
 
Compiling instructions are tested and proven to work, your cmake states clearly "Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)".
You didn't install protobuf properly, there is special step for protobuf.
 
Last edited:
Compiling instructions are tested and proven to work, your cmake states clearly "Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)".
You didn't install protobuf properly, there is special step for protobuf.

I've done steps 1-4 and 5.3

Protobuf steps (steps number 2) tried 5 times before post here:
Code:
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git checkout v3.19.4 # or find latest stable version

git submodule update --init --recursive
./autogen.sh

Code:
./configure
make
sudo make install
sudo ldconfig # refresh shared library cache.

I also tried with prefix:
Code:
./configure --prefix=/usr
make
sudo make install
sudo ldconfig # refresh shared library cache.

And I cleaned protobuf files in otclient repository (5.3)
Code:
cd src/framework/protobuf/proto/
./generate.sh

Nothing work.
Nothing changed.

Compiling instructions are tested and proven to work. [...]

So there is edge case.
 
Back
Top