thestr4ng3r / chiaki

Moved to https://git.sr.ht/~thestr4ng3r/chiaki - Free and Open Source PS4 Remote Play Client
https://git.sr.ht/~thestr4ng3r/chiaki
2.18k stars 370 forks source link

Problem building with native nanopb support #356

Closed bioxz closed 3 years ago

bioxz commented 3 years ago

Environment

Describe the bug The change introduced in cbfa49551d725b82b89fde665857d67bc907db64 fails the build on my machine. I have installed the nanopb and libnanopb-dev Debian packages, which get detected by the Cmake script, which then fails with an error. It does not occur without those packages installed, as the problematic code section gets skipped.

To Reproduce Steps to reproduce the behavior:

  1. Get chiaki 6e055d307124b370a98179333fc6cc195ec1fef9
  2. Install dependencies including nanopb and libnanopb-dev
  3. Run the cmake procress

Expected behavior The Cmake process finishes without any error messages.

Log Files

CMake Error at cmake/FindNanopb.cmake:20 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  Jerasure::Jerasure
Call Stack (most recent call first):
  CMakeLists.txt:82 (find_package)
bioxz commented 3 years ago

Actually I just noticed what the problem is, libjerasure-dev wasn't installed on my system, thus the property was missing. Nanopb should therefore depend on jerasure.

thestr4ng3r commented 3 years ago

Good catch! Actually nanopb and jerasure are completely independent libraries. The issue was that my copypasta from FindJerasure.cmake to FindNanopb.cmake wasn't completly renamed yet, making the nanopb module sort of depend on the jerasure one: https://github.com/thestr4ng3r/chiaki/blob/cbfa49551d725b82b89fde665857d67bc907db64/cmake/FindNanopb.cmake#L19-L20 fyi @fenio (but the current state of the package should still be fine)

thestr4ng3r commented 3 years ago

Using nanopb from system and jerasure from submodule should work now.